Add stream discoverer to gstreamer pipeline and continuous updating of bitrate

This commit is contained in:
Jonas Kvinge
2019-09-07 23:34:13 +02:00
parent 8962644ba8
commit e45a0bf24b
33 changed files with 281 additions and 176 deletions

View File

@@ -52,17 +52,17 @@ UrlHandler::LoadResult SubsonicUrlHandler::StartLoading(const QUrl &url) {
url_query.addQueryItem(encoded_param.first, encoded_param.second);
}
QUrl media_url(server_url());
QUrl stream_url(server_url());
if (!media_url.path().isEmpty() && media_url.path().right(1) == "/") {
media_url.setPath(media_url.path() + QString("rest/stream"));
if (!stream_url.path().isEmpty() && stream_url.path().right(1) == "/") {
stream_url.setPath(stream_url.path() + QString("rest/stream"));
}
else
media_url.setPath(media_url.path() + QString("/rest/stream"));
stream_url.setPath(stream_url.path() + QString("/rest/stream"));
media_url.setQuery(url_query);
stream_url.setQuery(url_query);
return LoadResult(url, LoadResult::TrackAvailable, media_url);
return LoadResult(url, LoadResult::TrackAvailable, stream_url);
}