summaryrefslogtreecommitdiff
path: root/noncore/multimedia/opieplayer2/lib.cpp
authorzecke <zecke>2004-09-23 21:38:02 (UTC)
committer zecke <zecke>2004-09-23 21:38:02 (UTC)
commit97ab73d99688443d02086b4f00d1de7c81faa3c7 (patch) (unidiff)
tree63864e847abc41442d2ed88ca27a27ad1942c15a /noncore/multimedia/opieplayer2/lib.cpp
parent3080b2095fd9dddc4937cbf74037ce1dbc7fa6b2 (diff)
downloadopie-97ab73d99688443d02086b4f00d1de7c81faa3c7.zip
opie-97ab73d99688443d02086b4f00d1de7c81faa3c7.tar.gz
opie-97ab73d99688443d02086b4f00d1de7c81faa3c7.tar.bz2
-Remove bogus whitespaces
-Remove stl dependency -Make switching from fullscreen video to audio work -Remove debug output
Diffstat (limited to 'noncore/multimedia/opieplayer2/lib.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/lib.cpp39
1 files changed, 9 insertions, 30 deletions
diff --git a/noncore/multimedia/opieplayer2/lib.cpp b/noncore/multimedia/opieplayer2/lib.cpp
index 248221b..8afb318 100644
--- a/noncore/multimedia/opieplayer2/lib.cpp
+++ b/noncore/multimedia/opieplayer2/lib.cpp
@@ -132,17 +132,9 @@ void Lib::initialize()
132 132
133
134//xine_open_video_driver( m_xine, NULL, XINE_VISUAL_TYPE_FB, NULL);
135
136
137// null_display_handler( m_videoOutput, xine_display_frame, this );
138
139 m_stream = xine_stream_new (m_xine, m_audioOutput, m_videoOutput ); 133 m_stream = xine_stream_new (m_xine, m_audioOutput, m_videoOutput );
140 134
141 if (m_wid != 0 ) { 135 if (m_wid != 0 )
142 printf( "!0\n" );
143 setWidget( m_wid ); 136 setWidget( m_wid );
144 }
145 137
146 m_queue = xine_event_new_queue (m_stream);
147 138
139 m_queue = xine_event_new_queue (m_stream);
148 xine_event_create_listener_thread (m_queue, xine_event_handler, this); 140 xine_event_create_listener_thread (m_queue, xine_event_handler, this);
@@ -161,8 +153,6 @@ Lib::~Lib() {
161 xine_close( m_stream ); 153 xine_close( m_stream );
162
163 xine_event_dispose_queue( m_queue ); 154 xine_event_dispose_queue( m_queue );
164
165 xine_dispose( m_stream ); 155 xine_dispose( m_stream );
166
167 xine_exit( m_xine ); 156 xine_exit( m_xine );
157
168 /* FIXME either free or delete but valgrind bitches against both */ 158 /* FIXME either free or delete but valgrind bitches against both */
@@ -201,5 +191,2 @@ int Lib::play( const QString& fileName, int startPos, int start_time ) {
201 assert( m_initialized ); 191 assert( m_initialized );
202 // FIXME actually a hack imho. Should not be needed to dispose the whole stream
203 // but without we get wrong media length reads from libxine for the second media
204 //xine_dispose ( m_stream );
205 192
@@ -207,8 +194,5 @@ int Lib::play( const QString& fileName, int startPos, int start_time ) {
207 194
208 //m_stream = xine_stream_new (m_xine, m_audioOutput, m_videoOutput );
209 //m_queue = xine_event_new_queue (m_stream);
210 //xine_event_create_listener_thread (m_queue, xine_event_handler, this);
211 195
212 if ( !xine_open( m_stream, str.utf8().data() ) ) { 196 if ( !xine_open( m_stream, str.utf8().data() ) ) {
213 return 0; 197 return 0;
214 } 198 }
@@ -219,4 +203,2 @@ void Lib::stop() {
219 assert( m_initialized ); 203 assert( m_initialized );
220
221 odebug << "<<<<<<<< STOP IN LIB TRIGGERED >>>>>>>" << oendl;
222 xine_stop( m_stream ); 204 xine_stop( m_stream );
@@ -260,8 +242,8 @@ int Lib::currentTime() const {
260 int pos, time, length; 242 int pos, time, length;
261 xine_get_pos_length( m_stream, &pos, &time, &length ); 243 pos = time = length = 0;
262 if ( time > 0 ) { 244
245 if ( xine_get_pos_length( m_stream, &pos, &time, &length ) )
263 return time/1000; 246 return time/1000;
264 } else { 247 else
265 return 0; 248 return 0;
266 }
267} 249}
@@ -302,4 +284,2 @@ void Lib::seekTo( int time ) {
302 284
303 //xine_trick_mode ( m_stream, XINE_TRICK_MODE_SEEK_TO_TIME, time ); NOT IMPLEMENTED YET IN XINE :_(
304 // since its now milliseconds we need *1000
305 xine_play( m_stream, 0, time*1000 ); 285 xine_play( m_stream, 0, time*1000 );
@@ -427,3 +407,2 @@ void Lib::drawFrame( uint8_t* frame, int width, int height, int bytes ) {
427 if ( !m_video ) { 407 if ( !m_video ) {
428 owarn << "not showing video now" << oendl;
429 return; 408 return;