qtmobility/plugins/multimedia/directshow/player/directshoweventloop.h
changeset 4 90517678cc4f
parent 1 2b40d63a9c3d
child 11 06b8e2af4411
equal deleted inserted replaced
1:2b40d63a9c3d 4:90517678cc4f
    41 
    41 
    42 #ifndef DIRECTSHOWEVENTLOOP_H
    42 #ifndef DIRECTSHOWEVENTLOOP_H
    43 #define DIRECTSHOWEVENTLOOP_H
    43 #define DIRECTSHOWEVENTLOOP_H
    44 
    44 
    45 #include <QtCore/qmutex.h>
    45 #include <QtCore/qmutex.h>
    46 #include <QtCore/private/qwineventnotifier_p.h>
    46 #include <QtCore/qobject.h>
       
    47 #include <QtCore/qwaitcondition.h>
       
    48 
       
    49 #include <windows.h>
    47 
    50 
    48 class DirectShowPostedEvent;
    51 class DirectShowPostedEvent;
    49 
    52 
    50 class DirectShowEventLoop : public QWinEventNotifier
    53 class DirectShowEventLoop : public QObject
    51 {
    54 {
    52     Q_OBJECT
    55     Q_OBJECT
    53 public:
    56 public:
    54     DirectShowEventLoop(QObject *parent = 0);
    57     DirectShowEventLoop(QObject *parent = 0);
    55     ~DirectShowEventLoop();
    58     ~DirectShowEventLoop();
    57     void wait(QMutex *mutex);
    60     void wait(QMutex *mutex);
    58     void wake();
    61     void wake();
    59 
    62 
    60     void postEvent(QObject *object, QEvent *event);
    63     void postEvent(QObject *object, QEvent *event);
    61 
    64 
    62     bool event(QEvent *event);
    65 protected:
       
    66     void customEvent(QEvent *event);
    63 
    67 
    64 private:
    68 private:
    65     void processEvents();
    69     void processEvents();
    66 
    70 
    67     DirectShowPostedEvent *m_postsHead;
    71     DirectShowPostedEvent *m_postsHead;