mirror of
https://github.com/clementine-player/Clementine
synced 2024-12-12 09:26:06 +01:00
Append id to spotify_bin gst_bin.
This commit is contained in:
parent
e916db9ae1
commit
dd2ba0fe33
@ -824,6 +824,7 @@ int SpotifyClient::MusicDeliveryCallback(sp_session* session,
|
||||
}
|
||||
|
||||
if (!me->media_pipeline_->is_accepting_data()) {
|
||||
qLog(Info) << "Pipeline not accepting data";
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -89,7 +89,8 @@ GstEnginePipeline::GstEnginePipeline(GstEngine* engine)
|
||||
stereo_panorama_(nullptr),
|
||||
volume_(nullptr),
|
||||
audioscale_(nullptr),
|
||||
audiosink_(nullptr) {
|
||||
audiosink_(nullptr),
|
||||
spotify_id_(0) {
|
||||
if (!sElementDeleter) {
|
||||
sElementDeleter = new GstElementDeleter;
|
||||
}
|
||||
@ -147,7 +148,9 @@ bool GstEnginePipeline::ReplaceDecodeBin(const QUrl& url) {
|
||||
GstElement* new_bin = nullptr;
|
||||
|
||||
if (url.scheme() == "spotify") {
|
||||
new_bin = gst_bin_new("spotify_bin");
|
||||
QString name = "spotify_bin_" + QString::number(spotify_id_++);
|
||||
qLog(Debug) << "Spotify bin name: " << name;
|
||||
new_bin = gst_bin_new(name.toAscii().constData());
|
||||
|
||||
// Create elements
|
||||
GstElement* src = engine_->CreateElement("tcpserversrc", new_bin);
|
||||
|
@ -291,6 +291,8 @@ signals:
|
||||
QThreadPool set_state_threadpool_;
|
||||
|
||||
GstSegment last_decodebin_segment_;
|
||||
|
||||
int spotify_id_;
|
||||
};
|
||||
|
||||
#endif // GSTENGINEPIPELINE_H
|
||||
|
Loading…
Reference in New Issue
Block a user