Diffstat (limited to 'noncore/multimedia/opieplayer2/lib.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/multimedia/opieplayer2/lib.cpp | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/noncore/multimedia/opieplayer2/lib.cpp b/noncore/multimedia/opieplayer2/lib.cpp index 9f0d448..e3289bc 100644 --- a/noncore/multimedia/opieplayer2/lib.cpp +++ b/noncore/multimedia/opieplayer2/lib.cpp | |||
@@ -11,49 +11,48 @@ | |||
11 | .> <`_, > . <= redistribute it and/or modify it under | 11 | .> <`_, > . <= redistribute it and/or modify it under |
12 | :`=1 )Y*s>-.-- : the terms of the GNU General Public | 12 | :`=1 )Y*s>-.-- : the terms of the GNU General Public |
13 | .="- .-=="i, .._ License as published by the Free Software | 13 | .="- .-=="i, .._ License as published by the Free Software |
14 | - . .-<_> .<> Foundation; either version 2 of the License, | 14 | - . .-<_> .<> Foundation; either version 2 of the License, |
15 | ._= =} : or (at your option) any later version. | 15 | ._= =} : or (at your option) any later version. |
16 | .%`+i> _;_. | 16 | .%`+i> _;_. |
17 | .i_,=:_. -<s. This program is distributed in the hope that | 17 | .i_,=:_. -<s. This program is distributed in the hope that |
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 | #include "xinevideowidget.h" | 34 | #include "xinevideowidget.h" |
35 | #include "frame.h" | ||
36 | #include "lib.h" | 35 | #include "lib.h" |
37 | 36 | ||
38 | /* OPIE */ | 37 | /* OPIE */ |
39 | #include <opie2/odebug.h> | 38 | #include <opie2/odebug.h> |
40 | #include <qpe/global.h> | 39 | #include <qpe/global.h> |
41 | 40 | ||
42 | /* QT */ | 41 | /* QT */ |
43 | #include <qtextstream.h> | 42 | #include <qtextstream.h> |
44 | #include <qdir.h> | 43 | #include <qdir.h> |
45 | #include <qgfx_qws.h> | 44 | #include <qgfx_qws.h> |
46 | 45 | ||
47 | /* STD */ | 46 | /* STD */ |
48 | #include <assert.h> | 47 | #include <assert.h> |
49 | #include <unistd.h> | 48 | #include <unistd.h> |
50 | 49 | ||
51 | typedef void (*display_xine_frame_t) (void *user_data, uint8_t* frame, | 50 | typedef void (*display_xine_frame_t) (void *user_data, uint8_t* frame, |
52 | int width, int height,int bytes ); | 51 | int width, int height,int bytes ); |
53 | 52 | ||
54 | extern "C" { | 53 | extern "C" { |
55 | xine_vo_driver_t* init_video_out_plugin( xine_t *xine, void* video, display_xine_frame_t, void * ); | 54 | xine_vo_driver_t* init_video_out_plugin( xine_t *xine, void* video, display_xine_frame_t, void * ); |
56 | int null_is_showing_video( const xine_vo_driver_t* self ); | 55 | int null_is_showing_video( const xine_vo_driver_t* self ); |
57 | void null_set_show_video( const xine_vo_driver_t* self, int show ); | 56 | void null_set_show_video( const xine_vo_driver_t* self, int show ); |
58 | int null_is_fullscreen( const xine_vo_driver_t* self ); | 57 | int null_is_fullscreen( const xine_vo_driver_t* self ); |
59 | void null_set_fullscreen( const xine_vo_driver_t* self, int screen ); | 58 | void null_set_fullscreen( const xine_vo_driver_t* self, int screen ); |
@@ -286,55 +285,48 @@ unseekable, but it should never occur!! Mr. Murphy ? :) ) */ | |||
286 | 285 | ||
287 | bool Lib::isSeekable() const { | 286 | bool Lib::isSeekable() const { |
288 | assert( m_initialized ); | 287 | assert( m_initialized ); |
289 | 288 | ||
290 | return xine_get_stream_info( m_stream, XINE_STREAM_INFO_SEEKABLE ); | 289 | return xine_get_stream_info( m_stream, XINE_STREAM_INFO_SEEKABLE ); |
291 | } | 290 | } |
292 | 291 | ||
293 | void Lib::seekTo( int time ) { | 292 | void Lib::seekTo( int time ) { |
294 | assert( m_initialized ); | 293 | assert( m_initialized ); |
295 | 294 | ||
296 | odebug << "Seeking to second " << time << oendl; | 295 | odebug << "Seeking to second " << time << oendl; |
297 | //Keep it paused if it was in that state | 296 | //Keep it paused if it was in that state |
298 | if ( xine_get_param( m_stream, XINE_PARAM_SPEED ) ) { | 297 | if ( xine_get_param( m_stream, XINE_PARAM_SPEED ) ) { |
299 | xine_play( m_stream, 0, time*1000 ); | 298 | xine_play( m_stream, 0, time*1000 ); |
300 | } | 299 | } |
301 | 300 | ||
302 | else { | 301 | else { |
303 | xine_play( m_stream, 0, time*1000 ); | 302 | xine_play( m_stream, 0, time*1000 ); |
304 | xine_set_param( m_stream, XINE_PARAM_SPEED, XINE_SPEED_PAUSE ); | 303 | xine_set_param( m_stream, XINE_PARAM_SPEED, XINE_SPEED_PAUSE ); |
305 | } | 304 | } |
306 | 305 | ||
307 | } | 306 | } |
308 | 307 | ||
309 | 308 | ||
310 | Frame Lib::currentFrame() const { | ||
311 | assert( m_initialized ); | ||
312 | |||
313 | Frame frame; | ||
314 | return frame; | ||
315 | }; | ||
316 | |||
317 | QString Lib::metaInfo( int number) const { | 309 | QString Lib::metaInfo( int number) const { |
318 | assert( m_initialized ); | 310 | assert( m_initialized ); |
319 | 311 | ||
320 | return xine_get_meta_info( m_stream, number ); | 312 | return xine_get_meta_info( m_stream, number ); |
321 | } | 313 | } |
322 | 314 | ||
323 | int Lib::error() const { | 315 | int Lib::error() const { |
324 | assert( m_initialized ); | 316 | assert( m_initialized ); |
325 | 317 | ||
326 | return xine_get_error( m_stream ); | 318 | return xine_get_error( m_stream ); |
327 | }; | 319 | }; |
328 | 320 | ||
329 | void Lib::ensureInitialized() | 321 | void Lib::ensureInitialized() |
330 | { | 322 | { |
331 | if ( m_initialized ) | 323 | if ( m_initialized ) |
332 | return; | 324 | return; |
333 | 325 | ||
334 | odebug << "waiting for initialization thread to finish" << oendl; | 326 | odebug << "waiting for initialization thread to finish" << oendl; |
335 | wait(); | 327 | wait(); |
336 | odebug << "initialization thread finished!" << oendl; | 328 | odebug << "initialization thread finished!" << oendl; |
337 | } | 329 | } |
338 | 330 | ||
339 | void Lib::setWidget( XineVideoWidget *widget ) | 331 | void Lib::setWidget( XineVideoWidget *widget ) |
340 | { | 332 | { |