summaryrefslogtreecommitdiff
path: root/core/multimedia/opieplayer/wavplugin/wavplugin.h
Unidiff
Diffstat (limited to 'core/multimedia/opieplayer/wavplugin/wavplugin.h') (more/less context) (ignore whitespace changes)
-rw-r--r--core/multimedia/opieplayer/wavplugin/wavplugin.h97
1 files changed, 97 insertions, 0 deletions
diff --git a/core/multimedia/opieplayer/wavplugin/wavplugin.h b/core/multimedia/opieplayer/wavplugin/wavplugin.h
new file mode 100644
index 0000000..64635ca
--- a/dev/null
+++ b/core/multimedia/opieplayer/wavplugin/wavplugin.h
@@ -0,0 +1,97 @@
1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved.
3**
4** This file is part of Qtopia Environment.
5**
6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file.
10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15**
16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you.
18**
19**********************************************************************/
20#ifndef WAV_PLUGIN_H
21#define WAV_PLUGIN_H
22
23
24#include <qstring.h>
25#include <qapplication.h>
26#include "mediaplayerplugininterface.h"
27
28
29class WavPluginData;
30
31
32class WavPlugin : public MediaPlayerDecoder {
33
34public:
35 WavPlugin();
36 ~WavPlugin();
37
38 const char *pluginName() { return "WavPlugin"; }
39 const char *pluginComment() { return "This is a simple plugin for playing wav files"; }
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() { return strInfo = qApp->translate( "MediaPlayer", "No Information Available", "media plugin text" ); }
47 const QString &fileInfo() { return strInfo = QString(""); }
48
49 // If decoder doesn't support audio then return 0 here
50 int audioStreams();
51 int audioChannels( int stream );
52 int audioFrequency( int stream );
53 int audioSamples( int stream );
54 bool audioSetSample( long sample, int stream );
55 long audioGetSample( int stream );
56 //bool audioReadMonoSamples( short *output, long samples, long& samplesRead, int stream );
57 //bool audioReadStereoSamples( short *output, long samples, long& samplesRead, int stream );
58 bool audioReadSamples( short *output, int channels, long samples, long& samplesRead, int stream );
59 //bool audioReadSamples( short *output, int channel, long samples, int stream );
60 //bool audioReReadSamples( short *output, int channel, long samples, int stream );
61
62 // If decoder doesn't support video then return 0 here
63 int videoStreams() { return 0; }
64 int videoWidth( int ) { return 0; }
65 int videoHeight( int ) { return 0; }
66 double videoFrameRate( int ) { return 0.0; }
67 int videoFrames( int ) { return 0; }
68 bool videoSetFrame( long, int ) { return FALSE; }
69 long videoGetFrame( int ) { return 0; }
70 bool videoReadFrame( unsigned char **, int, int, int, int, ColorFormat, int ) { return FALSE; }
71 bool videoReadScaledFrame( unsigned char **, int, int, int, int, int, int, ColorFormat, int ) { return FALSE; }
72 bool videoReadYUVFrame( char *, char *, char *, int, int, int, int, int ) { return FALSE; }
73
74 // Profiling
75 double getTime();
76
77 // Ignore if these aren't supported
78 bool setSMP( int ) { return FALSE; }
79 bool setMMX( bool ) { return FALSE; }
80
81 // Capabilities
82 bool supportsAudio() { return TRUE; }
83 bool supportsVideo() { return FALSE; }
84 bool supportsYUV() { return FALSE; }
85 bool supportsMMX() { return TRUE; }
86 bool supportsSMP() { return FALSE; }
87 bool supportsStereo() { return TRUE; }
88 bool supportsScaling() { return FALSE; }
89
90private:
91 WavPluginData *d;
92 QString strInfo;
93
94};
95
96
97#endif