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
nathan@33
     1
/*
nathan@33
     2
 * MP3/MPlayer plugin to VDR (C++)
nathan@33
     3
 *
nathan@38
     4
 * (C) 2001-2010 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@38
    30
#ifdef HAVE_VORBISFILE
nathan@38
    31
nathan@33
    32
#include "decoder-ogg.h"
nathan@33
    33
nathan@33
    34
class cNetStream;
nathan@33
    35
nathan@33
    36
// ----------------------------------------------------------------
nathan@33
    37
nathan@33
    38
class cNetOggFile : public cOggFile {
nathan@33
    39
friend class cNetOggInfo;
nathan@33
    40
private:
nathan@33
    41
  cNetStream *nstr;
nathan@33
    42
public:
nathan@33
    43
  cNetOggFile(const char *Filename);
nathan@33
    44
  virtual bool Open(bool log=true);
nathan@33
    45
  };
nathan@33
    46
nathan@33
    47
// ----------------------------------------------------------------
nathan@33
    48
nathan@33
    49
class cNetOggInfo : public cOggInfo {
nathan@33
    50
private:
nathan@33
    51
  cNetOggFile *nfile;
nathan@33
    52
  cNetStream *nstr;
nathan@33
    53
  void IcyInfo(void);
nathan@33
    54
public:
nathan@33
    55
  cNetOggInfo(cNetOggFile *File);
nathan@33
    56
  virtual bool DoScan(bool KeepOpen=false);
nathan@33
    57
  virtual void InfoHook(void);
nathan@33
    58
  };
nathan@33
    59
nathan@33
    60
// ----------------------------------------------------------------
nathan@33
    61
nathan@33
    62
class cOggStreamDecoder : public cOggDecoder {
nathan@33
    63
private:
nathan@33
    64
  cNetOggFile *nfile;
nathan@33
    65
public:
nathan@33
    66
  cOggStreamDecoder(const char *Filename);
nathan@33
    67
  virtual bool IsStream(void) { return true; }
nathan@33
    68
  };
nathan@33
    69
nathan@38
    70
#endif //HAVE_VORBISFILE
nathan@33
    71
#endif //___DECODER_OGG_STREAM_H