blob: 790e1239276465f06280771082cc1c1ee7e1b8b3 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
#ifndef VLCVIDEOWIDGET_H
#define VLCVIDEOWIDGET_H
#include <QFrame>
#include <vlc/vlc.h>
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;
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);
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
|