summaryrefslogtreecommitdiff
authorharlekin <harlekin>2002-08-16 17:24:43 (UTC)
committer harlekin <harlekin>2002-08-16 17:24:43 (UTC)
commit472245d285824e7bebe1ee66d03580b1f40ae1d6 (patch) (unidiff)
tree353af483361634e376f55d0eb014127243dda44c
parent754897cab228ab41ab317218a523b28003c285a8 (diff)
downloadopie-472245d285824e7bebe1ee66d03580b1f40ae1d6.zip
opie-472245d285824e7bebe1ee66d03580b1f40ae1d6.tar.gz
opie-472245d285824e7bebe1ee66d03580b1f40ae1d6.tar.bz2
now, finally
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/lib.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/multimedia/opieplayer2/lib.cpp b/noncore/multimedia/opieplayer2/lib.cpp
index 3848652..39364ab 100644
--- a/noncore/multimedia/opieplayer2/lib.cpp
+++ b/noncore/multimedia/opieplayer2/lib.cpp
@@ -33,97 +33,97 @@
33 33
34#include <stdio.h> 34#include <stdio.h>
35#include <stdlib.h> 35#include <stdlib.h>
36#include <qimage.h> 36#include <qimage.h>
37#include <qtextstream.h> 37#include <qtextstream.h>
38#include <qpe/resource.h> 38#include <qpe/resource.h>
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 "xinevideowidget.h" 45#include "xinevideowidget.h"
46#include "frame.h" 46#include "frame.h"
47#include "lib.h" 47#include "lib.h"
48 48
49typedef void (*display_xine_frame_t) (void *user_data, uint8_t* frame, 49typedef void (*display_xine_frame_t) (void *user_data, uint8_t* frame,
50 int width, int height,int bytes ); 50 int width, int height,int bytes );
51 51
52extern "C" { 52extern "C" {
53 vo_driver_t* init_video_out_plugin( config_values_t* conf, void* video); 53 vo_driver_t* init_video_out_plugin( config_values_t* conf, void* video);
54 int null_is_showing_video( vo_driver_t* self ); 54 int null_is_showing_video( vo_driver_t* self );
55 void null_set_show_video( vo_driver_t* self, int show ); 55 void null_set_show_video( vo_driver_t* self, int show );
56 int null_is_fullscreen( vo_driver_t* self ); 56 int null_is_fullscreen( vo_driver_t* self );
57 void null_set_fullscreen( vo_driver_t* self, int screen ); 57 void null_set_fullscreen( vo_driver_t* self, int screen );
58 int null_is_scaling( vo_driver_t* self ); 58 int null_is_scaling( vo_driver_t* self );
59 void null_set_scaling( vo_driver_t* self, int scale ); 59 void null_set_scaling( vo_driver_t* self, int scale );
60 void null_set_gui_width( vo_driver_t* self, int width ); 60 void null_set_gui_width( vo_driver_t* self, int width );
61 void null_set_gui_height( vo_driver_t* self, int height ); 61 void null_set_gui_height( vo_driver_t* self, int height );
62 void null_set_mode( vo_driver_t* self, int depth, int rgb ); 62 void null_set_mode( vo_driver_t* self, int depth, int rgb );
63 void null_display_handler(vo_driver_t* self, display_xine_frame_t t, void* user_data); 63 void null_display_handler(vo_driver_t* self, display_xine_frame_t t, void* user_data);
64} 64}
65 65
66using namespace XINE; 66using namespace XINE;
67 67
68Lib::Lib(XineVideoWidget* widget) { 68Lib::Lib(XineVideoWidget* widget) {
69 m_video = false; 69 m_video = false;
70 m_wid = widget; 70 m_wid = widget;
71 printf("Lib"); 71 printf("Lib");
72 QCString str( getenv("HOME") ); 72 QCString str( getenv("HOME") );
73 str += "/Settings/opiexine.cf"; 73 str += "/Settings/opiexine.cf";
74 // get the configuration 74 // get the configuration
75 75
76 // not really OO, should be an extra class, later 76 // not really OO, should be an extra class, later
77 if ( !QFile(str).exists() ) { 77 if ( !QFile(str).exists() ) {
78 QFile f(str); 78 QFile f(str);
79 f.open(IO_WriteOnly); 79 f.open(IO_WriteOnly);
80 QTextStream ts( &f ); 80 QTextStream ts( &f );
81 ts << "misc.memcpy_method:glibc \n"; 81 ts << "misc.memcpy_method:glibc\n";
82 f.close(); 82 f.close();
83 } 83 }
84 84
85 m_config = xine_config_file_init( str.data() ); 85 m_config = xine_config_file_init( str.data() );
86 86
87 // allocate oss for sound 87 // allocate oss for sound
88 // and fb for framebuffer 88 // and fb for framebuffer
89 m_audioOutput= xine_load_audio_output_plugin( m_config, "oss") ; 89 m_audioOutput= xine_load_audio_output_plugin( m_config, "oss") ;
90 if (m_audioOutput == NULL ) 90 if (m_audioOutput == NULL )
91 printf("Failure\n"); 91 printf("Failure\n");
92 else 92 else
93 printf("Success\n"); 93 printf("Success\n");
94 94
95 95
96 // test code 96 // test code
97/* m_videoOutput = xine_load_video_output_plugin(m_config, "fb", 97/* m_videoOutput = xine_load_video_output_plugin(m_config, "fb",
98 VISUAL_TYPE_FB, 98 VISUAL_TYPE_FB,
99 0 ); 99 0 );
100*/ 100*/
101 101
102 char** files = xine_list_video_output_plugins(3); 102 char** files = xine_list_video_output_plugins(3);
103 char* out; 103 char* out;
104 int i = 0; 104 int i = 0;
105 while ( ( out = files[i] ) != 0 ) { 105 while ( ( out = files[i] ) != 0 ) {
106 printf("Video %s\n", out ); 106 printf("Video %s\n", out );
107 i++; 107 i++;
108 } 108 }
109// m_xine = xine_init( m_videoOutput, 109// m_xine = xine_init( m_videoOutput,
110// m_audioOutput, 110// m_audioOutput,
111// m_config ); 111// m_config );
112 // test loading 112 // test loading
113 m_videoOutput = ::init_video_out_plugin( m_config, NULL ); 113 m_videoOutput = ::init_video_out_plugin( m_config, NULL );
114 if (m_wid != 0 ) { 114 if (m_wid != 0 ) {
115 printf("!0\n" ); 115 printf("!0\n" );
116 resize ( m_wid-> size ( )); 116 resize ( m_wid-> size ( ));
117 ::null_set_mode( m_videoOutput, qt_screen->depth(), qt_screen->pixelType() ); 117 ::null_set_mode( m_videoOutput, qt_screen->depth(), qt_screen->pixelType() );
118 m_wid-> setImage ( new QImage ( Resource::loadImage(""))); 118 m_wid-> setImage ( new QImage ( Resource::loadImage("")));
119 m_wid->repaint(); 119 m_wid->repaint();
120 } 120 }
121 null_display_handler( m_videoOutput, 121 null_display_handler( m_videoOutput,
122 xine_display_frame, 122 xine_display_frame,
123 this ); 123 this );
124 124
125 m_xine = xine_init( m_videoOutput, 125 m_xine = xine_init( m_videoOutput,
126 m_audioOutput, m_config ); 126 m_audioOutput, m_config );
127 // install the event handler 127 // install the event handler
128 xine_register_event_listener( m_xine, xine_event_handler, this ); 128 xine_register_event_listener( m_xine, xine_event_handler, this );
129} 129}