summaryrefslogtreecommitdiff
path: root/noncore/multimedia/opieplayer2/lib.cpp
Unidiff
Diffstat (limited to 'noncore/multimedia/opieplayer2/lib.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/lib.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/noncore/multimedia/opieplayer2/lib.cpp b/noncore/multimedia/opieplayer2/lib.cpp
index 96bdb21..4a96408 100644
--- a/noncore/multimedia/opieplayer2/lib.cpp
+++ b/noncore/multimedia/opieplayer2/lib.cpp
@@ -39,29 +39,30 @@
39 39
40#include <qfile.h> 40#include <qfile.h>
41 41
42#include <qgfx_qws.h> 42#include <qgfx_qws.h>
43#include <qdirectpainter_qws.h> 43#include <qdirectpainter_qws.h>
44 44
45#include <assert.h> 45#include <assert.h>
46 46
47#include "xinevideowidget.h" 47#include "xinevideowidget.h"
48#include "frame.h" 48#include "frame.h"
49#include "lib.h" 49#include "lib.h"
50 50
51
51typedef void (*display_xine_frame_t) (void *user_data, uint8_t* frame, 52typedef void (*display_xine_frame_t) (void *user_data, uint8_t* frame,
52 int width, int height,int bytes ); 53 int width, int height,int bytes );
53 54
54extern "C" { 55extern "C" {
55 xine_vo_driver_t* init_video_out_plugin( xine_cfg_entry_t* conf, void* video); 56 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 ); 57 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 ); 58 void null_set_show_video( const xine_vo_driver_t* self, int show );
58 int null_is_fullscreen( const xine_vo_driver_t* self ); 59 int null_is_fullscreen( const xine_vo_driver_t* self );
59 void null_set_fullscreen( const xine_vo_driver_t* self, int screen ); 60 void null_set_fullscreen( const xine_vo_driver_t* self, int screen );
60 int null_is_scaling( const xine_vo_driver_t* self ); 61 int null_is_scaling( const xine_vo_driver_t* self );
61 void null_set_scaling( const xine_vo_driver_t* self, int scale ); 62 void null_set_scaling( const xine_vo_driver_t* self, int scale );
62 void null_set_gui_width( const xine_vo_driver_t* self, int width ); 63 void null_set_gui_width( const xine_vo_driver_t* self, int width );
63 void null_set_gui_height( const xine_vo_driver_t* self, int height ); 64 void null_set_gui_height( const xine_vo_driver_t* self, int height );
64 void null_set_mode( const xine_vo_driver_t* self, int depth, int rgb ); 65 void null_set_mode( const xine_vo_driver_t* self, int depth, int rgb );
65 void null_set_videoGamma( const xine_vo_driver_t* self , int value ); 66 void null_set_videoGamma( const xine_vo_driver_t* self , int value );
66 void null_display_handler( const xine_vo_driver_t* self, display_xine_frame_t t, void* user_data ); 67 void null_display_handler( const xine_vo_driver_t* self, display_xine_frame_t t, void* user_data );
67} 68}
@@ -85,31 +86,31 @@ Lib::Lib( XineVideoWidget* widget ) {
85 f.close(); 86 f.close();
86 } 87 }
87 88
88 m_xine = xine_new( ); 89 m_xine = xine_new( );
89 90
90 xine_config_load( m_xine, str.data() ); 91 xine_config_load( m_xine, str.data() );
91 92
92 xine_init( m_xine ); 93 xine_init( m_xine );
93 94
94 // allocate oss for sound 95 // allocate oss for sound
95 // and fb for framebuffer 96 // and fb for framebuffer
96 m_audioOutput = xine_open_audio_driver( m_xine, "oss", NULL ); 97 m_audioOutput = xine_open_audio_driver( m_xine, "oss", NULL );
97 m_videoOutput = ::init_video_out_plugin( m_config, NULL ); 98 m_videoOutput = ::init_video_out_plugin( m_xine, NULL, xine_display_frame, this );
98 99
99 100
100//xine_open_video_driver( m_xine, NULL, XINE_VISUAL_TYPE_FB, NULL); 101//xine_open_video_driver( m_xine, NULL, XINE_VISUAL_TYPE_FB, NULL);
101 102
102 103
103 null_display_handler( m_videoOutput, xine_display_frame, this ); 104// null_display_handler( m_videoOutput, xine_display_frame, this );
104 105
105 m_stream = xine_stream_new (m_xine, m_audioOutput, m_videoOutput ); 106 m_stream = xine_stream_new (m_xine, m_audioOutput, m_videoOutput );
106 107
107 if (m_wid != 0 ) { 108 if (m_wid != 0 ) {
108 printf( "!0\n" ); 109 printf( "!0\n" );
109 resize ( m_wid-> size ( ) ); 110 resize ( m_wid-> size ( ) );
110 ::null_set_mode( m_videoOutput, qt_screen->depth(), qt_screen->pixelType() ); 111 ::null_set_mode( m_videoOutput, qt_screen->depth(), qt_screen->pixelType() );
111 112
112 m_wid->repaint(); 113 m_wid->repaint();
113 } 114 }
114 115
115 m_queue = xine_event_new_queue (m_stream); 116 m_queue = xine_event_new_queue (m_stream);