3 Copyright (C) 2000 Martin Vogt
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation.
9 For more information look at the file COPYRIGHT in this package
14 #ifndef __VORBISPLUGIN_H
15 #define __VORBISPLUGIN_H
17 #include <mpeglib/decoder/decoderPlugin.h>
18 #include <mpeglib/output/outputStream.h>
19 #include <mpeglib/input/inputStream.h>
23 #include <vorbis/codec.h>
24 #include <vorbis/vorbisfile.h>
27 callbacks from vorbisfile
31 extern size_t fread_func (void *ptr
,size_t size
,size_t nmemb
, void *stream
);
32 extern int fseek_func (void *stream
, ogg_int64_t offset
, int whence
);
33 extern int fclose_func (void *stream
);
34 extern long ftell_func (void *stream
);
40 class VorbisPlugin
: public DecoderPlugin
{
51 char* pcmout
; // temporay pcm buffer
61 int seek_impl(int second
);
62 void config(char* key
, char* value
,void* user_data
);
65 int processVorbis(vorbis_info
* vi
,vorbis_comment
* comment
);
73 extern DecoderPlugin
* getVorbisPlayer() {
74 return new VorbisPlugin();