Clean up QGstreamerPlayerSession
Remove dead code and fix compiler warnings about unused and uninitialized variables. Change-Id: I809d905e13234db1dbc1b9c2a0ac887c5c712fc7 Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
This commit is contained in:
committed by
The Qt Project
parent
30bfb777f9
commit
1761c93ea8
@@ -127,6 +127,7 @@ QGstreamerPlayerSession::QGstreamerPlayerSession(QObject *parent)
|
|||||||
{
|
{
|
||||||
gboolean result = gst_type_find_register(0, "playlist", GST_RANK_MARGINAL, playlistTypeFindFunction, 0, 0, this, 0);
|
gboolean result = gst_type_find_register(0, "playlist", GST_RANK_MARGINAL, playlistTypeFindFunction, 0, 0, this, 0);
|
||||||
Q_ASSERT(result == TRUE);
|
Q_ASSERT(result == TRUE);
|
||||||
|
Q_UNUSED(result);
|
||||||
|
|
||||||
m_playbin = gst_element_factory_make("playbin2", NULL);
|
m_playbin = gst_element_factory_make("playbin2", NULL);
|
||||||
|
|
||||||
@@ -418,17 +419,6 @@ void QGstreamerPlayerSession::setActiveStream(QMediaStreamsControl::StreamType s
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool QGstreamerPlayerSession::isBuffering() const
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
int QGstreamerPlayerSession::bufferingProgress() const
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int QGstreamerPlayerSession::volume() const
|
int QGstreamerPlayerSession::volume() const
|
||||||
{
|
{
|
||||||
return m_volume;
|
return m_volume;
|
||||||
@@ -699,7 +689,7 @@ void QGstreamerPlayerSession::finishVideoOutputChange()
|
|||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
GstState state;
|
GstState state = GST_STATE_VOID_PENDING;
|
||||||
|
|
||||||
switch (m_pendingState) {
|
switch (m_pendingState) {
|
||||||
case QMediaPlayer::StoppedState:
|
case QMediaPlayer::StoppedState:
|
||||||
@@ -767,7 +757,7 @@ void QGstreamerPlayerSession::insertColorSpaceElement(GstElement *element, gpoin
|
|||||||
gst_bin_add(GST_BIN(session->m_videoOutputBin), session->m_colorSpace);
|
gst_bin_add(GST_BIN(session->m_videoOutputBin), session->m_colorSpace);
|
||||||
gst_element_link_many(session->m_videoIdentity, session->m_colorSpace, session->m_videoSink, NULL);
|
gst_element_link_many(session->m_videoIdentity, session->m_colorSpace, session->m_videoSink, NULL);
|
||||||
|
|
||||||
GstState state;
|
GstState state = GST_STATE_VOID_PENDING;
|
||||||
|
|
||||||
switch (session->m_pendingState) {
|
switch (session->m_pendingState) {
|
||||||
case QMediaPlayer::StoppedState:
|
case QMediaPlayer::StoppedState:
|
||||||
|
|||||||
@@ -93,10 +93,6 @@ public:
|
|||||||
qint64 duration() const;
|
qint64 duration() const;
|
||||||
qint64 position() const;
|
qint64 position() const;
|
||||||
|
|
||||||
bool isBuffering() const;
|
|
||||||
|
|
||||||
int bufferingProgress() const;
|
|
||||||
|
|
||||||
int volume() const;
|
int volume() const;
|
||||||
bool isMuted() const;
|
bool isMuted() const;
|
||||||
|
|
||||||
@@ -161,7 +157,6 @@ signals:
|
|||||||
void mutedStateChanged(bool muted);
|
void mutedStateChanged(bool muted);
|
||||||
void audioAvailableChanged(bool audioAvailable);
|
void audioAvailableChanged(bool audioAvailable);
|
||||||
void videoAvailableChanged(bool videoAvailable);
|
void videoAvailableChanged(bool videoAvailable);
|
||||||
void bufferingChanged(bool buffering);
|
|
||||||
void bufferingProgressChanged(int percentFilled);
|
void bufferingProgressChanged(int percentFilled);
|
||||||
void playbackFinished();
|
void playbackFinished();
|
||||||
void tagsChanged();
|
void tagsChanged();
|
||||||
|
|||||||
Reference in New Issue
Block a user