blob: 6bee4066f9203d387d652ad3dd02a9a78b05bc39 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
/*! \file vdr_decoder_ogg.h
* \ingroup vdr
*
* The file contains a decoder which is used by the player to decode ogg vorbis audio files.
*
* Adapted from
* MP3/MPlayer plugin to VDR (C++)
* (C) 2001-2003 Stefan Huelswitt <huels@iname.com>
*/
#ifndef ___DECODER_OGG_H
#define ___DECODER_OGG_H
#define DEC_OGG DEC_ID('O','G','G',' ')
#define DEC_OGG_STR "OGG"
#ifdef HAVE_VORBISFILE
#include <mad.h>
#include <vorbis/vorbisfile.h>
#include "vdr_decoder.h"
// ----------------------------------------------------------------
class cOggDecoder : public cDecoder {
private:
cOggFile file;
cOggInfo info;
struct Decode ds;
struct mad_pcm *pcm;
unsigned long long index;
//
void Init(void);
bool Clean(void);
bool GetInfo(bool keepOpen);
struct Decode *Done(eDecodeStatus status);
public:
cOggDecoder(const char *Filename);
~cOggDecoder();
virtual bool Valid(void);
virtual cFileInfo *FileInfo(void);
virtual cSongInfo *SongInfo(bool get);
virtual cPlayInfo *PlayInfo(void);
virtual bool Start(void);
virtual bool Stop(void);
virtual bool Skip(int Seconds, int Avail, int Rate);
virtual struct Decode *Decode(void);
};
// ----------------------------------------------------------------
#endif //HAVE_VORBISFILE
#endif //___DECODER_OGG_H
|