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