Add Russian translation provided by Валерий Крувялис <valkru@mail.ru>
[xiph-mirror.git] / vorbis-plugins / kmpg / vorbisPlugin.h
blobc0cecf93c17911f123e613652abec92d35257d16
1 /*
2 vorbis player plugin
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>
21 #include <stdio.h>
22 #include <math.h>
23 #include <vorbis/codec.h>
24 #include <vorbis/vorbisfile.h>
26 /**
27 callbacks from vorbisfile
29 extern "C" {
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 {
42 OggVorbis_File vf;
45 // END vorbis setup
48 int lnoLength;
49 int lAutoPlay;
50 TimeStamp* timeDummy;
51 char* pcmout; // temporay pcm buffer
52 int last_section;
53 int current_section;
54 int lshutdown;
56 public:
57 VorbisPlugin();
58 ~VorbisPlugin();
60 void decoder_loop();
61 int seek_impl(int second);
62 void config(char* key, char* value,void* user_data);
64 private:
65 int processVorbis(vorbis_info* vi,vorbis_comment* comment);
66 int getTotalLength();
67 int init();
72 extern "C" {
73 extern DecoderPlugin* getVorbisPlayer() {
74 return new VorbisPlugin();
79 #endif