summaryrefslogtreecommitdiff
path: root/core/multimedia/opieplayer/mediaplayerplugininterface.h
Unidiff
Diffstat (limited to 'core/multimedia/opieplayer/mediaplayerplugininterface.h') (more/less context) (ignore whitespace changes)
-rw-r--r--core/multimedia/opieplayer/mediaplayerplugininterface.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/core/multimedia/opieplayer/mediaplayerplugininterface.h b/core/multimedia/opieplayer/mediaplayerplugininterface.h
index 339b2e4..aeeffde 100644
--- a/core/multimedia/opieplayer/mediaplayerplugininterface.h
+++ b/core/multimedia/opieplayer/mediaplayerplugininterface.h
@@ -11,24 +11,25 @@
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 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. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20#ifndef MEDIA_PLAYER_PLUGIN_INTERFACE_H 20#ifndef MEDIA_PLAYER_PLUGIN_INTERFACE_H
21#define MEDIA_PLAYER_PLUGIN_INTERFACE_H 21#define MEDIA_PLAYER_PLUGIN_INTERFACE_H
22 22
23
23#include <qpe/qcom.h> 24#include <qpe/qcom.h>
24 25
25#ifndef QT_NO_COMPONENT 26#ifndef QT_NO_COMPONENT
26// {c0093632-b44c-4cf7-a279-d82fe8a8890c} 27// {c0093632-b44c-4cf7-a279-d82fe8a8890c}
27# ifndef IID_MediaPlayerPlugin 28# ifndef IID_MediaPlayerPlugin
28# define IID_MediaPlayerPlugin QUuid( 0xc0093632, 0xb44c, 0x4cf7, 0xa2, 0x79, 0xd8, 0x2f, 0xe8, 0xa8, 0x89, 0x0c ) 29# define IID_MediaPlayerPlugin QUuid( 0xc0093632, 0xb44c, 0x4cf7, 0xa2, 0x79, 0xd8, 0x2f, 0xe8, 0xa8, 0x89, 0x0c )
29# endif 30# endif
30#endif 31#endif
31 32
32 33
33enum ColorFormat { 34enum ColorFormat {
34 RGB565, 35 RGB565,
@@ -52,25 +53,30 @@ public:
52 virtual bool open( const QString& file ) = 0; 53 virtual bool open( const QString& file ) = 0;
53 virtual bool close() = 0; 54 virtual bool close() = 0;
54 virtual bool isOpen() = 0; 55 virtual bool isOpen() = 0;
55 virtual const QString &fileInfo() = 0; 56 virtual const QString &fileInfo() = 0;
56 57
57 // If decoder doesn't support audio then return 0 here 58 // If decoder doesn't support audio then return 0 here
58 virtual int audioStreams() = 0; 59 virtual int audioStreams() = 0;
59 virtual int audioChannels( int stream ) = 0; 60 virtual int audioChannels( int stream ) = 0;
60 virtual int audioFrequency( int stream ) = 0; 61 virtual int audioFrequency( int stream ) = 0;
61 virtual int audioSamples( int stream ) = 0; 62 virtual int audioSamples( int stream ) = 0;
62 virtual bool audioSetSample( long sample, int stream ) = 0; 63 virtual bool audioSetSample( long sample, int stream ) = 0;
63 virtual long audioGetSample( int stream ) = 0; 64 virtual long audioGetSample( int stream ) = 0;
65// virtual bool audioReadMonoSamples( short *samples, long samples, long& samplesRead, int stream ) = 0;
66// virtual bool audioReadStereoSamples( short *samples, long samples, long& samplesRead, int stream ) = 0;
64 virtual bool audioReadSamples( short *samples, int channels, long samples, long& samplesRead, int stream ) = 0; 67 virtual bool audioReadSamples( short *samples, int channels, long samples, long& samplesRead, int stream ) = 0;
68 // Libmpeg3 functions, perhaps good for reading an audio file with 5 channels or something!
69// virtual bool audioReadSamples( short *samples, int channel, long samples, int stream ) = 0;
70// virtual bool audioReReadSamples( short *samples, int channel, long samples, int stream ) = 0;
65 71
66 // If decoder doesn't support video then return 0 here 72 // If decoder doesn't support video then return 0 here
67 virtual int videoStreams() = 0; 73 virtual int videoStreams() = 0;
68 virtual int videoWidth( int stream ) = 0; 74 virtual int videoWidth( int stream ) = 0;
69 virtual int videoHeight( int stream ) = 0; 75 virtual int videoHeight( int stream ) = 0;
70 virtual double videoFrameRate( int stream ) = 0; // frames per second (this may change to frames/1000secs) 76 virtual double videoFrameRate( int stream ) = 0; // frames per second (this may change to frames/1000secs)
71 virtual int videoFrames( int stream ) = 0; 77 virtual int videoFrames( int stream ) = 0;
72 virtual bool videoSetFrame( long sample, int stream ) = 0; 78 virtual bool videoSetFrame( long sample, int stream ) = 0;
73 virtual long videoGetFrame( int stream ) = 0; 79 virtual long videoGetFrame( int stream ) = 0;
74 virtual bool videoReadFrame( unsigned char **output_rows, int in_x, int in_y, int in_w, int in_h, ColorFormat color_model, int stream ) = 0; 80 virtual bool videoReadFrame( unsigned char **output_rows, int in_x, int in_y, int in_w, int in_h, ColorFormat color_model, int stream ) = 0;
75 virtual bool videoReadScaledFrame( unsigned char **output_rows, int in_x, int in_y, int in_w, int in_h, int out_w, int out_h, ColorFormat color_model, int stream ) = 0; 81 virtual bool videoReadScaledFrame( unsigned char **output_rows, int in_x, int in_y, int in_w, int in_h, int out_w, int out_h, ColorFormat color_model, int stream ) = 0;
76 virtual bool videoReadYUVFrame( char *y_output, char *u_output, char *v_output, int in_x, int in_y, int in_w, int in_h, int stream ) = 0; 82 virtual bool videoReadYUVFrame( char *y_output, char *u_output, char *v_output, int in_x, int in_y, int in_w, int in_h, int stream ) = 0;
@@ -82,27 +88,24 @@ public:
82 virtual bool setSMP( int cpus ) = 0; 88 virtual bool setSMP( int cpus ) = 0;
83 virtual bool setMMX( bool useMMX ) = 0; 89 virtual bool setMMX( bool useMMX ) = 0;
84 90
85 // Capabilities 91 // Capabilities
86 virtual bool supportsAudio() = 0; 92 virtual bool supportsAudio() = 0;
87 virtual bool supportsVideo() = 0; 93 virtual bool supportsVideo() = 0;
88 virtual bool supportsYUV() = 0; 94 virtual bool supportsYUV() = 0;
89 virtual bool supportsMMX() = 0; 95 virtual bool supportsMMX() = 0;
90 virtual bool supportsSMP() = 0; 96 virtual bool supportsSMP() = 0;
91 virtual bool supportsStereo() = 0; 97 virtual bool supportsStereo() = 0;
92 virtual bool supportsScaling() = 0; 98 virtual bool supportsScaling() = 0;
93 99
94 // File Properies
95 virtual long getPlayTime() { return -1; }
96 virtual int audioBitsPerSample( int stream ) = 0;
97}; 100};
98 101
99 102
100class MediaPlayerEncoder; 103class MediaPlayerEncoder;
101 104
102 105
103struct MediaPlayerPluginInterface : public QUnknownInterface 106struct MediaPlayerPluginInterface : public QUnknownInterface
104{ 107{
105 virtual MediaPlayerDecoder *decoder() = 0; 108 virtual MediaPlayerDecoder *decoder() = 0;
106 virtual MediaPlayerEncoder *encoder() = 0; 109 virtual MediaPlayerEncoder *encoder() = 0;
107}; 110};
108 111