mirror of
https://github.com/clementine-player/Clementine
synced 2025-02-01 20:06:53 +01:00
gstengine: Use existing stream id to track background streams
New ids were being created for background stream mapping, but streams already have unique IDs that can be used for this.
This commit is contained in:
parent
72e2e62eb1
commit
cf842a8c5a
@ -38,7 +38,6 @@ Engine::Base::Base()
|
||||
crossfade_enabled_(true),
|
||||
autocrossfade_enabled_(false),
|
||||
crossfade_same_album_(false),
|
||||
next_background_stream_id_(0),
|
||||
about_to_end_emitted_(false) {}
|
||||
|
||||
Engine::Base::~Base() {}
|
||||
|
@ -149,7 +149,6 @@ class Base : public QObject {
|
||||
bool crossfade_enabled_;
|
||||
bool autocrossfade_enabled_;
|
||||
bool crossfade_same_album_;
|
||||
int next_background_stream_id_;
|
||||
bool fadeout_pause_enabled_;
|
||||
qint64 fadeout_pause_duration_nanosec_;
|
||||
|
||||
|
@ -878,7 +878,7 @@ int GstEngine::AddBackgroundStream(shared_ptr<GstEnginePipeline> pipeline) {
|
||||
connect(pipeline.get(), SIGNAL(EndOfStreamReached(int, bool)),
|
||||
SLOT(BackgroundStreamFinished()));
|
||||
|
||||
const int stream_id = next_background_stream_id_++;
|
||||
const int stream_id = pipeline->id();
|
||||
background_streams_[stream_id] = pipeline;
|
||||
|
||||
QFuture<GstStateChangeReturn> future = pipeline->SetState(GST_STATE_PLAYING);
|
||||
|
Loading…
x
Reference in New Issue
Block a user