175 m_waitCondition.set(); |
175 m_waitCondition.set(); |
176 } |
176 } |
177 |
177 |
178 void WorkerThread::handleTask() |
178 void WorkerThread::handleTask() |
179 { |
179 { |
180 QMutexLocker locker(Backend::directShowMutex()); |
180 QMutexLocker locker(Backend::directShowMutex); |
181 { |
181 { |
182 QMutexLocker locker(&m_mutex); |
182 QMutexLocker locker(&m_mutex); |
183 if (m_finished || m_queue.isEmpty()) { |
183 if (m_finished || m_queue.isEmpty()) { |
184 return; |
184 return; |
185 } |
185 } |
359 |
359 |
360 for(int i = 0; i < FILTER_COUNT; ++i) { |
360 for(int i = 0; i < FILTER_COUNT; ++i) { |
361 m_graphs[i] = new MediaGraph(this, i); |
361 m_graphs[i] = new MediaGraph(this, i); |
362 } |
362 } |
363 |
363 |
364 connect(&m_thread, SIGNAL(stateReady(Graph, Phonon::State)), |
364 connect(&m_thread, SIGNAL(stateReady(Graph,Phonon::State)), |
365 SLOT(slotStateReady(Graph, Phonon::State))); |
365 SLOT(slotStateReady(Graph,Phonon::State))); |
366 |
366 |
367 connect(&m_thread, SIGNAL(eventReady(Graph, long, long)), |
367 connect(&m_thread, SIGNAL(eventReady(Graph,long,long)), |
368 SLOT(handleEvents(Graph, long, long))); |
368 SLOT(handleEvents(Graph,long,long))); |
369 |
369 |
370 connect(&m_thread, SIGNAL(asyncRenderFinished(quint16, HRESULT, Graph)), |
370 connect(&m_thread, SIGNAL(asyncRenderFinished(quint16,HRESULT,Graph)), |
371 SLOT(finishLoading(quint16, HRESULT, Graph))); |
371 SLOT(finishLoading(quint16,HRESULT,Graph))); |
372 |
372 |
373 connect(&m_thread, SIGNAL(asyncSeekingFinished(quint16, qint64)), |
373 connect(&m_thread, SIGNAL(asyncSeekingFinished(quint16,qint64)), |
374 SLOT(finishSeeking(quint16, qint64))); |
374 SLOT(finishSeeking(quint16,qint64))); |
375 //really special case |
375 //really special case |
376 m_mediaObject = this; |
376 m_mediaObject = this; |
377 m_thread.start(); |
377 m_thread.start(); |
378 } |
378 } |
379 |
379 |