summaryrefslogtreecommitdiff
path: root/core/multimedia/opieplayer/libmpeg3/libmpeg3plugin.h
Side-by-side diff
Diffstat (limited to 'core/multimedia/opieplayer/libmpeg3/libmpeg3plugin.h') (more/less context) (ignore whitespace changes)
-rw-r--r--core/multimedia/opieplayer/libmpeg3/libmpeg3plugin.h22
1 files changed, 16 insertions, 6 deletions
diff --git a/core/multimedia/opieplayer/libmpeg3/libmpeg3plugin.h b/core/multimedia/opieplayer/libmpeg3/libmpeg3plugin.h
index 0a06264..54f259b 100644
--- a/core/multimedia/opieplayer/libmpeg3/libmpeg3plugin.h
+++ b/core/multimedia/opieplayer/libmpeg3/libmpeg3plugin.h
@@ -22,13 +22,17 @@
#include <qstring.h>
#include <qapplication.h>
#include "libmpeg3.h"
#include "mpeg3protos.h"
-#include "mediaplayerplugininterface.h"
+//#include <qpe/mediaplayerplugininterface.h>
+#include "../mediaplayerplugininterface.h"
+
+
+// #define OLD_MEDIAPLAYER_API
class LibMpeg3Plugin : public MediaPlayerDecoder {
public:
LibMpeg3Plugin() { file = NULL; }
@@ -39,26 +43,30 @@ public:
double pluginVersion() { return 1.0; }
bool isFileSupported( const QString& fileName ) { return mpeg3_check_sig( (char *)fileName.latin1() ) == 1; }
bool open( const QString& fileName ) { file = mpeg3_open( (char *)fileName.latin1() ); return file != NULL; }
bool close() { if ( file ) { int r = mpeg3_close( file ); file = NULL; return r == 1; } return FALSE; }
bool isOpen() { return file != NULL; }
- const QString &fileInfo() { return strInfo = QString( "" ); }
+ const QString &fileInfo() { return strInfo = ""; }
// If decoder doesn't support audio then return 0 here
int audioStreams() { return file ? mpeg3_total_astreams( file ) : 0; }
int audioChannels( int stream ) { return file ? mpeg3_audio_channels( file, stream ) : 0; }
int audioFrequency( int stream ) { return file ? mpeg3_sample_rate( file, stream ) : 0; }
+ int audioBitsPerSample(int) { return 0;}
int audioSamples( int stream ) { return file ? mpeg3_audio_samples( file, stream ) : 0; }
bool audioSetSample( long sample, int stream ) { return file ? mpeg3_set_sample( file, sample, stream) == 1 : FALSE; }
long audioGetSample( int stream ) { return file ? mpeg3_get_sample( file, stream ) : 0; }
-// bool audioReadMonoSamples( short *output, long samples, long& samplesRead, int stream );
-// bool audioReadStereoSamples( short *output, long samples, long& samplesRead, int stream );
+#ifdef OLD_MEDIAPLAYER_API
+ bool audioReadMonoSamples( short *output, long samples, long& samplesRead, int stream );
+ bool audioReadStereoSamples( short *output, long samples, long& samplesRead, int stream );
+ bool audioReadSamples( short *output, int channel, long samples, int stream );
+ bool audioReReadSamples( short *output, int channel, long samples, int stream );
+#else
bool audioReadSamples( short *output, int channels, long samples, long& samplesRead, int stream );
-// bool audioReadSamples( short *output, int channel, long samples, int stream );
-// bool audioReReadSamples( short *output, int channel, long samples, int stream );
+#endif
// If decoder doesn't support video then return 0 here
int videoStreams() { return file ? mpeg3_total_vstreams( file ) : 0; }
int videoWidth( int stream ) { return file ? mpeg3_video_width( file, stream ) : 0; }
int videoHeight( int stream ) { return file ? mpeg3_video_height( file, stream ) : 0; }
double videoFrameRate( int stream ) { return file ? mpeg3_frame_rate( file, stream ) : 0.0; }
@@ -99,12 +107,14 @@ public:
bool supportsYUV() { return TRUE; }
bool supportsMMX() { return TRUE; }
bool supportsSMP() { return TRUE; }
bool supportsStereo() { return TRUE; }
bool supportsScaling() { return TRUE; }
+ long getPlayTime() { return -1; }
+
private:
mpeg3_t *file;
QString strInfo;
};