summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/lib.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/noncore/multimedia/opieplayer2/lib.cpp b/noncore/multimedia/opieplayer2/lib.cpp
index 6ed4cea..9f0d448 100644
--- a/noncore/multimedia/opieplayer2/lib.cpp
+++ b/noncore/multimedia/opieplayer2/lib.cpp
@@ -125,64 +125,66 @@ void Lib::initialize()
125 125
126 xine_init( m_xine ); 126 xine_init( m_xine );
127 127
128 // allocate oss for sound 128 // allocate oss for sound
129 // and fb for framebuffer 129 // and fb for framebuffer
130 m_audioOutput = xine_open_audio_driver( m_xine, "oss", NULL ); 130 m_audioOutput = xine_open_audio_driver( m_xine, "oss", NULL );
131 m_videoOutput = ::init_video_out_plugin( m_xine, NULL, xine_display_frame, this ); 131 m_videoOutput = ::init_video_out_plugin( m_xine, NULL, xine_display_frame, this );
132 132
133 m_stream = xine_stream_new (m_xine, m_audioOutput, m_videoOutput ); 133 m_stream = xine_stream_new (m_xine, m_audioOutput, m_videoOutput );
134 xine_set_param( m_stream, XINE_PARAM_AUDIO_CLOSE_DEVICE, 1); 134 xine_set_param( m_stream, XINE_PARAM_AUDIO_CLOSE_DEVICE, 1);
135 135
136 if (m_wid != 0 ) 136 if (m_wid != 0 )
137 setWidget( m_wid ); 137 setWidget( m_wid );
138 138
139 139
140 m_queue = xine_event_new_queue (m_stream); 140 m_queue = xine_event_new_queue (m_stream);
141 xine_event_create_listener_thread (m_queue, xine_event_handler, this); 141 xine_event_create_listener_thread (m_queue, xine_event_handler, this);
142 142
143 ::null_preload_decoders( m_stream ); 143 ::null_preload_decoders( m_stream );
144 144
145 m_duringInitialization = false; 145 m_duringInitialization = false;
146} 146}
147 147
148Lib::~Lib() { 148Lib::~Lib() {
149 assert( isRunning() == false ); 149 assert( isRunning() == false );
150 assert( m_initialized ); 150 assert( m_initialized );
151 151
152// free( m_config ); 152// free( m_config );
153 153
154 xine_close( m_stream ); 154 xine_close( m_stream );
155 xine_event_dispose_queue( m_queue ); 155 xine_event_dispose_queue( m_queue );
156 xine_dispose( m_stream ); 156 xine_dispose( m_stream );
157 xine_close_audio_driver(m_xine,m_audioOutput);
158 xine_close_video_driver(m_xine,m_videoOutput);
157 xine_exit( m_xine ); 159 xine_exit( m_xine );
158 160
159 /* FIXME either free or delete but valgrind bitches against both */ 161 /* FIXME either free or delete but valgrind bitches against both */
160 //free( m_videoOutput ); 162 //free( m_videoOutput );
161 //delete m_audioOutput; 163 //delete m_audioOutput;
162} 164}
163 165
164void Lib::resize ( const QSize &s ) { 166void Lib::resize ( const QSize &s ) {
165 assert( m_initialized || m_duringInitialization ); 167 assert( m_initialized || m_duringInitialization );
166 168
167 if ( s. width ( ) && s. height ( ) ) { 169 if ( s. width ( ) && s. height ( ) ) {
168 ::null_set_gui_width( m_videoOutput, s. width() ); 170 ::null_set_gui_width( m_videoOutput, s. width() );
169 ::null_set_gui_height( m_videoOutput, s. height() ); 171 ::null_set_gui_height( m_videoOutput, s. height() );
170 } 172 }
171} 173}
172 174
173int Lib::majorVersion() { 175int Lib::majorVersion() {
174 int major, minor, sub; 176 int major, minor, sub;
175 xine_get_version ( &major, &minor, &sub ); 177 xine_get_version ( &major, &minor, &sub );
176 return major; 178 return major;
177} 179}
178 180
179int Lib::minorVersion() { 181int Lib::minorVersion() {
180 int major, minor, sub; 182 int major, minor, sub;
181 xine_get_version ( &major, &minor, &sub ); 183 xine_get_version ( &major, &minor, &sub );
182 return minor; 184 return minor;
183} 185}
184 186
185int Lib::subVersion() { 187int Lib::subVersion() {
186 int major, minor, sub; 188 int major, minor, sub;
187 xine_get_version ( &major, &minor, &sub ); 189 xine_get_version ( &major, &minor, &sub );
188 return sub; 190 return sub;