author | llornkcor <llornkcor> | 2002-02-24 21:51:51 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-02-24 21:51:51 (UTC) |
commit | 36b768c465c6ecddceb57ff1d7a5087e9848c897 (patch) (unidiff) | |
tree | 4ddde589e2393ca136e24cda4fc456612149ae72 /core/multimedia/opieplayer/libmpeg3/libmpeg3plugin.h | |
parent | ade25ac278169f0e0c9ee0771e754adb46cf7ce2 (diff) | |
download | opie-36b768c465c6ecddceb57ff1d7a5087e9848c897.zip opie-36b768c465c6ecddceb57ff1d7a5087e9848c897.tar.gz opie-36b768c465c6ecddceb57ff1d7a5087e9848c897.tar.bz2 |
changed mediaplayerplugininterface.h location
Diffstat (limited to 'core/multimedia/opieplayer/libmpeg3/libmpeg3plugin.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/multimedia/opieplayer/libmpeg3/libmpeg3plugin.h | 22 |
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 | |||
@@ -24,9 +24,13 @@ | |||
24 | #include <qstring.h> | 24 | #include <qstring.h> |
25 | #include <qapplication.h> | 25 | #include <qapplication.h> |
26 | #include "libmpeg3.h" | 26 | #include "libmpeg3.h" |
27 | #include "mpeg3protos.h" | 27 | #include "mpeg3protos.h" |
28 | #include "mediaplayerplugininterface.h" | 28 | //#include <qpe/mediaplayerplugininterface.h> |
29 | #include "../mediaplayerplugininterface.h" | ||
30 | |||
31 | |||
32 | // #define OLD_MEDIAPLAYER_API | ||
29 | 33 | ||
30 | 34 | ||
31 | class LibMpeg3Plugin : public MediaPlayerDecoder { | 35 | class LibMpeg3Plugin : public MediaPlayerDecoder { |
32 | 36 | ||
@@ -41,22 +45,26 @@ public: | |||
41 | bool isFileSupported( const QString& fileName ) { return mpeg3_check_sig( (char *)fileName.latin1() ) == 1; } | 45 | bool isFileSupported( const QString& fileName ) { return mpeg3_check_sig( (char *)fileName.latin1() ) == 1; } |
42 | bool open( const QString& fileName ) { file = mpeg3_open( (char *)fileName.latin1() ); return file != NULL; } | 46 | bool open( const QString& fileName ) { file = mpeg3_open( (char *)fileName.latin1() ); return file != NULL; } |
43 | bool close() { if ( file ) { int r = mpeg3_close( file ); file = NULL; return r == 1; } return FALSE; } | 47 | bool close() { if ( file ) { int r = mpeg3_close( file ); file = NULL; return r == 1; } return FALSE; } |
44 | bool isOpen() { return file != NULL; } | 48 | bool isOpen() { return file != NULL; } |
45 | const QString &fileInfo() { return strInfo = QString( "" ); } | 49 | const QString &fileInfo() { return strInfo = ""; } |
46 | 50 | ||
47 | // If decoder doesn't support audio then return 0 here | 51 | // If decoder doesn't support audio then return 0 here |
48 | int audioStreams() { return file ? mpeg3_total_astreams( file ) : 0; } | 52 | int audioStreams() { return file ? mpeg3_total_astreams( file ) : 0; } |
49 | int audioChannels( int stream ) { return file ? mpeg3_audio_channels( file, stream ) : 0; } | 53 | int audioChannels( int stream ) { return file ? mpeg3_audio_channels( file, stream ) : 0; } |
50 | int audioFrequency( int stream ) { return file ? mpeg3_sample_rate( file, stream ) : 0; } | 54 | int audioFrequency( int stream ) { return file ? mpeg3_sample_rate( file, stream ) : 0; } |
55 | int audioBitsPerSample(int) { return 0;} | ||
51 | int audioSamples( int stream ) { return file ? mpeg3_audio_samples( file, stream ) : 0; } | 56 | int audioSamples( int stream ) { return file ? mpeg3_audio_samples( file, stream ) : 0; } |
52 | bool audioSetSample( long sample, int stream ) { return file ? mpeg3_set_sample( file, sample, stream) == 1 : FALSE; } | 57 | bool audioSetSample( long sample, int stream ) { return file ? mpeg3_set_sample( file, sample, stream) == 1 : FALSE; } |
53 | long audioGetSample( int stream ) { return file ? mpeg3_get_sample( file, stream ) : 0; } | 58 | long audioGetSample( int stream ) { return file ? mpeg3_get_sample( file, stream ) : 0; } |
54 | // bool audioReadMonoSamples( short *output, long samples, long& samplesRead, int stream ); | 59 | #ifdef OLD_MEDIAPLAYER_API |
55 | // bool audioReadStereoSamples( short *output, long samples, long& samplesRead, int stream ); | 60 | bool audioReadMonoSamples( short *output, long samples, long& samplesRead, int stream ); |
61 | bool audioReadStereoSamples( short *output, long samples, long& samplesRead, int stream ); | ||
62 | bool audioReadSamples( short *output, int channel, long samples, int stream ); | ||
63 | bool audioReReadSamples( short *output, int channel, long samples, int stream ); | ||
64 | #else | ||
56 | bool audioReadSamples( short *output, int channels, long samples, long& samplesRead, int stream ); | 65 | bool audioReadSamples( short *output, int channels, long samples, long& samplesRead, int stream ); |
57 | // bool audioReadSamples( short *output, int channel, long samples, int stream ); | 66 | #endif |
58 | // bool audioReReadSamples( short *output, int channel, long samples, int stream ); | ||
59 | 67 | ||
60 | // If decoder doesn't support video then return 0 here | 68 | // If decoder doesn't support video then return 0 here |
61 | int videoStreams() { return file ? mpeg3_total_vstreams( file ) : 0; } | 69 | int videoStreams() { return file ? mpeg3_total_vstreams( file ) : 0; } |
62 | int videoWidth( int stream ) { return file ? mpeg3_video_width( file, stream ) : 0; } | 70 | int videoWidth( int stream ) { return file ? mpeg3_video_width( file, stream ) : 0; } |
@@ -101,8 +109,10 @@ public: | |||
101 | bool supportsSMP() { return TRUE; } | 109 | bool supportsSMP() { return TRUE; } |
102 | bool supportsStereo() { return TRUE; } | 110 | bool supportsStereo() { return TRUE; } |
103 | bool supportsScaling() { return TRUE; } | 111 | bool supportsScaling() { return TRUE; } |
104 | 112 | ||
113 | long getPlayTime() { return -1; } | ||
114 | |||
105 | private: | 115 | private: |
106 | mpeg3_t *file; | 116 | mpeg3_t *file; |
107 | QString strInfo; | 117 | QString strInfo; |
108 | 118 | ||