decoder-ogg-stream.h
author nathan
Fri, 13 Nov 2009 19:27:36 +0800
branchtrunk
changeset 33 65ed49cbc08b
child 38 79b272a68eb4
permissions -rw-r--r--
add OGG streaming support
     1 /*
     2  * MP3/MPlayer plugin to VDR (C++)
     3  *
     4  * (C) 2001-2009 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 #include "decoder-ogg.h"
    31 
    32 class cNetStream;
    33 
    34 // ----------------------------------------------------------------
    35 
    36 class cNetOggFile : public cOggFile {
    37 friend class cNetOggInfo;
    38 private:
    39   cNetStream *nstr;
    40 public:
    41   cNetOggFile(const char *Filename);
    42   virtual bool Open(bool log=true);
    43   };
    44 
    45 // ----------------------------------------------------------------
    46 
    47 class cNetOggInfo : public cOggInfo {
    48 private:
    49   cNetOggFile *nfile;
    50   cNetStream *nstr;
    51   void IcyInfo(void);
    52 public:
    53   cNetOggInfo(cNetOggFile *File);
    54   virtual bool DoScan(bool KeepOpen=false);
    55   virtual void InfoHook(void);
    56   };
    57 
    58 // ----------------------------------------------------------------
    59 
    60 class cOggStreamDecoder : public cOggDecoder {
    61 private:
    62   cNetOggFile *nfile;
    63 public:
    64   cOggStreamDecoder(const char *Filename);
    65   virtual bool IsStream(void) { return true; }
    66   };
    67 
    68 #endif //___DECODER_OGG_STREAM_H