Skip to content
This repository has been archived by the owner on Jan 28, 2022. It is now read-only.

Commit

Permalink
service: do not emit clientDisconnected signal on playbin reset
Browse files Browse the repository at this point in the history
The playbin can get reset for many other reasons (such as missing
codecs) and the client must still be able to control the backend and
choose another file to play.

The clientDisconnected() signal is now unused, but let's keep it in case
we find real cases where the playbin can detect that the client
disconnected.
  • Loading branch information
mardy committed May 10, 2021
1 parent 880eab0 commit 99870f0
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/core/media/gstreamer/playbin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -209,17 +209,15 @@ gstreamer::Playbin::~Playbin()

void gstreamer::Playbin::reset()
{
MH_INFO("Client died, resetting pipeline");
// When the client dies, tear down the current pipeline and get it
MH_INFO("Resetting pipeline");
// Tear down the current pipeline and get it
// in a state that is ready for the next client that connects to the
// service

// Don't reset the pipeline if we want to resume
if (player_lifetime != media::Player::Lifetime::resumable) {
reset_pipeline();
}
// Signal to the Player class that the client side has disconnected
Q_EMIT clientDisconnected();
}

void gstreamer::Playbin::reset_pipeline()
Expand Down

0 comments on commit 99870f0

Please sign in to comment.