summaryrefslogtreecommitdiffstats
path: root/mpeglib/lib/decoder/vorbisPlugin.h
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commite2de64d6f1beb9e492daf5b886e19933c1fa41dd (patch)
tree9047cf9e6b5c43878d5bf82660adae77ceee097a /mpeglib/lib/decoder/vorbisPlugin.h
downloadtdemultimedia-e2de64d6f1beb9e492daf5b886e19933c1fa41dd.tar.gz
tdemultimedia-e2de64d6f1beb9e492daf5b886e19933c1fa41dd.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdemultimedia@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'mpeglib/lib/decoder/vorbisPlugin.h')
-rw-r--r--mpeglib/lib/decoder/vorbisPlugin.h87
1 files changed, 87 insertions, 0 deletions
diff --git a/mpeglib/lib/decoder/vorbisPlugin.h b/mpeglib/lib/decoder/vorbisPlugin.h
new file mode 100644
index 00000000..b680ed69
--- /dev/null
+++ b/mpeglib/lib/decoder/vorbisPlugin.h
@@ -0,0 +1,87 @@
+/*
+ vorbis player plugin
+ Copyright (C) 2000 Martin Vogt
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation.
+
+ For more information look at the file COPYRIGHT in this package
+
+ */
+
+
+#ifndef __VORBISPLUGIN_H
+#define __VORBISPLUGIN_H
+
+#include "nukePlugin.h"
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdio.h>
+#include <math.h>
+
+#ifndef OGG_VORBIS
+class VorbisPlugin : public NukePlugin {
+};
+#else
+
+
+#include <vorbis/codec.h>
+#include <vorbis/vorbisfile.h>
+
+/**
+ callbacks from vorbisfile
+*/
+extern "C" {
+
+extern size_t fread_func (void *ptr,size_t size,size_t nmemb, void *stream);
+extern int fseek_func (void *stream, ogg_int64_t offset, int whence);
+extern int fclose_func (void *stream);
+extern long ftell_func (void *stream);
+
+}
+
+
+class VorbisPlugin : public DecoderPlugin {
+
+ OggVorbis_File vf;
+
+
+ // END vorbis setup
+
+
+ int lnoLength;
+ int lAutoPlay;
+ TimeStamp* timeDummy;
+ char* pcmout; // temporay pcm buffer
+ int last_section;
+ int current_section;
+ int lshutdown;
+
+ public:
+ VorbisPlugin();
+ ~VorbisPlugin();
+
+ void decoder_loop();
+ int seek_impl(int second);
+ void config(const char* key,const char* value,void* user_data);
+
+ // vorbis bug workaround [START]
+ int vorbis_seek_bug_active;
+ ::InputStream* getInputStream() { return input; }
+ // vorbis bug workaround [END]
+
+ private:
+ int processVorbis(vorbis_info* vi,vorbis_comment* comment);
+ int getTotalLength();
+ int init();
+
+};
+
+#endif
+//OGG_VORBIS
+
+#endif