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()) {
|
if (!me->media_pipeline_->is_accepting_data()) {
|
||||||
|
qLog(Info) << "Pipeline not accepting data";
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -89,7 +89,8 @@ GstEnginePipeline::GstEnginePipeline(GstEngine* engine)
|
||||||
stereo_panorama_(nullptr),
|
stereo_panorama_(nullptr),
|
||||||
volume_(nullptr),
|
volume_(nullptr),
|
||||||
audioscale_(nullptr),
|
audioscale_(nullptr),
|
||||||
audiosink_(nullptr) {
|
audiosink_(nullptr),
|
||||||
|
spotify_id_(0) {
|
||||||
if (!sElementDeleter) {
|
if (!sElementDeleter) {
|
||||||
sElementDeleter = new GstElementDeleter;
|
sElementDeleter = new GstElementDeleter;
|
||||||
}
|
}
|
||||||
|
@ -147,7 +148,9 @@ bool GstEnginePipeline::ReplaceDecodeBin(const QUrl& url) {
|
||||||
GstElement* new_bin = nullptr;
|
GstElement* new_bin = nullptr;
|
||||||
|
|
||||||
if (url.scheme() == "spotify") {
|
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
|
// Create elements
|
||||||
GstElement* src = engine_->CreateElement("tcpserversrc", new_bin);
|
GstElement* src = engine_->CreateElement("tcpserversrc", new_bin);
|
||||||
|
|
|
@ -291,6 +291,8 @@ signals:
|
||||||
QThreadPool set_state_threadpool_;
|
QThreadPool set_state_threadpool_;
|
||||||
|
|
||||||
GstSegment last_decodebin_segment_;
|
GstSegment last_decodebin_segment_;
|
||||||
|
|
||||||
|
int spotify_id_;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // GSTENGINEPIPELINE_H
|
#endif // GSTENGINEPIPELINE_H
|
||||||
|
|
Loading…
Reference in New Issue