summaryrefslogtreecommitdiff
path: root/core/multimedia/opieplayer/vorbis/libtremorplugin.h
Unidiff
Diffstat (limited to 'core/multimedia/opieplayer/vorbis/libtremorplugin.h') (more/less context) (ignore whitespace changes)
-rw-r--r--core/multimedia/opieplayer/vorbis/libtremorplugin.h94
1 files changed, 94 insertions, 0 deletions
diff --git a/core/multimedia/opieplayer/vorbis/libtremorplugin.h b/core/multimedia/opieplayer/vorbis/libtremorplugin.h
new file mode 100644
index 0000000..923c97c
--- a/dev/null
+++ b/core/multimedia/opieplayer/vorbis/libtremorplugin.h
@@ -0,0 +1,94 @@
1/****************************************************************************
2* libtremorplugin.h
3*
4* Copyright (C) 2002 Latchesar Ionkov <lucho@ionkov.net>
5*
6* This program is free software; you can redistribute it and/or modify
7* it under the terms of the GNU General Public License as published by
8* the Free Software Foundation; either version 2 of the License, or
9* (at your option) any later version.
10*
11* This program is distributed in the hope that it will be useful,
12* but WITHOUT ANY WARRANTY; without even the implied warranty of
13* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14* GNU General Public License for more details.
15*
16* You should have received a copy of the GNU General Public License
17* along with this program; if not, write to the Free Software
18* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19****************************************************************************/
20
21#ifndef LIBTREMOR_PLUGIN_H
22#define LIBTREMOR_PLUGIN_H
23
24
25#include <qstring.h>
26#include <qpe/mediaplayerplugininterface.h>
27
28
29class LibTremorPluginData;
30
31
32class LibTremorPlugin : public MediaPlayerDecoder {
33
34public:
35 LibTremorPlugin();
36 ~LibTremorPlugin();
37
38 const char *pluginName() { return "LibTremorPlugin"; }
39 const char *pluginComment() { return "This is the Tremor library that has been wrapped as a plugin"; }
40 double pluginVersion() { return 1.0; }
41
42 bool isFileSupported( const QString& );
43 bool open( const QString& );
44 bool close();
45 bool isOpen();
46 const QString &fileInfo();
47
48 // If decoder doesn't support audio then return 0 here
49 int audioStreams();
50 int audioChannels( int stream );
51 int audioFrequency( int stream );
52 int audioSamples( int stream );
53 bool audioSetSample( long sample, int stream );
54 long audioGetSample( int stream );
55 bool audioReadSamples( short *output, int channels, long samples, long& samplesRead, int stream );
56
57
58 // If decoder doesn't support video then return 0 here
59 int videoStreams() { return 0; }
60 int videoWidth( int ) { return 0; }
61 int videoHeight( int ) { return 0; }
62 double videoFrameRate( int ) { return 0.0; }
63 int videoFrames( int ) { return 0; }
64 bool videoSetFrame( long, int ) { return FALSE; }
65 long videoGetFrame( int ) { return 0; }
66 bool videoReadFrame( unsigned char **, int, int, int, int, ColorFormat, int ) { return FALSE; }
67 bool videoReadScaledFrame( unsigned char **, int, int, int, int, int, int, ColorFormat, int ) { return FALSE; }
68 bool videoReadYUVFrame( char *, char *, char *, int, int, int, int, int ) { return FALSE; }
69
70 // Profiling
71 double getTime();
72
73 // Ignore if these aren't supported
74 bool setSMP( int ) { return FALSE; }
75 bool setMMX( bool ) { return FALSE; }
76
77 // Capabilities
78 bool supportsAudio() { return TRUE; }
79 bool supportsVideo() { return FALSE; }
80 bool supportsYUV() { return FALSE; }
81 bool supportsMMX() { return TRUE; }
82 bool supportsSMP() { return FALSE; }
83 bool supportsStereo() { return TRUE; }
84 bool supportsScaling() { return FALSE; }
85
86 long getPlayTime() { return -1; }
87
88private:
89 LibTremorPluginData *d;
90
91};
92
93
94#endif