Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -439,11 +439,6 @@ void MediaPlayerPrivateGStreamer::play()
return;
}

if (isPipelineWaitingPreroll()) {
GST_DEBUG_OBJECT(pipeline(), "pipeline is seeking, let's delay moving the pipeline to playing right now");
return;
}

if (changePipelineState(GST_STATE_PLAYING) == ChangePipelineStateResult::Ok) {
m_isEndReached = false;
m_isDelayingLoad = false;
Expand Down Expand Up @@ -998,10 +993,6 @@ MediaPlayerPrivateGStreamer::ChangePipelineStateResult MediaPlayerPrivateGStream

GstState currentState, pending;
GstStateChangeReturn change = gst_element_get_state(m_pipeline.get(), &currentState, &pending, 0);
if (isPipelineWaitingPreroll(currentState, pending, change)) {
GST_DEBUG_OBJECT(pipeline(), "rejected state change during seek");
return ChangePipelineStateResult::Rejected;
}

GST_DEBUG_OBJECT(pipeline(), "Changing state change to %s from %s with %s pending", gst_element_state_get_name(newState),
gst_element_state_get_name(currentState), gst_element_state_get_name(pending));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -415,18 +415,16 @@ void MediaPlayerPrivateGStreamerMSE::sourceSetup(GstElement* sourceElement)

void MediaPlayerPrivateGStreamerMSE::updateStates()
{
bool isSeeking = isPipelineWaitingPreroll();
bool shouldBePlaying = (!m_isPaused && readyState() >= MediaPlayer::ReadyState::HaveFutureData && m_playbackRatePausedState != PlaybackRatePausedState::RatePaused)
|| m_playbackRatePausedState == PlaybackRatePausedState::ShouldMoveToPlaying;
GST_DEBUG_OBJECT(pipeline(), "shouldBePlaying = %s, m_isPipelinePlaying = %s, is seeking %s", boolForPrinting(shouldBePlaying),
boolForPrinting(m_isPipelinePlaying), boolForPrinting(isSeeking));
if (!isSeeking && shouldBePlaying && !m_isPipelinePlaying) {
GST_DEBUG_OBJECT(pipeline(), "shouldBePlaying = %s, m_isPipelinePlaying = %s", boolForPrinting(shouldBePlaying), boolForPrinting(m_isPipelinePlaying));
if (shouldBePlaying && !m_isPipelinePlaying) {
auto result = changePipelineState(GST_STATE_PLAYING);
if (result == ChangePipelineStateResult::Failed)
GST_ERROR_OBJECT(pipeline(), "Setting the pipeline to PLAYING failed");
else if (result == ChangePipelineStateResult::Ok)
m_playbackRatePausedState = PlaybackRatePausedState::Playing;
} else if (!isSeeking && !shouldBePlaying && m_isPipelinePlaying) {
} else if (!shouldBePlaying && m_isPipelinePlaying) {
if (changePipelineState(GST_STATE_PAUSED) == ChangePipelineStateResult::Failed)
GST_ERROR_OBJECT(pipeline(), "Setting the pipeline to PAUSED failed");
} else if (m_isEosWithNoBuffers) {
Expand Down