author | alwin <alwin> | 2005-04-09 21:37:02 (UTC) |
---|---|---|
committer | alwin <alwin> | 2005-04-09 21:37:02 (UTC) |
commit | 274690da3f91a808b77a7b9bf98b6bc09a302fc9 (patch) (unidiff) | |
tree | 7f87991f04a8ad41f2178871f75ba1c2466217c8 | |
parent | af5f26910ae74bd5446db73fd9c870d4aad94f52 (diff) | |
download | opie-274690da3f91a808b77a7b9bf98b6bc09a302fc9.zip opie-274690da3f91a808b77a7b9bf98b6bc09a302fc9.tar.gz opie-274690da3f91a808b77a7b9bf98b6bc09a302fc9.tar.bz2 |
cleanup audio/videooutput the right way
-rw-r--r-- | noncore/multimedia/opieplayer2/lib.cpp | 2 |
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 | |||
@@ -133,48 +133,50 @@ void Lib::initialize() | |||
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 | ||
148 | Lib::~Lib() { | 148 | Lib::~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 | ||
164 | void Lib::resize ( const QSize &s ) { | 166 | void 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 | ||
173 | int Lib::majorVersion() { | 175 | int 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 | ||
179 | int Lib::minorVersion() { | 181 | int Lib::minorVersion() { |
180 | int major, minor, sub; | 182 | int major, minor, sub; |