Enable stream discoverer on all systems

Fixes #689
This commit is contained in:
Jonas Kvinge 2021-04-14 00:16:37 +02:00
parent 74b7738a9d
commit 01a07ec0e8
1 changed files with 0 additions and 6 deletions

View File

@ -165,13 +165,11 @@ void GstEngine::StartPreloading(const QUrl &stream_url, const QUrl &original_url
if (current_pipeline_) {
current_pipeline_->SetNextUrl(gst_url, original_url, beginning_nanosec, force_stop_at_end ? end_nanosec : 0);
// Add request to discover the stream
#if defined(Q_OS_UNIX) && !defined(Q_OS_MACOS)
if (discoverer_) {
if (!gst_discoverer_discover_uri_async(discoverer_, gst_url.constData())) {
qLog(Error) << "Failed to start stream discovery for" << gst_url;
}
}
#endif
}
}
@ -211,7 +209,6 @@ bool GstEngine::Load(const QUrl &stream_url, const QUrl &original_url, Engine::T
current_pipeline_->StartFader(fadeout_duration_nanosec_, QTimeLine::Forward);
// Setting up stream discoverer
#if defined(Q_OS_UNIX) && !defined(Q_OS_MACOS)
if (!discoverer_) {
discoverer_ = gst_discoverer_new(kDiscoveryTimeoutS * GST_SECOND, nullptr);
if (discoverer_) {
@ -220,16 +217,13 @@ bool GstEngine::Load(const QUrl &stream_url, const QUrl &original_url, Engine::T
gst_discoverer_start(discoverer_);
}
}
#endif
// Add request to discover the stream
#if defined(Q_OS_UNIX) && !defined(Q_OS_MACOS)
if (discoverer_) {
if (!gst_discoverer_discover_uri_async(discoverer_, gst_url.constData())) {
qLog(Error) << "Failed to start stream discovery for" << gst_url;
}
}
#endif
return true;