author | kergoth <kergoth> | 2002-01-31 17:03:37 (UTC) |
---|---|---|
committer | kergoth <kergoth> | 2002-01-31 17:03:37 (UTC) |
commit | 48a922e687e82dc8ebe2bc3cb17dcaa8dcae62bd (patch) (unidiff) | |
tree | f9ebebbfabe319b455d6f166b17d4206a15e5ff2 /library | |
parent | d872285d1f6a2e29fabe3604e699eeb62da91a80 (diff) | |
download | opie-48a922e687e82dc8ebe2bc3cb17dcaa8dcae62bd.zip opie-48a922e687e82dc8ebe2bc3cb17dcaa8dcae62bd.tar.gz opie-48a922e687e82dc8ebe2bc3cb17dcaa8dcae62bd.tar.bz2 |
Initial revision
-rw-r--r-- | library/fileselector_p.h | 56 | ||||
-rw-r--r-- | library/mediaplayerplugininterface.h | 110 |
2 files changed, 166 insertions, 0 deletions
diff --git a/library/fileselector_p.h b/library/fileselector_p.h new file mode 100644 index 0000000..6bab485 --- a/dev/null +++ b/library/fileselector_p.h | |||
@@ -0,0 +1,56 @@ | |||
1 | /********************************************************************** | ||
2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. | ||
3 | ** | ||
4 | ** This file is part of Qtopia Environment. | ||
5 | ** | ||
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 | ||
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | ||
9 | ** packaging of this file. | ||
10 | ** | ||
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. | ||
13 | ** | ||
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | ||
15 | ** | ||
16 | ** Contact info@trolltech.com if any conditions of this licensing are | ||
17 | ** not clear to you. | ||
18 | ** | ||
19 | **********************************************************************/ | ||
20 | #ifndef FILESELECTOR_P_H | ||
21 | #define FILESELECTOR_P_H | ||
22 | |||
23 | #include <qlistview.h> | ||
24 | |||
25 | class FileManager; | ||
26 | class CategoryMenu; | ||
27 | class FileSelectorViewPrivate; | ||
28 | |||
29 | class FileSelectorView : public QListView | ||
30 | { | ||
31 | Q_OBJECT | ||
32 | |||
33 | public: | ||
34 | FileSelectorView( const QString &mimefilter, QWidget *parent, const char *name ); | ||
35 | ~FileSelectorView(); | ||
36 | void reread(); | ||
37 | int fileCount() { return count; } | ||
38 | |||
39 | void setCategoryFilter(CategoryMenu *); | ||
40 | protected: | ||
41 | void keyPressEvent( QKeyEvent *e ); | ||
42 | |||
43 | protected slots: | ||
44 | void cardMessage( const QCString &, const QByteArray &); | ||
45 | |||
46 | void categoryChanged(); | ||
47 | |||
48 | private: | ||
49 | QString filter; | ||
50 | FileManager *fileManager; | ||
51 | int count; | ||
52 | FileSelectorViewPrivate *d; | ||
53 | }; | ||
54 | |||
55 | |||
56 | #endif | ||
diff --git a/library/mediaplayerplugininterface.h b/library/mediaplayerplugininterface.h new file mode 100644 index 0000000..4aa28ec --- a/dev/null +++ b/library/mediaplayerplugininterface.h | |||
@@ -0,0 +1,110 @@ | |||
1 | /********************************************************************** | ||
2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. | ||
3 | ** | ||
4 | ** This file is part of Qtopia Environment. | ||
5 | ** | ||
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 | ||
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | ||
9 | ** packaging of this file. | ||
10 | ** | ||
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. | ||
13 | ** | ||
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | ||
15 | ** | ||
16 | ** Contact info@trolltech.com if any conditions of this licensing are | ||
17 | ** not clear to you. | ||
18 | ** | ||
19 | **********************************************************************/ | ||
20 | #ifndef MEDIA_PLAYER_PLUGIN_INTERFACE_H | ||
21 | #define MEDIA_PLAYER_PLUGIN_INTERFACE_H | ||
22 | |||
23 | #include <qpe/qcom.h> | ||
24 | |||
25 | #ifndef QT_NO_COMPONENT | ||
26 | // {c0093632-b44c-4cf7-a279-d82fe8a8890c} | ||
27 | # ifndef IID_MediaPlayerPlugin | ||
28 | # define IID_MediaPlayerPlugin QUuid( 0xc0093632, 0xb44c, 0x4cf7, 0xa2, 0x79, 0xd8, 0x2f, 0xe8, 0xa8, 0x89, 0x0c ) | ||
29 | # endif | ||
30 | #endif | ||
31 | |||
32 | |||
33 | enum ColorFormat { | ||
34 | RGB565, | ||
35 | BGR565, | ||
36 | RGBA8888, | ||
37 | BGRA8888 | ||
38 | }; | ||
39 | |||
40 | |||
41 | class MediaPlayerDecoder { | ||
42 | |||
43 | public: | ||
44 | virtual ~MediaPlayerDecoder() { }; | ||
45 | |||
46 | // About Plugin | ||
47 | virtual const char *pluginName() = 0; | ||
48 | virtual const char *pluginComment() = 0; | ||
49 | virtual double pluginVersion() = 0; | ||
50 | |||
51 | virtual bool isFileSupported( const QString& file ) = 0; | ||
52 | virtual bool open( const QString& file ) = 0; | ||
53 | virtual bool close() = 0; | ||
54 | virtual bool isOpen() = 0; | ||
55 | virtual const QString &fileInfo() = 0; | ||
56 | |||
57 | // If decoder doesn't support audio then return 0 here | ||
58 | virtual int audioStreams() = 0; | ||
59 | virtual int audioChannels( int stream ) = 0; | ||
60 | virtual int audioFrequency( int stream ) = 0; | ||
61 | virtual int audioSamples( int stream ) = 0; | ||
62 | virtual bool audioSetSample( long sample, int stream ) = 0; | ||
63 | virtual long audioGetSample( int stream ) = 0; | ||
64 | virtual bool audioReadSamples( short *samples, int channels, long samples, long& samplesRead, int stream ) = 0; | ||
65 | |||
66 | // If decoder doesn't support video then return 0 here | ||
67 | virtual int videoStreams() = 0; | ||
68 | virtual int videoWidth( int stream ) = 0; | ||
69 | virtual int videoHeight( int stream ) = 0; | ||
70 | virtual double videoFrameRate( int stream ) = 0; // frames per second (this may change to frames/1000secs) | ||
71 | virtual int videoFrames( int stream ) = 0; | ||
72 | virtual bool videoSetFrame( long sample, int stream ) = 0; | ||
73 | 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; | ||
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; | ||
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; | ||
77 | |||
78 | // Profiling | ||
79 | virtual double getTime() = 0; | ||
80 | |||
81 | // Ignore if these aren't supported | ||
82 | virtual bool setSMP( int cpus ) = 0; | ||
83 | virtual bool setMMX( bool useMMX ) = 0; | ||
84 | |||
85 | // Capabilities | ||
86 | virtual bool supportsAudio() = 0; | ||
87 | virtual bool supportsVideo() = 0; | ||
88 | virtual bool supportsYUV() = 0; | ||
89 | virtual bool supportsMMX() = 0; | ||
90 | virtual bool supportsSMP() = 0; | ||
91 | virtual bool supportsStereo() = 0; | ||
92 | virtual bool supportsScaling() = 0; | ||
93 | |||
94 | // File Properies | ||
95 | virtual long getPlayTime() { return -1; } | ||
96 | }; | ||
97 | |||
98 | |||
99 | class MediaPlayerEncoder; | ||
100 | |||
101 | |||
102 | struct MediaPlayerPluginInterface : public QUnknownInterface | ||
103 | { | ||
104 | virtual MediaPlayerDecoder *decoder() = 0; | ||
105 | virtual MediaPlayerEncoder *encoder() = 0; | ||
106 | }; | ||
107 | |||
108 | |||
109 | #endif | ||
110 | |||