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.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/core/multimedia/opieplayer/mediaplayerplugininterface.h b/core/multimedia/opieplayer/mediaplayerplugininterface.h
index 339b2e4..97e4066 100644
--- a/core/multimedia/opieplayer/mediaplayerplugininterface.h
+++ b/core/multimedia/opieplayer/mediaplayerplugininterface.h
@@ -2,50 +2,54 @@
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 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 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 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
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#include <qpe/qcom.h> 23#include <qpe/qcom.h>
24 24
25#ifndef QT_NO_COMPONENT 25#ifndef QT_NO_COMPONENT
26// {c0093632-b44c-4cf7-a279-d82fe8a8890c} 26# ifndef IID_OpiePlayerPlugin
27// {F56F6CE0-1333-41FD-9B46-C0AF44D0B006}
28# define IID_OpiePlayerPlugin QUuid( 0xF56F6CE0, 0x1333, 0x41FD, 0x9B, 0x46, 0xC0, 0xAF, 0x44, 0xD0, 0xB0, 0x06);
29# endif
27# ifndef IID_MediaPlayerPlugin 30# ifndef IID_MediaPlayerPlugin
31// {c0093632-b44c-4cf7-a279-d82fe8a8890c}
28# define IID_MediaPlayerPlugin QUuid( 0xc0093632, 0xb44c, 0x4cf7, 0xa2, 0x79, 0xd8, 0x2f, 0xe8, 0xa8, 0x89, 0x0c ) 32# define IID_MediaPlayerPlugin QUuid( 0xc0093632, 0xb44c, 0x4cf7, 0xa2, 0x79, 0xd8, 0x2f, 0xe8, 0xa8, 0x89, 0x0c )
29# endif 33# endif
30#endif 34#endif
31 35
32 36
33enum ColorFormat { 37enum ColorFormat {
34 RGB565, 38 RGB565,
35 BGR565, 39 BGR565,
36 RGBA8888, 40 RGBA8888,
37 BGRA8888 41 BGRA8888
38}; 42};
39 43
40 44
41class MediaPlayerDecoder { 45class MediaPlayerDecoder {
42 46
43public: 47public:
44 virtual ~MediaPlayerDecoder() { }; 48 virtual ~MediaPlayerDecoder() { };
45 49
46 // About Plugin 50 // About Plugin
47 virtual const char *pluginName() = 0; 51 virtual const char *pluginName() = 0;
48 virtual const char *pluginComment() = 0; 52 virtual const char *pluginComment() = 0;
49 virtual double pluginVersion() = 0; 53 virtual double pluginVersion() = 0;
50 54
51 virtual bool isFileSupported( const QString& file ) = 0; 55 virtual bool isFileSupported( const QString& file ) = 0;
@@ -72,40 +76,49 @@ public:
72 virtual bool videoSetFrame( long sample, int stream ) = 0; 76 virtual bool videoSetFrame( long sample, int stream ) = 0;
73 virtual long videoGetFrame( int stream ) = 0; 77 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; 78 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; 79 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; 80 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;
77 81
78 // Profiling 82 // Profiling
79 virtual double getTime() = 0; 83 virtual double getTime() = 0;
80 84
81 // Ignore if these aren't supported 85 // Ignore if these aren't supported
82 virtual bool setSMP( int cpus ) = 0; 86 virtual bool setSMP( int cpus ) = 0;
83 virtual bool setMMX( bool useMMX ) = 0; 87 virtual bool setMMX( bool useMMX ) = 0;
84 88
85 // Capabilities 89 // Capabilities
86 virtual bool supportsAudio() = 0; 90 virtual bool supportsAudio() = 0;
87 virtual bool supportsVideo() = 0; 91 virtual bool supportsVideo() = 0;
88 virtual bool supportsYUV() = 0; 92 virtual bool supportsYUV() = 0;
89 virtual bool supportsMMX() = 0; 93 virtual bool supportsMMX() = 0;
90 virtual bool supportsSMP() = 0; 94 virtual bool supportsSMP() = 0;
91 virtual bool supportsStereo() = 0; 95 virtual bool supportsStereo() = 0;
92 virtual bool supportsScaling() = 0; 96 virtual bool supportsScaling() = 0;
93 97
94 // File Properies 98 // File Properies
95 virtual long getPlayTime() { return -1; } 99 virtual long getPlayTime() { return -1; }
100#ifdef IID_OpiePlayerPlugin
96 virtual int audioBitsPerSample( int stream ) = 0; 101 virtual int audioBitsPerSample( int stream ) = 0;
102#endif
97}; 103};
98 104
99 105
100class MediaPlayerEncoder; 106class MediaPlayerEncoder;
101 107
102 108
103struct MediaPlayerPluginInterface : public QUnknownInterface 109struct MediaPlayerPluginInterface : public QUnknownInterface
104{ 110{
105 virtual MediaPlayerDecoder *decoder() = 0; 111 virtual MediaPlayerDecoder *decoder() = 0;
106 virtual MediaPlayerEncoder *encoder() = 0; 112 virtual MediaPlayerEncoder *encoder() = 0;
107}; 113};
108 114
115#ifdef IID_OpiePlayerPlugin
116struct OpiePlayerPluginInterface : public QUnknownInterface
117{
118 virtual MediaPlayerDecoder *decoder() = 0;
119 virtual MediaPlayerEncoder *encoder() = 0;
120};
121#endif
109 122
110#endif 123#endif
111 124