summaryrefslogtreecommitdiff
path: root/core/multimedia/opieplayer/mediaplayerplugininterface.h
Unidiff
Diffstat (limited to 'core/multimedia/opieplayer/mediaplayerplugininterface.h') (more/less context) (show whitespace changes)
-rw-r--r--core/multimedia/opieplayer/mediaplayerplugininterface.h9
1 files changed, 3 insertions, 6 deletions
diff --git a/core/multimedia/opieplayer/mediaplayerplugininterface.h b/core/multimedia/opieplayer/mediaplayerplugininterface.h
index aeeffde..339b2e4 100644
--- a/core/multimedia/opieplayer/mediaplayerplugininterface.h
+++ b/core/multimedia/opieplayer/mediaplayerplugininterface.h
@@ -11,25 +11,24 @@
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
24#include <qpe/qcom.h> 23#include <qpe/qcom.h>
25 24
26#ifndef QT_NO_COMPONENT 25#ifndef QT_NO_COMPONENT
27// {c0093632-b44c-4cf7-a279-d82fe8a8890c} 26// {c0093632-b44c-4cf7-a279-d82fe8a8890c}
28# ifndef IID_MediaPlayerPlugin 27# ifndef IID_MediaPlayerPlugin
29# define IID_MediaPlayerPlugin QUuid( 0xc0093632, 0xb44c, 0x4cf7, 0xa2, 0x79, 0xd8, 0x2f, 0xe8, 0xa8, 0x89, 0x0c ) 28# define IID_MediaPlayerPlugin QUuid( 0xc0093632, 0xb44c, 0x4cf7, 0xa2, 0x79, 0xd8, 0x2f, 0xe8, 0xa8, 0x89, 0x0c )
30# endif 29# endif
31#endif 30#endif
32 31
33 32
34enum ColorFormat { 33enum ColorFormat {
35 RGB565, 34 RGB565,
@@ -53,30 +52,25 @@ public:
53 virtual bool open( const QString& file ) = 0; 52 virtual bool open( const QString& file ) = 0;
54 virtual bool close() = 0; 53 virtual bool close() = 0;
55 virtual bool isOpen() = 0; 54 virtual bool isOpen() = 0;
56 virtual const QString &fileInfo() = 0; 55 virtual const QString &fileInfo() = 0;
57 56
58 // If decoder doesn't support audio then return 0 here 57 // If decoder doesn't support audio then return 0 here
59 virtual int audioStreams() = 0; 58 virtual int audioStreams() = 0;
60 virtual int audioChannels( int stream ) = 0; 59 virtual int audioChannels( int stream ) = 0;
61 virtual int audioFrequency( int stream ) = 0; 60 virtual int audioFrequency( int stream ) = 0;
62 virtual int audioSamples( int stream ) = 0; 61 virtual int audioSamples( int stream ) = 0;
63 virtual bool audioSetSample( long sample, int stream ) = 0; 62 virtual bool audioSetSample( long sample, int stream ) = 0;
64 virtual long audioGetSample( int stream ) = 0; 63 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;
67 virtual bool audioReadSamples( short *samples, int channels, long samples, long& samplesRead, int stream ) = 0; 64 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;
71 65
72 // If decoder doesn't support video then return 0 here 66 // If decoder doesn't support video then return 0 here
73 virtual int videoStreams() = 0; 67 virtual int videoStreams() = 0;
74 virtual int videoWidth( int stream ) = 0; 68 virtual int videoWidth( int stream ) = 0;
75 virtual int videoHeight( int stream ) = 0; 69 virtual int videoHeight( int stream ) = 0;
76 virtual double videoFrameRate( int stream ) = 0; // frames per second (this may change to frames/1000secs) 70 virtual double videoFrameRate( int stream ) = 0; // frames per second (this may change to frames/1000secs)
77 virtual int videoFrames( int stream ) = 0; 71 virtual int videoFrames( int stream ) = 0;
78 virtual bool videoSetFrame( long sample, int stream ) = 0; 72 virtual bool videoSetFrame( long sample, int stream ) = 0;
79 virtual long videoGetFrame( int stream ) = 0; 73 virtual long videoGetFrame( 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; 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;
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; 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;
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; 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;
@@ -88,24 +82,27 @@ public:
88 virtual bool setSMP( int cpus ) = 0; 82 virtual bool setSMP( int cpus ) = 0;
89 virtual bool setMMX( bool useMMX ) = 0; 83 virtual bool setMMX( bool useMMX ) = 0;
90 84
91 // Capabilities 85 // Capabilities
92 virtual bool supportsAudio() = 0; 86 virtual bool supportsAudio() = 0;
93 virtual bool supportsVideo() = 0; 87 virtual bool supportsVideo() = 0;
94 virtual bool supportsYUV() = 0; 88 virtual bool supportsYUV() = 0;
95 virtual bool supportsMMX() = 0; 89 virtual bool supportsMMX() = 0;
96 virtual bool supportsSMP() = 0; 90 virtual bool supportsSMP() = 0;
97 virtual bool supportsStereo() = 0; 91 virtual bool supportsStereo() = 0;
98 virtual bool supportsScaling() = 0; 92 virtual bool supportsScaling() = 0;
99 93
94 // File Properies
95 virtual long getPlayTime() { return -1; }
96 virtual int audioBitsPerSample( int stream ) = 0;
100}; 97};
101 98
102 99
103class MediaPlayerEncoder; 100class MediaPlayerEncoder;
104 101
105 102
106struct MediaPlayerPluginInterface : public QUnknownInterface 103struct MediaPlayerPluginInterface : public QUnknownInterface
107{ 104{
108 virtual MediaPlayerDecoder *decoder() = 0; 105 virtual MediaPlayerDecoder *decoder() = 0;
109 virtual MediaPlayerEncoder *encoder() = 0; 106 virtual MediaPlayerEncoder *encoder() = 0;
110}; 107};
111 108