Diffstat (limited to 'core/multimedia/opieplayer/libflash/libflashplugin.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/multimedia/opieplayer/libflash/libflashplugin.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/core/multimedia/opieplayer/libflash/libflashplugin.h b/core/multimedia/opieplayer/libflash/libflashplugin.h index a2f1c42..48b512f 100644 --- a/core/multimedia/opieplayer/libflash/libflashplugin.h +++ b/core/multimedia/opieplayer/libflash/libflashplugin.h | |||
@@ -1,98 +1,96 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2001 Trolltech AS. All rights reserved. | 2 | ** Copyright (C) 2001 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 LIBFLASH_PLUGIN_H | 20 | #ifndef LIBFLASH_PLUGIN_H |
21 | #define LIBFLASH_PLUGIN_H | 21 | #define LIBFLASH_PLUGIN_H |
22 | 22 | ||
23 | 23 | ||
24 | #include <qstring.h> | 24 | #include <qstring.h> |
25 | #include <qapplication.h> | 25 | #include <qapplication.h> |
26 | #include "flash.h" | 26 | #include "flash.h" |
27 | //#include <qpe/mediaplayerplugininterface.h> | 27 | #include <qpe/mediaplayerplugininterface.h> |
28 | #include "../mediaplayerplugininterface.h" | ||
29 | 28 | ||
30 | 29 | ||
31 | class LibFlashPlugin : public MediaPlayerDecoder { | 30 | class LibFlashPlugin : public MediaPlayerDecoder { |
32 | 31 | ||
33 | public: | 32 | public: |
34 | LibFlashPlugin(); | 33 | LibFlashPlugin(); |
35 | ~LibFlashPlugin() { close(); } | 34 | ~LibFlashPlugin() { close(); } |
36 | 35 | ||
37 | const char *pluginName() { return "LibFlashPlugin: " PLUGIN_NAME " " FLASH_VERSION_STRING; } | 36 | const char *pluginName() { return "LibFlashPlugin: " PLUGIN_NAME " " FLASH_VERSION_STRING; } |
38 | const char *pluginComment() { return "This is the libflash library: " PLUGIN_NAME " " FLASH_VERSION_STRING; } | 37 | const char *pluginComment() { return "This is the libflash library: " PLUGIN_NAME " " FLASH_VERSION_STRING; } |
39 | double pluginVersion() { return 1.0; } | 38 | double pluginVersion() { return 1.0; } |
40 | 39 | ||
41 | bool isFileSupported( const QString& fileName ) { return fileName.right(4) == ".swf"; } | 40 | bool isFileSupported( const QString& fileName ) { return fileName.right(4) == ".swf"; } |
42 | bool open( const QString& fileName ); | 41 | bool open( const QString& fileName ); |
43 | bool close() { FlashClose( file ); file = NULL; return TRUE; } | 42 | bool close() { FlashClose( file ); file = NULL; return TRUE; } |
44 | bool isOpen() { return file != NULL; } | 43 | bool isOpen() { return file != NULL; } |
45 | const QString &fileInfo() { return strInfo = qApp->translate( "MediaPlayer", "No Information Available", "media plugin text" ); } | 44 | const QString &fileInfo() { return strInfo = qApp->translate( "MediaPlayer", "No Information Available", "media plugin text" ); } |
46 | 45 | ||
47 | // If decoder doesn't support audio then return 0 here | 46 | // If decoder doesn't support audio then return 0 here |
48 | int audioStreams() { return 1; } | 47 | int audioStreams() { return 1; } |
49 | int audioChannels( int /*stream*/ ) { return 2; } | 48 | int audioChannels( int /*stream*/ ) { return 2; } |
50 | int audioFrequency( int /*stream*/ ) { return 44100; } | 49 | int audioFrequency( int /*stream*/ ) { return 44100; } |
51 | int audioSamples( int /*stream*/ ) { return 1000000; } | 50 | int audioSamples( int /*stream*/ ) { return 1000000; } |
52 | int audioBitsPerSample(int) { return 0;} | ||
53 | bool audioSetSample( long sample, int stream ); | 51 | bool audioSetSample( long sample, int stream ); |
54 | long audioGetSample( int stream ); | 52 | long audioGetSample( int stream ); |
55 | //bool audioReadMonoSamples( short *output, long samples, long& samplesRead, int stream ); | 53 | //bool audioReadMonoSamples( short *output, long samples, long& samplesRead, int stream ); |
56 | //bool audioReadStereoSamples( short *output, long samples, long& samplesRead, int stream ); | 54 | //bool audioReadStereoSamples( short *output, long samples, long& samplesRead, int stream ); |
57 | bool audioReadSamples( short *output, int channels, long samples, long& samplesRead, int stream ); | 55 | bool audioReadSamples( short *output, int channels, long samples, long& samplesRead, int stream ); |
58 | //bool audioReadSamples( short *output, int channel, long samples, int stream ); | 56 | //bool audioReadSamples( short *output, int channel, long samples, int stream ); |
59 | //bool audioReReadSamples( short *output, int channel, long samples, int stream ); | 57 | //bool audioReReadSamples( short *output, int channel, long samples, int stream ); |
60 | 58 | ||
61 | // If decoder doesn't support video then return 0 here | 59 | // If decoder doesn't support video then return 0 here |
62 | int videoStreams(); | 60 | int videoStreams(); |
63 | int videoWidth( int stream ); | 61 | int videoWidth( int stream ); |
64 | int videoHeight( int stream ); | 62 | int videoHeight( int stream ); |
65 | double videoFrameRate( int stream ); | 63 | double videoFrameRate( int stream ); |
66 | int videoFrames( int stream ); | 64 | int videoFrames( int stream ); |
67 | bool videoSetFrame( long frame, int stream ); | 65 | bool videoSetFrame( long frame, int stream ); |
68 | long videoGetFrame( int stream ); | 66 | long videoGetFrame( int stream ); |
69 | bool videoReadFrame( unsigned char **output_rows, int in_x, int in_y, int in_w, int in_h, ColorFormat color_model, int stream ); | 67 | bool videoReadFrame( unsigned char **output_rows, int in_x, int in_y, int in_w, int in_h, ColorFormat color_model, int stream ); |
70 | 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 ); | 68 | 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 ); |
71 | 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 ); | 69 | 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 ); |
72 | 70 | ||
73 | // Profiling | 71 | // Profiling |
74 | double getTime(); | 72 | double getTime(); |
75 | 73 | ||
76 | // Ignore if these aren't supported | 74 | // Ignore if these aren't supported |
77 | bool setSMP( int cpus ); | 75 | bool setSMP( int cpus ); |
78 | bool setMMX( bool useMMX ); | 76 | bool setMMX( bool useMMX ); |
79 | 77 | ||
80 | // Capabilities | 78 | // Capabilities |
81 | bool supportsAudio() { return TRUE; } | 79 | bool supportsAudio() { return TRUE; } |
82 | bool supportsVideo() { return TRUE; } | 80 | bool supportsVideo() { return TRUE; } |
83 | bool supportsYUV() { return TRUE; } | 81 | bool supportsYUV() { return TRUE; } |
84 | bool supportsMMX() { return TRUE; } | 82 | bool supportsMMX() { return TRUE; } |
85 | bool supportsSMP() { return TRUE; } | 83 | bool supportsSMP() { return TRUE; } |
86 | bool supportsStereo() { return TRUE; } | 84 | bool supportsStereo() { return TRUE; } |
87 | bool supportsScaling() { return TRUE; } | 85 | bool supportsScaling() { return TRUE; } |
88 | 86 | ||
89 | private: | 87 | private: |
90 | FlashHandle file; | 88 | FlashHandle file; |
91 | FlashDisplay *fd; | 89 | FlashDisplay *fd; |
92 | QString strInfo; | 90 | QString strInfo; |
93 | 91 | ||
94 | }; | 92 | }; |
95 | 93 | ||
96 | 94 | ||
97 | #endif | 95 | #endif |
98 | 96 | ||