67 virtual ~QGstreamerPlayerSession(); |
67 virtual ~QGstreamerPlayerSession(); |
68 |
68 |
69 QUrl url() const; |
69 QUrl url() const; |
70 |
70 |
71 QMediaPlayer::State state() const { return m_state; } |
71 QMediaPlayer::State state() const { return m_state; } |
72 QMediaPlayer::MediaStatus mediaStatus() const { return m_mediaStatus; } |
|
73 |
72 |
74 qint64 duration() const; |
73 qint64 duration() const; |
75 qint64 position() const; |
74 qint64 position() const; |
76 |
75 |
77 bool isBuffering() const; |
76 bool isBuffering() const; |
102 bool processSyncMessage(const QGstreamerMessage &message); |
101 bool processSyncMessage(const QGstreamerMessage &message); |
103 |
102 |
104 public slots: |
103 public slots: |
105 void load(const QUrl &url); |
104 void load(const QUrl &url); |
106 |
105 |
107 void play(); |
106 bool play(); |
108 void pause(); |
107 bool pause(); |
109 void stop(); |
108 void stop(); |
110 |
109 |
111 void seek(qint64 pos); |
110 bool seek(qint64 pos); |
112 |
111 |
113 void setVolume(int volume); |
112 void setVolume(int volume); |
114 void setMuted(bool muted); |
113 void setMuted(bool muted); |
115 |
114 |
116 signals: |
115 signals: |
117 void durationChanged(qint64 duration); |
116 void durationChanged(qint64 duration); |
118 void positionChanged(qint64 position); |
117 void positionChanged(qint64 position); |
119 void stateChanged(QMediaPlayer::State state); |
118 void stateChanged(QMediaPlayer::State state); |
120 void mediaStatusChanged(QMediaPlayer::MediaStatus mediaStatus); |
|
121 void volumeChanged(int volume); |
119 void volumeChanged(int volume); |
122 void mutedStateChanged(bool muted); |
120 void mutedStateChanged(bool muted); |
123 void audioAvailableChanged(bool audioAvailable); |
121 void audioAvailableChanged(bool audioAvailable); |
124 void videoAvailableChanged(bool videoAvailable); |
122 void videoAvailableChanged(bool videoAvailable); |
125 void bufferingChanged(bool buffering); |
123 void bufferingChanged(bool buffering); |
126 void bufferingProgressChanged(int percentFilled); |
124 void bufferingProgressChanged(int percentFilled); |
127 void playbackFinished(); |
125 void playbackFinished(); |
128 void tagsChanged(); |
126 void tagsChanged(); |
129 void streamsChanged(); |
127 void streamsChanged(); |
130 void seekableChanged(bool); |
128 void seekableChanged(bool); |
|
129 void error(int error, const QString &errorString); |
131 |
130 |
132 private slots: |
131 private slots: |
133 void busMessage(const QGstreamerMessage &message); |
132 void busMessage(const QGstreamerMessage &message); |
134 void getStreamsInfo(); |
133 void getStreamsInfo(); |
135 void setSeekable(bool); |
134 void setSeekable(bool); |
136 |
135 |
137 private: |
136 private: |
138 void setMediaStatus(QMediaPlayer::MediaStatus); |
|
139 |
|
140 QUrl m_url; |
137 QUrl m_url; |
141 QMediaPlayer::State m_state; |
138 QMediaPlayer::State m_state; |
142 QMediaPlayer::MediaStatus m_mediaStatus; |
|
143 QGstreamerBusHelper* m_busHelper; |
139 QGstreamerBusHelper* m_busHelper; |
144 GstElement* m_playbin; |
140 GstElement* m_playbin; |
145 GstElement* m_nullVideoOutput; |
141 GstElement* m_nullVideoOutput; |
146 GstBus* m_bus; |
142 GstBus* m_bus; |
147 QGstreamerVideoRendererInterface *m_renderer; |
143 QGstreamerVideoRendererInterface *m_renderer; |