Update duration information after switching to PLAYING state.
For rtsp streams duration information might not be available until playback starts. Change-Id: Id8829408a4bd2c0fc6a89f2d059d23a5a95d940e Reviewed-by: Dmytro Poplavskiy <dmytro.poplavskiy@nokia.com>
This commit is contained in:
committed by
Qt by Nokia
parent
26e4c8cff7
commit
da12ea2e80
@@ -1068,9 +1068,17 @@ bool QGstreamerPlayerSession::processBusMessage(const QGstreamerMessage &message
|
|||||||
}
|
}
|
||||||
case GST_STATE_PLAYING:
|
case GST_STATE_PLAYING:
|
||||||
m_everPlayed = true;
|
m_everPlayed = true;
|
||||||
if (m_state != QMediaPlayer::PlayingState)
|
if (m_state != QMediaPlayer::PlayingState) {
|
||||||
emit stateChanged(m_state = QMediaPlayer::PlayingState);
|
emit stateChanged(m_state = QMediaPlayer::PlayingState);
|
||||||
|
|
||||||
|
// For rtsp streams duration information might not be available
|
||||||
|
// until playback starts.
|
||||||
|
if (m_duration <= 0) {
|
||||||
|
m_durationQueries = 5;
|
||||||
|
updateDuration();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user