Diffstat (limited to 'noncore/multimedia/opieplayer2/lib.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/multimedia/opieplayer2/lib.h | 28 |
1 files changed, 24 insertions, 4 deletions
diff --git a/noncore/multimedia/opieplayer2/lib.h b/noncore/multimedia/opieplayer2/lib.h index b9d0a8a..29adc4d 100644 --- a/noncore/multimedia/opieplayer2/lib.h +++ b/noncore/multimedia/opieplayer2/lib.h | |||
@@ -18,136 +18,156 @@ | |||
18 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 18 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
19 | : .. .:, . . . without even the implied warranty of | 19 | : .. .:, . . . without even the implied warranty of |
20 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 20 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A |
21 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | 21 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU |
22 | ..}^=.= = ; Library General Public License for more | 22 | ..}^=.= = ; Library General Public License for more |
23 | ++= -. .` .: details. | 23 | ++= -. .` .: details. |
24 | : = ...= . :.=- | 24 | : = ...= . :.=- |
25 | -. .:....=;==+<; You should have received a copy of the GNU | 25 | -. .:....=;==+<; You should have received a copy of the GNU |
26 | -_. . . )=. = Library General Public License along with | 26 | -_. . . )=. = Library General Public License along with |
27 | -- :-=` this library; see the file COPYING.LIB. | 27 | -- :-=` this library; see the file COPYING.LIB. |
28 | If not, write to the Free Software Foundation, | 28 | If not, write to the Free Software Foundation, |
29 | Inc., 59 Temple Place - Suite 330, | 29 | Inc., 59 Temple Place - Suite 330, |
30 | Boston, MA 02111-1307, USA. | 30 | Boston, MA 02111-1307, USA. |
31 | 31 | ||
32 | */ | 32 | */ |
33 | 33 | ||
34 | #ifndef ZECKEXINELIB_H | 34 | #ifndef ZECKEXINELIB_H |
35 | #define ZECKEXINELIB_H | 35 | #define ZECKEXINELIB_H |
36 | 36 | ||
37 | #include <qcstring.h> | 37 | #include <qcstring.h> |
38 | #include <qstring.h> | 38 | #include <qstring.h> |
39 | #include <qobject.h> | 39 | #include <qobject.h> |
40 | 40 | ||
41 | #include <xine.h> | 41 | #include <xine.h> |
42 | //#include "xine.h" | ||
42 | 43 | ||
43 | class XineVideoWidget; | 44 | class XineVideoWidget; |
44 | 45 | ||
45 | namespace XINE { | 46 | namespace XINE { |
46 | 47 | ||
47 | /** | 48 | /** |
48 | * Lib wrapps the simple interface | 49 | * Lib wrapps the simple interface |
49 | * of libxine for easy every day use | 50 | * of libxine for easy every day use |
50 | * This will become a full C++ Wrapper | 51 | * This will become a full C++ Wrapper |
51 | * It supports playing, pausing, info, | 52 | * It supports playing, pausing, info, |
52 | * stooping, seeking. | 53 | * stooping, seeking. |
53 | */ | 54 | */ |
54 | class Frame; | 55 | class Frame; |
55 | class Lib : public QObject { | 56 | class Lib : public QObject { |
56 | Q_OBJECT | 57 | Q_OBJECT |
57 | public: | 58 | public: |
58 | Lib(XineVideoWidget* = 0); | 59 | Lib(XineVideoWidget* = 0); |
59 | ~Lib(); | 60 | ~Lib(); |
60 | QCString version(); | 61 | QCString version(); |
61 | int majorVersion()/*const*/; | 62 | int majorVersion()/*const*/; |
62 | int minorVersion()/*const*/; | 63 | int minorVersion()/*const*/; |
63 | int subVersion()/*const*/; | 64 | int subVersion()/*const*/; |
64 | 65 | ||
65 | 66 | ||
66 | void resize ( const QSize &s ); | 67 | void resize ( const QSize &s ); |
67 | 68 | ||
68 | int play( const QString& fileName, | 69 | int play( const QString& fileName, |
69 | int startPos = 0, | 70 | int startPos = 0, |
70 | int start_time = 0 ); | 71 | int start_time = 0 ); |
71 | void stop() /*const*/; | 72 | void stop() /*const*/; |
72 | void pause()/*const*/; | 73 | void pause()/*const*/; |
73 | 74 | ||
74 | int speed() /*const*/; | 75 | int speed() /*const*/; |
75 | void setSpeed( int speed = SPEED_PAUSE ); | 76 | |
77 | /** | ||
78 | * Set the speed of the stream, if codec supports it | ||
79 | * XINE_SPEED_PAUSE 0 | ||
80 | * XINE_SPEED_SLOW_4 1 | ||
81 | * XINE_SPEED_SLOW_2 2 | ||
82 | * XINE_SPEED_NORMAL 4 | ||
83 | * XINE_SPEED_FAST_2 8 | ||
84 | *XINE_SPEED_FAST_4 16 | ||
85 | */ | ||
86 | void setSpeed( int speed = XINE_SPEED_PAUSE ); | ||
76 | 87 | ||
77 | int status() /*const*/; | 88 | int status() /*const*/; |
78 | 89 | ||
79 | int currentPosition()/*const*/; | 90 | int currentPosition()/*const*/; |
80 | //in seconds | 91 | //in seconds |
81 | int currentTime()/*const*/; | 92 | int currentTime()/*const*/; |
82 | int length() /*const*/; | 93 | int length() /*const*/; |
83 | 94 | ||
84 | bool isSeekable()/*const*/; | 95 | bool isSeekable()/*const*/; |
85 | 96 | ||
86 | /** | 97 | /** |
87 | * Whether or not to show video output | 98 | * Whether or not to show video output |
88 | */ | 99 | */ |
89 | void setShowVideo(bool video); | 100 | void setShowVideo(bool video); |
90 | 101 | ||
91 | /** | 102 | /** |
92 | * is we show video | 103 | * is we show video |
93 | */ | 104 | */ |
94 | bool isShowingVideo() /*const*/; | 105 | bool isShowingVideo() /*const*/; |
95 | 106 | ||
96 | /** | 107 | /** |
97 | * | 108 | * |
98 | */ | 109 | */ |
99 | void showVideoFullScreen( bool fullScreen ); | 110 | void showVideoFullScreen( bool fullScreen ); |
100 | 111 | ||
101 | /** | 112 | /** |
102 | * | 113 | * |
103 | */ | 114 | */ |
104 | bool isVideoFullScreen()/*const*/ ; | 115 | bool isVideoFullScreen()/*const*/ ; |
105 | 116 | ||
117 | |||
118 | /** | ||
119 | * Get the meta info (like author etc) from the stream | ||
120 | * | ||
121 | */ | ||
122 | QString metaInfo() ; | ||
123 | |||
106 | /** | 124 | /** |
107 | * | 125 | * |
108 | */ | 126 | */ |
109 | bool isScaling(); | 127 | bool isScaling(); |
110 | 128 | ||
111 | /** | 129 | /** |
112 | * | 130 | * |
113 | */ | 131 | */ |
114 | void setScaling( bool ); | 132 | void setScaling( bool ); |
115 | 133 | ||
116 | /** | 134 | /** |
117 | * Set the Gamma value for video output | 135 | * Set the Gamma value for video output |
118 | * @param int the value between -100 and 100, 0 is original | 136 | * @param int the value between -100 and 100, 0 is original |
119 | */ | 137 | */ |
120 | void setGamma( int ); | 138 | void setGamma( int ); |
121 | 139 | ||
122 | /** | 140 | /** |
123 | * test | 141 | * test |
124 | */ | 142 | */ |
125 | Frame currentFrame()/*const*/; | 143 | Frame currentFrame()/*const*/; |
126 | 144 | ||
127 | /** | 145 | /** |
128 | * Returns the error code | 146 | * Returns the error code |
129 | */ | 147 | */ |
130 | int error() /*const*/; | 148 | int error() /*const*/; |
131 | 149 | ||
132 | signals: | 150 | signals: |
133 | void stopped(); | 151 | void stopped(); |
134 | private: | 152 | private: |
135 | int m_bytes_per_pixel; | 153 | int m_bytes_per_pixel; |
154 | int m_length, m_pos, m_time; | ||
155 | int m_major_version, m_minor_version, m_sub_version; | ||
136 | bool m_video:1; | 156 | bool m_video:1; |
137 | XineVideoWidget *m_wid; | 157 | XineVideoWidget *m_wid; |
138 | xine_t *m_xine; | 158 | xine_t *m_xine; |
139 | config_values_t *m_config; | 159 | xine_cfg_entry_t *m_config; |
140 | vo_driver_t *m_videoOutput; | 160 | xine_vo_driver_t *m_videoOutput; |
141 | ao_driver_t* m_audioOutput; | 161 | xine_ao_driver_t* m_audioOutput; |
142 | 162 | ||
143 | void handleXineEvent( xine_event_t* t ); | 163 | void handleXineEvent( xine_event_t* t ); |
144 | void drawFrame( uint8_t* frame, int width, int height, int bytes ); | 164 | void drawFrame( uint8_t* frame, int width, int height, int bytes ); |
145 | // C -> C++ bridge for the event system | 165 | // C -> C++ bridge for the event system |
146 | static void xine_event_handler( void* user_data, xine_event_t* t); | 166 | static void xine_event_handler( void* user_data, xine_event_t* t); |
147 | static void xine_display_frame( void* user_data, uint8_t* frame , | 167 | static void xine_display_frame( void* user_data, uint8_t* frame , |
148 | int width, int height, int bytes ); | 168 | int width, int height, int bytes ); |
149 | }; | 169 | }; |
150 | }; | 170 | }; |
151 | 171 | ||
152 | 172 | ||
153 | #endif | 173 | #endif |