#ifndef VLCVIDEOWIDGET_H #define VLCVIDEOWIDGET_H #include #include #include class VLCVideoWidget : public QFrame { Q_OBJECT public: VLCVideoWidget(QWidget *parent = 0); ~VLCVideoWidget(); QString source() const; qint64 length() const; qint64 time() const; float position() const; int chapter() const; int chapterCount() const; bool willPlay() const; int chapterCountForTitle(int title) const; int title() const; bool isPlaying() const; int titleCount() const; float fps() const; libvlc_state_t state() const; float rate() const; bool isSeekable() const; bool canPause() const; bool hasVideoOut() const; virtual QSize sizeHint() const; int width() const; int height() const; QImage currentFrameImage() const; public slots: bool setSource(const QString &source); bool play(); bool pause(); bool stop(); bool setTime(qint64 time); bool setPosition(float position); bool setChapter(int chapter); bool setTitle(int title); bool moveToPreviousChapter(); bool moveToNextChapter(); bool setRate(float rate); private: libvlc_media_player_t *m_mediaPlayer; libvlc_media_t *m_media; libvlc_event_manager_t *m_eventManager; static void vlcCallbacks(const libvlc_event_t* event, void* ptr); private slots: bool attachVideoDisplay(); signals: void opening(); void buffering(); void playing(); void paused(); void stopped(); void forward(); void backward(); void endReached(); void error(); void timeChanged(); void positionChanged(); void seekableChanged(); void pausableChanged(); void titleChanged(); void snapshotTaken(); }; #endif // VLCVIDEOWIDGET_H