decoder-ogg-stream.h
author nathan
Sun, 12 Dec 2010 11:31:54 +0100
branchtrunk
changeset 38 79b272a68eb4
parent 33 65ed49cbc08b
permissions -rw-r--r--
fix compile without OGG library
     1 /*
     2  * MP3/MPlayer plugin to VDR (C++)
     3  *
     4  * (C) 2001-2010 Stefan Huelswitt <s.huelswitt@gmx.de>
     5  *
     6  * OGG stream support initialy developed by Manuel Reimer <manuel.reimer@gmx.de>
     7  *
     8  * This code is free software; you can redistribute it and/or
     9  * modify it under the terms of the GNU General Public License
    10  * as published by the Free Software Foundation; either version 2
    11  * of the License, or (at your option) any later version.
    12  *
    13  * This code is distributed in the hope that it will be useful,
    14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
    15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    16  * GNU General Public License for more details.
    17  *
    18  * You should have received a copy of the GNU General Public License
    19  * along with this program; if not, write to the Free Software
    20  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
    21  * Or, point your browser to http://www.gnu.org/copyleft/gpl.html
    22  */
    23 
    24 #ifndef ___DECODER_OGG_STREAM_H
    25 #define ___DECODER_OGG_STREAM_H
    26 
    27 #define DEC_OGGS     DEC_ID('O','G','G','S')
    28 #define DEC_OGGS_STR "OGGS"
    29 
    30 #ifdef HAVE_VORBISFILE
    31 
    32 #include "decoder-ogg.h"
    33 
    34 class cNetStream;
    35 
    36 // ----------------------------------------------------------------
    37 
    38 class cNetOggFile : public cOggFile {
    39 friend class cNetOggInfo;
    40 private:
    41   cNetStream *nstr;
    42 public:
    43   cNetOggFile(const char *Filename);
    44   virtual bool Open(bool log=true);
    45   };
    46 
    47 // ----------------------------------------------------------------
    48 
    49 class cNetOggInfo : public cOggInfo {
    50 private:
    51   cNetOggFile *nfile;
    52   cNetStream *nstr;
    53   void IcyInfo(void);
    54 public:
    55   cNetOggInfo(cNetOggFile *File);
    56   virtual bool DoScan(bool KeepOpen=false);
    57   virtual void InfoHook(void);
    58   };
    59 
    60 // ----------------------------------------------------------------
    61 
    62 class cOggStreamDecoder : public cOggDecoder {
    63 private:
    64   cNetOggFile *nfile;
    65 public:
    66   cOggStreamDecoder(const char *Filename);
    67   virtual bool IsStream(void) { return true; }
    68   };
    69 
    70 #endif //HAVE_VORBISFILE
    71 #endif //___DECODER_OGG_STREAM_H