mirror of https://github.com/KDE/kasts.git
Only use custom gst-pipeline on linux
GStreamer is not used as QMediaPlayer backend on other platforms, so audio will not start with a custom gst-pipeline on Android and Windows. Still needs a solution to get rid of the horrible pitch change on Android and Windows, though.
This commit is contained in:
parent
e2d59a69b0
commit
51db7ea1cf
|
@ -185,7 +185,14 @@ void AudioManager::setEntry(Entry* entry)
|
||||||
Q_EMIT entryChanged(entry);
|
Q_EMIT entryChanged(entry);
|
||||||
// the gst-pipeline is required to make sure that the pitch is not
|
// the gst-pipeline is required to make sure that the pitch is not
|
||||||
// changed when speeding up the audio stream
|
// changed when speeding up the audio stream
|
||||||
|
// TODO: find a solution for Android (GStreamer not available on android by default)
|
||||||
|
#if !defined Q_OS_ANDROID && !defined Q_OS_WIN
|
||||||
|
//qDebug() << "use custom pipeline";
|
||||||
d->m_player.setMedia(QUrl(QStringLiteral("gst-pipeline: playbin uri=file://") + d->m_entry->enclosure()->path() + QStringLiteral(" audio_sink=\"scaletempo ! audioconvert ! audioresample ! autoaudiosink\" video_sink=\"fakevideosink\"")));
|
d->m_player.setMedia(QUrl(QStringLiteral("gst-pipeline: playbin uri=file://") + d->m_entry->enclosure()->path() + QStringLiteral(" audio_sink=\"scaletempo ! audioconvert ! audioresample ! autoaudiosink\" video_sink=\"fakevideosink\"")));
|
||||||
|
#else
|
||||||
|
//qDebug() << "regular audio backend";
|
||||||
|
d->m_player.setMedia(QUrl(QStringLiteral("file://")+d->m_entry->enclosure()->path()));
|
||||||
|
#endif
|
||||||
// save the current playing track in the settingsfile for restoring on startup
|
// save the current playing track in the settingsfile for restoring on startup
|
||||||
DataManager::instance().setLastPlayingEntry(d->m_entry->id());
|
DataManager::instance().setLastPlayingEntry(d->m_entry->id());
|
||||||
//qDebug() << "Changed source to" << d->m_entry->title();
|
//qDebug() << "Changed source to" << d->m_entry->title();
|
||||||
|
|
Loading…
Reference in New Issue