Remove VLC
This commit is contained in:
parent
25451d361c
commit
e4a57aa768
|
@ -56,7 +56,6 @@ jobs:
|
|||
libpulse-devel
|
||||
gstreamer-devel
|
||||
gstreamer-plugins-base-devel
|
||||
vlc-devel
|
||||
taglib-devel
|
||||
libicu-devel
|
||||
libcdio-devel
|
||||
|
|
|
@ -141,13 +141,12 @@ if(UNIX)
|
|||
pkg_check_modules(GIO_UNIX gio-unix-2.0)
|
||||
endif()
|
||||
pkg_check_modules(LIBCDIO libcdio)
|
||||
pkg_check_modules(GSTREAMER gstreamer-1.0)
|
||||
pkg_check_modules(GSTREAMER_BASE gstreamer-base-1.0)
|
||||
pkg_check_modules(GSTREAMER_AUDIO gstreamer-audio-1.0)
|
||||
pkg_check_modules(GSTREAMER_APP gstreamer-app-1.0)
|
||||
pkg_check_modules(GSTREAMER_TAG gstreamer-tag-1.0)
|
||||
pkg_check_modules(GSTREAMER_PBUTILS gstreamer-pbutils-1.0)
|
||||
pkg_check_modules(LIBVLC libvlc)
|
||||
pkg_check_modules(GSTREAMER REQUIRED gstreamer-1.0)
|
||||
pkg_check_modules(GSTREAMER_BASE REQUIRED gstreamer-base-1.0)
|
||||
pkg_check_modules(GSTREAMER_AUDIO REQUIRED gstreamer-audio-1.0)
|
||||
pkg_check_modules(GSTREAMER_APP REQUIRED gstreamer-app-1.0)
|
||||
pkg_check_modules(GSTREAMER_TAG REQUIRED gstreamer-tag-1.0)
|
||||
pkg_check_modules(GSTREAMER_PBUTILS REQUIRED gstreamer-pbutils-1.0)
|
||||
pkg_check_modules(SQLITE REQUIRED sqlite3>=3.9)
|
||||
pkg_check_modules(LIBPULSE libpulse)
|
||||
pkg_check_modules(CHROMAPRINT libchromaprint>=1.4)
|
||||
|
@ -290,18 +289,12 @@ optional_component(GSTREAMER ON "Engine: GStreamer backend"
|
|||
DEPENDS "gstreamer-pbutils-1.0" GSTREAMER_PBUTILS_FOUND
|
||||
)
|
||||
|
||||
optional_component(VLC ON "Engine: VLC backend"
|
||||
DEPENDS "libvlc" LIBVLC_FOUND
|
||||
)
|
||||
|
||||
optional_component(SONGFINGERPRINTING ON "Song fingerprinting and tracking"
|
||||
DEPENDS "chromaprint" CHROMAPRINT_FOUND
|
||||
DEPENDS "gstreamer" HAVE_GSTREAMER
|
||||
)
|
||||
|
||||
optional_component(MUSICBRAINZ ON "MusicBrainz integration"
|
||||
DEPENDS "chromaprint" CHROMAPRINT_FOUND
|
||||
DEPENDS "gstreamer" HAVE_GSTREAMER
|
||||
)
|
||||
|
||||
if(X11_FOUND OR (HAVE_DBUS AND Qt${QT_VERSION_MAJOR}DBus_FOUND) OR APPLE OR WIN32)
|
||||
|
@ -319,7 +312,6 @@ optional_component(X11_GLOBALSHORTCUTS ON "X11 global shortcuts"
|
|||
|
||||
optional_component(AUDIOCD ON "Devices: Audio CD support"
|
||||
DEPENDS "libcdio" LIBCDIO_FOUND
|
||||
DEPENDS "gstreamer" HAVE_GSTREAMER
|
||||
)
|
||||
|
||||
optional_component(UDISKS2 ON "Devices: UDisks2 backend"
|
||||
|
@ -360,12 +352,10 @@ optional_component(QOBUZ ON "Streaming: Qobuz")
|
|||
|
||||
optional_component(MOODBAR ON "Moodbar"
|
||||
DEPENDS "fftw3" FFTW3_FOUND
|
||||
DEPENDS "gstreamer" HAVE_GSTREAMER
|
||||
)
|
||||
|
||||
optional_component(EBUR128 ON "EBU R 128 loudness normalization"
|
||||
DEPENDS "libebur128" LIBEBUR128_FOUND
|
||||
DEPENDS "gstreamer" HAVE_GSTREAMER
|
||||
)
|
||||
|
||||
if(APPLE OR WIN32)
|
||||
|
@ -437,11 +427,6 @@ add_custom_target(uninstall "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/c
|
|||
|
||||
# Show a summary of what we have enabled
|
||||
summary_show()
|
||||
if(NOT HAVE_GSTREAMER AND NOT HAVE_VLC)
|
||||
message(FATAL_ERROR "You need to have either GStreamer or libvlc to compile!")
|
||||
elseif(NOT HAVE_GSTREAMER)
|
||||
message(WARNING "GStreamer is the only engine that is fully implemented. Using other engines is possible but not recommended.")
|
||||
endif()
|
||||
|
||||
if(NOT CMAKE_CROSSCOMPILING)
|
||||
if(NOT QT_SQLITE_TEST)
|
||||
|
|
|
@ -79,7 +79,7 @@ To build Strawberry from source you need the following installed on your system
|
|||
* [SQLite 3.9 or newer](https://www.sqlite.org)
|
||||
* [ALSA (Required on Linux)](https://www.alsa-project.org/)
|
||||
* [D-Bus (Required on Linux)](https://www.freedesktop.org/wiki/Software/dbus/)
|
||||
* [GStreamer](https://gstreamer.freedesktop.org/) or [VLC](https://www.videolan.org)
|
||||
* [GStreamer](https://gstreamer.freedesktop.org/)
|
||||
* [TagLib 1.12 or higher](https://www.taglib.org/) or [TagParser](https://github.com/Martchus/tagparser)
|
||||
* [ICU](https://unicode-org.github.io/icu/)
|
||||
|
||||
|
|
|
@ -65,9 +65,6 @@ BuildRequires: pkgconfig(libcdio)
|
|||
BuildRequires: pkgconfig(libebur128)
|
||||
BuildRequires: pkgconfig(libgpod-1.0)
|
||||
BuildRequires: pkgconfig(libmtp)
|
||||
%if 0%{?suse_version} || 0%{?fedora_version}
|
||||
BuildRequires: pkgconfig(libvlc)
|
||||
%endif
|
||||
|
||||
%if 0%{?suse_version}
|
||||
Requires: qt6-sql-sqlite
|
||||
|
|
|
@ -92,6 +92,9 @@ set(SOURCES
|
|||
engine/devicefinders.cpp
|
||||
engine/devicefinder.cpp
|
||||
engine/enginemetadata.cpp
|
||||
engine/gststartup.cpp
|
||||
engine/gstengine.cpp
|
||||
engine/gstenginepipeline.cpp
|
||||
|
||||
analyzer/fht.cpp
|
||||
analyzer/analyzerbase.cpp
|
||||
|
@ -246,6 +249,7 @@ set(SOURCES
|
|||
settings/appearancesettingspage.cpp
|
||||
settings/contextsettingspage.cpp
|
||||
settings/notificationssettingspage.cpp
|
||||
settings/transcodersettingspage.cpp
|
||||
|
||||
dialogs/about.cpp
|
||||
dialogs/console.cpp
|
||||
|
@ -337,6 +341,18 @@ set(SOURCES
|
|||
organize/organizedialog.cpp
|
||||
organize/organizeerrordialog.cpp
|
||||
|
||||
transcoder/transcoder.cpp
|
||||
transcoder/transcoderoptionsinterface.cpp
|
||||
transcoder/transcodedialog.cpp
|
||||
transcoder/transcoderoptionsdialog.cpp
|
||||
transcoder/transcoderoptionsflac.cpp
|
||||
transcoder/transcoderoptionswavpack.cpp
|
||||
transcoder/transcoderoptionsvorbis.cpp
|
||||
transcoder/transcoderoptionsopus.cpp
|
||||
transcoder/transcoderoptionsspeex.cpp
|
||||
transcoder/transcoderoptionsaac.cpp
|
||||
transcoder/transcoderoptionsasf.cpp
|
||||
transcoder/transcoderoptionsmp3.cpp
|
||||
)
|
||||
|
||||
set(HEADERS
|
||||
|
@ -373,6 +389,9 @@ set(HEADERS
|
|||
|
||||
engine/enginebase.h
|
||||
engine/devicefinders.h
|
||||
engine/gststartup.h
|
||||
engine/gstengine.h
|
||||
engine/gstenginepipeline.h
|
||||
|
||||
analyzer/analyzerbase.h
|
||||
analyzer/analyzercontainer.h
|
||||
|
@ -510,6 +529,7 @@ set(HEADERS
|
|||
settings/appearancesettingspage.h
|
||||
settings/contextsettingspage.h
|
||||
settings/notificationssettingspage.h
|
||||
settings/transcodersettingspage.h
|
||||
|
||||
dialogs/about.h
|
||||
dialogs/errordialog.h
|
||||
|
@ -595,6 +615,18 @@ set(HEADERS
|
|||
organize/organizedialog.h
|
||||
organize/organizeerrordialog.h
|
||||
|
||||
transcoder/transcoder.h
|
||||
transcoder/transcodedialog.h
|
||||
transcoder/transcoderoptionsdialog.h
|
||||
transcoder/transcoderoptionsinterface.h
|
||||
transcoder/transcoderoptionsflac.h
|
||||
transcoder/transcoderoptionswavpack.h
|
||||
transcoder/transcoderoptionsvorbis.h
|
||||
transcoder/transcoderoptionsopus.h
|
||||
transcoder/transcoderoptionsspeex.h
|
||||
transcoder/transcoderoptionsaac.h
|
||||
transcoder/transcoderoptionsasf.h
|
||||
transcoder/transcoderoptionsmp3.h
|
||||
)
|
||||
|
||||
set(UI
|
||||
|
@ -639,6 +671,7 @@ set(UI
|
|||
settings/networkproxysettingspage.ui
|
||||
settings/appearancesettingspage.ui
|
||||
settings/notificationssettingspage.ui
|
||||
settings/transcodersettingspage.ui
|
||||
|
||||
equalizer/equalizer.ui
|
||||
equalizer/equalizerslider.ui
|
||||
|
@ -669,6 +702,17 @@ set(UI
|
|||
organize/organizedialog.ui
|
||||
organize/organizeerrordialog.ui
|
||||
|
||||
transcoder/transcodedialog.ui
|
||||
transcoder/transcodelogdialog.ui
|
||||
transcoder/transcoderoptionsaac.ui
|
||||
transcoder/transcoderoptionsdialog.ui
|
||||
transcoder/transcoderoptionsflac.ui
|
||||
transcoder/transcoderoptionswavpack.ui
|
||||
transcoder/transcoderoptionsvorbis.ui
|
||||
transcoder/transcoderoptionsopus.ui
|
||||
transcoder/transcoderoptionsspeex.ui
|
||||
transcoder/transcoderoptionsasf.ui
|
||||
transcoder/transcoderoptionsmp3.ui
|
||||
)
|
||||
|
||||
set(RESOURCES ../data/data.qrc ../data/icons.qrc)
|
||||
|
@ -706,15 +750,6 @@ optional_source(HAVE_ALSA SOURCES engine/alsadevicefinder.cpp engine/alsapcmdevi
|
|||
# DBUS
|
||||
optional_source(HAVE_DBUS SOURCES osd/osddbus.cpp HEADERS osd/osddbus.h)
|
||||
|
||||
# GStreamer
|
||||
optional_source(HAVE_GSTREAMER
|
||||
SOURCES engine/gststartup.cpp engine/gstengine.cpp engine/gstenginepipeline.cpp
|
||||
HEADERS engine/gststartup.h engine/gstengine.h engine/gstenginepipeline.h
|
||||
)
|
||||
|
||||
# VLC
|
||||
optional_source(HAVE_VLC SOURCES engine/vlcengine.cpp HEADERS engine/vlcengine.h)
|
||||
|
||||
# DBUS and MPRIS - Unix specific
|
||||
if(UNIX AND HAVE_DBUS)
|
||||
|
||||
|
@ -812,51 +847,6 @@ optional_source(HAVE_LIBMTP
|
|||
# Pulse audio integration
|
||||
optional_source(HAVE_LIBPULSE SOURCES engine/pulsedevicefinder.cpp)
|
||||
|
||||
# Transcoder require GStreamer
|
||||
optional_source(HAVE_GSTREAMER
|
||||
SOURCES
|
||||
transcoder/transcoder.cpp
|
||||
transcoder/transcoderoptionsinterface.cpp
|
||||
transcoder/transcodedialog.cpp
|
||||
transcoder/transcoderoptionsdialog.cpp
|
||||
transcoder/transcoderoptionsflac.cpp
|
||||
transcoder/transcoderoptionswavpack.cpp
|
||||
transcoder/transcoderoptionsvorbis.cpp
|
||||
transcoder/transcoderoptionsopus.cpp
|
||||
transcoder/transcoderoptionsspeex.cpp
|
||||
transcoder/transcoderoptionsaac.cpp
|
||||
transcoder/transcoderoptionsasf.cpp
|
||||
transcoder/transcoderoptionsmp3.cpp
|
||||
settings/transcodersettingspage.cpp
|
||||
HEADERS
|
||||
transcoder/transcoder.h
|
||||
transcoder/transcodedialog.h
|
||||
transcoder/transcoderoptionsdialog.h
|
||||
transcoder/transcoderoptionsinterface.h
|
||||
transcoder/transcoderoptionsflac.h
|
||||
transcoder/transcoderoptionswavpack.h
|
||||
transcoder/transcoderoptionsvorbis.h
|
||||
transcoder/transcoderoptionsopus.h
|
||||
transcoder/transcoderoptionsspeex.h
|
||||
transcoder/transcoderoptionsaac.h
|
||||
transcoder/transcoderoptionsasf.h
|
||||
transcoder/transcoderoptionsmp3.h
|
||||
settings/transcodersettingspage.h
|
||||
UI
|
||||
transcoder/transcodedialog.ui
|
||||
transcoder/transcodelogdialog.ui
|
||||
transcoder/transcoderoptionsaac.ui
|
||||
transcoder/transcoderoptionsdialog.ui
|
||||
transcoder/transcoderoptionsflac.ui
|
||||
transcoder/transcoderoptionswavpack.ui
|
||||
transcoder/transcoderoptionsvorbis.ui
|
||||
transcoder/transcoderoptionsopus.ui
|
||||
transcoder/transcoderoptionsspeex.ui
|
||||
transcoder/transcoderoptionsasf.ui
|
||||
transcoder/transcoderoptionsmp3.ui
|
||||
settings/transcodersettingspage.ui
|
||||
)
|
||||
|
||||
# CHROMAPRINT
|
||||
if(HAVE_SONGFINGERPRINTING OR HAVE_MUSICBRAINZ)
|
||||
optional_source(CHROMAPRINT_FOUND SOURCES engine/chromaprinter.cpp)
|
||||
|
@ -1081,6 +1071,13 @@ add_library(strawberry_lib STATIC
|
|||
${OTHER_UIC_SOURCES}
|
||||
)
|
||||
|
||||
target_include_directories(strawberry_lib PUBLIC
|
||||
${CMAKE_SOURCE_DIR}
|
||||
${CMAKE_BINARY_DIR}
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
|
||||
target_include_directories(strawberry_lib SYSTEM PUBLIC
|
||||
${Boost_INCLUDE_DIRS}
|
||||
${GLIB_INCLUDE_DIRS}
|
||||
|
@ -1088,20 +1085,19 @@ target_include_directories(strawberry_lib SYSTEM PUBLIC
|
|||
${SQLITE_INCLUDE_DIRS}
|
||||
${ICU_INCLUDE_DIRS}
|
||||
${TAGLIB_INCLUDE_DIRS}
|
||||
${GSTREAMER_INCLUDE_DIRS}
|
||||
${GSTREAMER_BASE_INCLUDE_DIRS}
|
||||
${GSTREAMER_APP_INCLUDE_DIRS}
|
||||
${GSTREAMER_AUDIO_INCLUDE_DIRS}
|
||||
${GSTREAMER_TAG_INCLUDE_DIRS}
|
||||
${GSTREAMER_PBUTILS_INCLUDE_DIRS}
|
||||
${SINGLEAPPLICATION_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
if(HAVE_QPA_QPLATFORMNATIVEINTERFACE_H)
|
||||
target_include_directories(strawberry_lib SYSTEM PUBLIC ${Qt${QT_VERSION_MAJOR}Gui_PRIVATE_INCLUDE_DIRS})
|
||||
endif()
|
||||
|
||||
target_include_directories(strawberry_lib PUBLIC
|
||||
${CMAKE_SOURCE_DIR}
|
||||
${CMAKE_BINARY_DIR}
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${SINGLEAPPLICATION_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
target_link_directories(strawberry_lib PUBLIC
|
||||
${Boost_LIBRARY_DIRS}
|
||||
${GLIB_LIBRARY_DIRS}
|
||||
|
@ -1110,6 +1106,12 @@ target_link_directories(strawberry_lib PUBLIC
|
|||
${SINGLEAPPLICATION_LIBRARY_DIRS}
|
||||
${ICU_LIBRARY_DIRS}
|
||||
${TAGLIB_LIBRARY_DIRS}
|
||||
${GSTREAMER_LIBRARY_DIRS}
|
||||
${GSTREAMER_BASE_LIBRARY_DIRS}
|
||||
${GSTREAMER_APP_LIBRARY_DIRS}
|
||||
${GSTREAMER_AUDIO_LIBRARY_DIRS}
|
||||
${GSTREAMER_TAG_LIBRARY_DIRS}
|
||||
${GSTREAMER_PBUTILS_LIBRARY_DIRS}
|
||||
)
|
||||
|
||||
target_link_libraries(strawberry_lib PUBLIC
|
||||
|
@ -1119,6 +1121,12 @@ target_link_libraries(strawberry_lib PUBLIC
|
|||
${SQLITE_LIBRARIES}
|
||||
${ICU_LIBRARIES}
|
||||
${TAGLIB_LIBRARIES}
|
||||
${GSTREAMER_LIBRARIES}
|
||||
${GSTREAMER_BASE_LIBRARIES}
|
||||
${GSTREAMER_AUDIO_LIBRARIES}
|
||||
${GSTREAMER_APP_LIBRARIES}
|
||||
${GSTREAMER_TAG_LIBRARIES}
|
||||
${GSTREAMER_PBUTILS_LIBRARIES}
|
||||
Qt${QT_VERSION_MAJOR}::Core
|
||||
Qt${QT_VERSION_MAJOR}::Concurrent
|
||||
Qt${QT_VERSION_MAJOR}::Gui
|
||||
|
@ -1144,45 +1152,12 @@ if(HAVE_LIBPULSE)
|
|||
target_link_libraries(strawberry_lib PRIVATE ${LIBPULSE_LIBRARIES})
|
||||
endif()
|
||||
|
||||
if(HAVE_GSTREAMER)
|
||||
target_include_directories(strawberry_lib SYSTEM PRIVATE
|
||||
${GSTREAMER_INCLUDE_DIRS}
|
||||
${GSTREAMER_BASE_INCLUDE_DIRS}
|
||||
${GSTREAMER_APP_INCLUDE_DIRS}
|
||||
${GSTREAMER_AUDIO_INCLUDE_DIRS}
|
||||
${GSTREAMER_TAG_INCLUDE_DIRS}
|
||||
${GSTREAMER_PBUTILS_INCLUDE_DIRS}
|
||||
)
|
||||
target_link_directories(strawberry_lib PRIVATE
|
||||
${GSTREAMER_LIBRARY_DIRS}
|
||||
${GSTREAMER_BASE_LIBRARY_DIRS}
|
||||
${GSTREAMER_APP_LIBRARY_DIRS}
|
||||
${GSTREAMER_AUDIO_LIBRARY_DIRS}
|
||||
${GSTREAMER_TAG_LIBRARY_DIRS}
|
||||
${GSTREAMER_PBUTILS_LIBRARY_DIRS}
|
||||
)
|
||||
target_link_libraries(strawberry_lib PRIVATE
|
||||
${GSTREAMER_LIBRARIES}
|
||||
${GSTREAMER_BASE_LIBRARIES}
|
||||
${GSTREAMER_AUDIO_LIBRARIES}
|
||||
${GSTREAMER_APP_LIBRARIES}
|
||||
${GSTREAMER_TAG_LIBRARIES}
|
||||
${GSTREAMER_PBUTILS_LIBRARIES}
|
||||
)
|
||||
endif()
|
||||
|
||||
if(HAVE_MOODBAR)
|
||||
target_include_directories(strawberry_lib SYSTEM PRIVATE ${FFTW3_INCLUDE_DIR})
|
||||
target_link_directories(strawberry_lib PRIVATE ${FFTW3_LIBRARY_DIRS})
|
||||
target_link_libraries(strawberry_lib PRIVATE ${FFTW3_FFTW_LIBRARY})
|
||||
endif()
|
||||
|
||||
if(HAVE_VLC)
|
||||
target_include_directories(strawberry_lib SYSTEM PRIVATE ${LIBVLC_INCLUDE_DIRS})
|
||||
target_link_directories(strawberry_lib PRIVATE ${LIBVLC_LIBRARY_DIRS})
|
||||
target_link_libraries(strawberry_lib PRIVATE ${LIBVLC_LIBRARIES})
|
||||
endif()
|
||||
|
||||
if(HAVE_SONGFINGERPRINTING OR HAVE_MUSICBRAINZ)
|
||||
target_include_directories(strawberry_lib SYSTEM PRIVATE ${CHROMAPRINT_INCLUDE_DIRS})
|
||||
target_link_directories(strawberry_lib PRIVATE ${CHROMAPRINT_LIBRARY_DIRS})
|
||||
|
|
|
@ -24,9 +24,6 @@
|
|||
|
||||
#cmakedefine USE_INSTALL_PREFIX
|
||||
|
||||
#cmakedefine HAVE_GSTREAMER
|
||||
#cmakedefine HAVE_VLC
|
||||
|
||||
#cmakedefine HAVE_SUBSONIC
|
||||
#cmakedefine HAVE_TIDAL
|
||||
#cmakedefine HAVE_SPOTIFY
|
||||
|
|
|
@ -291,12 +291,10 @@ MainWindow::MainWindow(Application *app, SharedPtr<SystemTrayIcon> tray_icon, OS
|
|||
dialog->SetDestinationModel(app->collection()->model()->directory_model());
|
||||
return dialog;
|
||||
}),
|
||||
#ifdef HAVE_GSTREAMER
|
||||
transcode_dialog_([this]() {
|
||||
TranscodeDialog *dialog = new TranscodeDialog(this);
|
||||
return dialog;
|
||||
}),
|
||||
#endif
|
||||
add_stream_dialog_([this]() {
|
||||
AddStreamDialog *add_stream_dialog = new AddStreamDialog;
|
||||
QObject::connect(add_stream_dialog, &AddStreamDialog::accepted, this, &MainWindow::AddStreamAccepted);
|
||||
|
@ -500,13 +498,11 @@ MainWindow::MainWindow(Application *app, SharedPtr<SystemTrayIcon> tray_icon, OS
|
|||
// File view connections
|
||||
QObject::connect(file_view_, &FileView::AddToPlaylist, this, &MainWindow::AddToPlaylist);
|
||||
QObject::connect(file_view_, &FileView::PathChanged, this, &MainWindow::FilePathChanged);
|
||||
#ifdef HAVE_GSTREAMER
|
||||
QObject::connect(file_view_, &FileView::CopyToCollection, this, &MainWindow::CopyFilesToCollection);
|
||||
QObject::connect(file_view_, &FileView::MoveToCollection, this, &MainWindow::MoveFilesToCollection);
|
||||
QObject::connect(file_view_, &FileView::EditTags, this, &MainWindow::EditFileTags);
|
||||
# ifndef Q_OS_WIN
|
||||
#ifndef Q_OS_WIN
|
||||
QObject::connect(file_view_, &FileView::CopyToDevice, this, &MainWindow::CopyFilesToDevice);
|
||||
# endif
|
||||
#endif
|
||||
file_view_->SetTaskManager(app_->task_manager());
|
||||
|
||||
|
@ -543,21 +539,13 @@ MainWindow::MainWindow(Application *app, SharedPtr<SystemTrayIcon> tray_icon, OS
|
|||
QObject::connect(ui_->action_add_stream, &QAction::triggered, this, &MainWindow::AddStream);
|
||||
QObject::connect(ui_->action_cover_manager, &QAction::triggered, this, &MainWindow::ShowCoverManager);
|
||||
QObject::connect(ui_->action_equalizer, &QAction::triggered, this, &MainWindow::ShowEqualizer);
|
||||
#if defined(HAVE_GSTREAMER)
|
||||
QObject::connect(ui_->action_transcoder, &QAction::triggered, this, &MainWindow::ShowTranscodeDialog);
|
||||
#else
|
||||
ui_->action_transcoder->setDisabled(true);
|
||||
#endif
|
||||
QObject::connect(ui_->action_jump, &QAction::triggered, ui_->playlist->view(), &PlaylistView::JumpToCurrentlyPlayingTrack);
|
||||
QObject::connect(ui_->action_update_collection, &QAction::triggered, &*app_->collection(), &SCollection::IncrementalScan);
|
||||
QObject::connect(ui_->action_full_collection_scan, &QAction::triggered, &*app_->collection(), &SCollection::FullScan);
|
||||
QObject::connect(ui_->action_stop_collection_scan, &QAction::triggered, &*app_->collection(), &SCollection::StopScan);
|
||||
#if defined(HAVE_GSTREAMER)
|
||||
QObject::connect(ui_->action_add_files_to_transcoder, &QAction::triggered, this, &MainWindow::AddFilesToTranscoder);
|
||||
ui_->action_add_files_to_transcoder->setIcon(IconLoader::Load(QStringLiteral("tools-wizard")));
|
||||
#else
|
||||
ui_->action_add_files_to_transcoder->setDisabled(true);
|
||||
#endif
|
||||
|
||||
QObject::connect(ui_->action_toggle_scrobbling, &QAction::triggered, &*app_->scrobbler(), &AudioScrobbler::ToggleScrobbling);
|
||||
QObject::connect(ui_->action_love, &QAction::triggered, this, &MainWindow::Love);
|
||||
|
@ -757,9 +745,7 @@ MainWindow::MainWindow(Application *app, SharedPtr<SystemTrayIcon> tray_icon, OS
|
|||
#endif
|
||||
playlist_rescan_songs_ = playlist_menu_->addAction(IconLoader::Load(QStringLiteral("view-refresh")), tr("Rescan song(s)..."), this, &MainWindow::RescanSongs);
|
||||
playlist_menu_->addAction(playlist_rescan_songs_);
|
||||
#ifdef HAVE_GSTREAMER
|
||||
playlist_menu_->addAction(ui_->action_add_files_to_transcoder);
|
||||
#endif
|
||||
playlist_menu_->addSeparator();
|
||||
playlist_copy_url_ = playlist_menu_->addAction(IconLoader::Load(QStringLiteral("edit-copy")), tr("Copy URL(s)..."), this, &MainWindow::PlaylistCopyUrl);
|
||||
playlist_show_in_collection_ = playlist_menu_->addAction(IconLoader::Load(QStringLiteral("edit-find")), tr("Show in collection..."), this, &MainWindow::ShowInCollection);
|
||||
|
@ -767,7 +753,7 @@ MainWindow::MainWindow(Application *app, SharedPtr<SystemTrayIcon> tray_icon, OS
|
|||
playlist_organize_ = playlist_menu_->addAction(IconLoader::Load(QStringLiteral("edit-copy")), tr("Organize files..."), this, &MainWindow::PlaylistMoveToCollection);
|
||||
playlist_copy_to_collection_ = playlist_menu_->addAction(IconLoader::Load(QStringLiteral("edit-copy")), tr("Copy to collection..."), this, &MainWindow::PlaylistCopyToCollection);
|
||||
playlist_move_to_collection_ = playlist_menu_->addAction(IconLoader::Load(QStringLiteral("go-jump")), tr("Move to collection..."), this, &MainWindow::PlaylistMoveToCollection);
|
||||
#if defined(HAVE_GSTREAMER) && !defined(Q_OS_WIN)
|
||||
#ifndef Q_OS_WIN
|
||||
playlist_copy_to_device_ = playlist_menu_->addAction(IconLoader::Load(QStringLiteral("device")), tr("Copy to device..."), this, &MainWindow::PlaylistCopyToDevice);
|
||||
#endif
|
||||
playlist_delete_ = playlist_menu_->addAction(IconLoader::Load(QStringLiteral("edit-delete")), tr("Delete from disk..."), this, &MainWindow::PlaylistDelete);
|
||||
|
@ -787,7 +773,7 @@ MainWindow::MainWindow(Application *app, SharedPtr<SystemTrayIcon> tray_icon, OS
|
|||
|
||||
QObject::connect(ui_->playlist, &PlaylistContainer::UndoRedoActionsChanged, this, &MainWindow::PlaylistUndoRedoChanged);
|
||||
|
||||
#if defined(HAVE_GSTREAMER) && !defined(Q_OS_WIN)
|
||||
#ifndef Q_OS_WIN
|
||||
playlist_copy_to_device_->setDisabled(app_->device_manager()->connected_devices_model()->rowCount() == 0);
|
||||
QObject::connect(app_->device_manager()->connected_devices_model(), &DeviceStateFilterModel::IsEmptyChanged, playlist_copy_to_device_, &QAction::setDisabled);
|
||||
#endif
|
||||
|
@ -1927,10 +1913,8 @@ void MainWindow::PlaylistRightClick(const QPoint global_pos, const QModelIndex &
|
|||
playlist_rescan_songs_->setEnabled(local_songs > 0 && editable > 0);
|
||||
playlist_rescan_songs_->setVisible(local_songs > 0 && editable > 0);
|
||||
|
||||
#ifdef HAVE_GSTREAMER
|
||||
ui_->action_add_files_to_transcoder->setEnabled(local_songs > 0 && editable > 0);
|
||||
ui_->action_add_files_to_transcoder->setVisible(local_songs > 0 && editable > 0);
|
||||
#endif
|
||||
|
||||
playlist_open_in_browser_->setVisible(selected > 0 && local_songs == selected);
|
||||
|
||||
|
@ -1944,7 +1928,7 @@ void MainWindow::PlaylistRightClick(const QPoint global_pos, const QModelIndex &
|
|||
playlist_show_in_collection_->setVisible(false);
|
||||
playlist_copy_to_collection_->setVisible(false);
|
||||
playlist_move_to_collection_->setVisible(false);
|
||||
#if defined(HAVE_GSTREAMER) && !defined(Q_OS_WIN)
|
||||
#ifndef Q_OS_WIN
|
||||
playlist_copy_to_device_->setVisible(false);
|
||||
#endif
|
||||
playlist_organize_->setVisible(false);
|
||||
|
@ -2019,7 +2003,7 @@ void MainWindow::PlaylistRightClick(const QPoint global_pos, const QModelIndex &
|
|||
playlist_move_to_collection_->setVisible(local_songs > 0);
|
||||
}
|
||||
|
||||
#if defined(HAVE_GSTREAMER) && !defined(Q_OS_WIN)
|
||||
#ifndef Q_OS_WIN
|
||||
playlist_copy_to_device_->setVisible(local_songs > 0);
|
||||
#endif
|
||||
|
||||
|
@ -2558,8 +2542,6 @@ void MainWindow::PlaylistUndoRedoChanged(QAction *undo, QAction *redo) {
|
|||
|
||||
void MainWindow::AddFilesToTranscoder() {
|
||||
|
||||
#ifdef HAVE_GSTREAMER
|
||||
|
||||
QStringList filenames;
|
||||
|
||||
const QModelIndexList proxy_indexes = ui_->playlist->view()->selectionModel()->selectedRows();
|
||||
|
@ -2579,8 +2561,6 @@ void MainWindow::AddFilesToTranscoder() {
|
|||
|
||||
ShowTranscodeDialog();
|
||||
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
void MainWindow::ShowCollectionConfig() {
|
||||
|
@ -2630,7 +2610,7 @@ void MainWindow::MoveFilesToCollection(const QList<QUrl> &urls) {
|
|||
|
||||
void MainWindow::CopyFilesToDevice(const QList<QUrl> &urls) {
|
||||
|
||||
#if defined(HAVE_GSTREAMER) && !defined(Q_OS_WIN)
|
||||
#ifndef Q_OS_WIN
|
||||
organize_dialog_->SetDestinationModel(app_->device_manager()->connected_devices_model(), true);
|
||||
organize_dialog_->SetCopy(true);
|
||||
if (organize_dialog_->SetUrls(urls)) {
|
||||
|
@ -2874,10 +2854,8 @@ void MainWindow::ShowAboutDialog() {
|
|||
|
||||
void MainWindow::ShowTranscodeDialog() {
|
||||
|
||||
#ifdef HAVE_GSTREAMER
|
||||
transcode_dialog_->show();
|
||||
transcode_dialog_->raise();
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -88,9 +88,7 @@ class SystemTrayIcon;
|
|||
class TagFetcher;
|
||||
#endif
|
||||
class TrackSelectionDialog;
|
||||
#ifdef HAVE_GSTREAMER
|
||||
class TranscodeDialog;
|
||||
#endif
|
||||
class Ui_MainWindow;
|
||||
class StreamingSongsView;
|
||||
class StreamingTabsView;
|
||||
|
@ -322,9 +320,7 @@ class MainWindow : public QMainWindow, public PlatformInterface {
|
|||
Lazy<AlbumCoverManager> cover_manager_;
|
||||
SharedPtr<Equalizer> equalizer_;
|
||||
Lazy<OrganizeDialog> organize_dialog_;
|
||||
#ifdef HAVE_GSTREAMER
|
||||
Lazy<TranscodeDialog> transcode_dialog_;
|
||||
#endif
|
||||
Lazy<AddStreamDialog> add_stream_dialog_;
|
||||
|
||||
#ifdef HAVE_MUSICBRAINZ
|
||||
|
|
|
@ -23,10 +23,8 @@
|
|||
|
||||
#include "metatypes.h"
|
||||
|
||||
#ifdef HAVE_GSTREAMER
|
||||
# include <gst/gstbuffer.h>
|
||||
# include <gst/gstelement.h>
|
||||
#endif
|
||||
#include <gst/gstbuffer.h>
|
||||
#include <gst/gstelement.h>
|
||||
|
||||
#include <QAbstractSocket>
|
||||
#include <QMetaType>
|
||||
|
@ -47,9 +45,7 @@
|
|||
|
||||
#include "engine/enginebase.h"
|
||||
#include "engine/enginemetadata.h"
|
||||
#ifdef HAVE_GSTREAMER
|
||||
# include "engine/gstenginepipeline.h"
|
||||
#endif
|
||||
#include "engine/gstenginepipeline.h"
|
||||
#include "collection/collectiondirectory.h"
|
||||
#include "playlist/playlistitem.h"
|
||||
#include "playlist/playlistsequence.h"
|
||||
|
@ -103,12 +99,10 @@ void RegisterMetaTypes() {
|
|||
qRegisterMetaType<EngineBase::TrackChangeFlags>("EngineBase::TrackChangeFlags");
|
||||
qRegisterMetaType<EngineBase::OutputDetails>("EngineBase::OutputDetails");
|
||||
qRegisterMetaType<EngineMetadata>("EngineMetadata");
|
||||
#ifdef HAVE_GSTREAMER
|
||||
qRegisterMetaType<GstBuffer*>("GstBuffer*");
|
||||
qRegisterMetaType<GstElement*>("GstElement*");
|
||||
qRegisterMetaType<GstState>("GstState");
|
||||
qRegisterMetaType<GstEnginePipeline*>("GstEnginePipeline*");
|
||||
#endif
|
||||
qRegisterMetaType<CollectionDirectory>("CollectionDirectory");
|
||||
qRegisterMetaType<CollectionDirectoryList>("CollectionDirectoryList");
|
||||
qRegisterMetaType<CollectionSubdirectory>("CollectionSubdirectory");
|
||||
|
|
|
@ -49,14 +49,8 @@
|
|||
|
||||
#include "engine/enginebase.h"
|
||||
#include "engine/enginemetadata.h"
|
||||
|
||||
#ifdef HAVE_GSTREAMER
|
||||
# include "engine/gstengine.h"
|
||||
# include "engine/gststartup.h"
|
||||
#endif
|
||||
#ifdef HAVE_VLC
|
||||
# include "engine/vlcengine.h"
|
||||
#endif
|
||||
#include "engine/gstengine.h"
|
||||
#include "engine/gststartup.h"
|
||||
|
||||
#include "collection/collectionbackend.h"
|
||||
#include "playlist/playlist.h"
|
||||
|
@ -79,9 +73,7 @@ Player::Player(Application *app, QObject *parent)
|
|||
: PlayerInterface(parent),
|
||||
app_(app),
|
||||
engine_(nullptr),
|
||||
#ifdef HAVE_GSTREAMER
|
||||
gst_startup_(new GstStartup(this)),
|
||||
#endif
|
||||
analyzer_(nullptr),
|
||||
equalizer_(nullptr),
|
||||
timer_save_volume_(new QTimer(this)),
|
||||
|
@ -124,7 +116,6 @@ EngineBase::Type Player::CreateEngine(EngineBase::Type enginetype) {
|
|||
for (int i = 0; use_enginetype == EngineBase::Type::None; i++) {
|
||||
switch (enginetype) {
|
||||
case EngineBase::Type::None:
|
||||
#ifdef HAVE_GSTREAMER
|
||||
case EngineBase::Type::GStreamer:{
|
||||
use_enginetype=EngineBase::Type::GStreamer;
|
||||
ScopedPtr<GstEngine> gst_engine(new GstEngine(app_->task_manager()));
|
||||
|
@ -132,13 +123,6 @@ EngineBase::Type Player::CreateEngine(EngineBase::Type enginetype) {
|
|||
engine_.reset(gst_engine.release());
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
#ifdef HAVE_VLC
|
||||
case EngineBase::Type::VLC:
|
||||
use_enginetype = EngineBase::Type::VLC;
|
||||
engine_ = make_shared<VLCEngine>(app_->task_manager());
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
if (i > 0) {
|
||||
qFatal("No engine available!");
|
||||
|
|
|
@ -44,9 +44,7 @@ class Application;
|
|||
class Song;
|
||||
class AnalyzerContainer;
|
||||
class Equalizer;
|
||||
#ifdef HAVE_GSTREAMER
|
||||
class GstStartup;
|
||||
#endif
|
||||
|
||||
class PlayerInterface : public QObject {
|
||||
Q_OBJECT
|
||||
|
@ -228,9 +226,7 @@ class Player : public PlayerInterface {
|
|||
private:
|
||||
Application *app_;
|
||||
SharedPtr<EngineBase> engine_;
|
||||
#ifdef HAVE_GSTREAMER
|
||||
GstStartup *gst_startup_;
|
||||
#endif
|
||||
AnalyzerContainer *analyzer_;
|
||||
SharedPtr<Equalizer> equalizer_;
|
||||
QTimer *timer_save_volume_;
|
||||
|
|
|
@ -23,9 +23,7 @@
|
|||
|
||||
#include <algorithm>
|
||||
|
||||
#ifdef HAVE_GSTREAMER
|
||||
# include <gst/gst.h>
|
||||
#endif
|
||||
#include <gst/gst.h>
|
||||
|
||||
#include <QObject>
|
||||
#include <QIODevice>
|
||||
|
@ -58,7 +56,7 @@
|
|||
#include "playlistparsers/parserbase.h"
|
||||
#include "playlistparsers/playlistparser.h"
|
||||
|
||||
#if defined(HAVE_AUDIOCD) && defined(HAVE_GSTREAMER)
|
||||
#ifdef HAVE_AUDIOCD
|
||||
# include "device/cddasongloader.h"
|
||||
#endif
|
||||
|
||||
|
@ -78,10 +76,8 @@ SongLoader::SongLoader(SharedPtr<CollectionBackendInterface> collection_backend,
|
|||
parser_(nullptr),
|
||||
state_(State::WaitingForType),
|
||||
timeout_(kDefaultTimeout),
|
||||
#ifdef HAVE_GSTREAMER
|
||||
fakesink_(nullptr),
|
||||
buffer_probe_cb_id_(0),
|
||||
#endif
|
||||
success_(false) {
|
||||
|
||||
if (sRawUriSchemes.isEmpty()) {
|
||||
|
@ -104,9 +100,7 @@ SongLoader::SongLoader(SharedPtr<CollectionBackendInterface> collection_backend,
|
|||
|
||||
SongLoader::~SongLoader() {
|
||||
|
||||
#ifdef HAVE_GSTREAMER
|
||||
CleanupPipeline();
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
|
@ -128,13 +122,8 @@ SongLoader::Result SongLoader::Load(const QUrl &url) {
|
|||
}
|
||||
|
||||
if (player_->engine()->type() == EngineBase::Type::GStreamer) {
|
||||
#ifdef HAVE_GSTREAMER
|
||||
preload_func_ = std::bind(&SongLoader::LoadRemote, this);
|
||||
return Result::BlockingLoadRequired;
|
||||
#else
|
||||
errors_ << tr("You need GStreamer for this URL.");
|
||||
return Result::Error;
|
||||
#endif
|
||||
}
|
||||
else {
|
||||
errors_ << tr("You need GStreamer for this URL.");
|
||||
|
@ -193,7 +182,7 @@ SongLoader::Result SongLoader::LoadLocalPartial(const QString &filename) {
|
|||
|
||||
SongLoader::Result SongLoader::LoadAudioCD() {
|
||||
|
||||
#if defined(HAVE_AUDIOCD) && defined(HAVE_GSTREAMER)
|
||||
#ifdef HAVE_AUDIOCD
|
||||
if (player_->engine()->type() == EngineBase::Type::GStreamer) {
|
||||
CddaSongLoader *cdda_song_loader = new CddaSongLoader(QUrl(), this);
|
||||
QObject::connect(cdda_song_loader, &CddaSongLoader::SongsDurationLoaded, this, &SongLoader::AudioCDTracksLoadFinishedSlot);
|
||||
|
@ -205,13 +194,13 @@ SongLoader::Result SongLoader::LoadAudioCD() {
|
|||
#endif
|
||||
errors_ << tr("CD playback is only available with the GStreamer engine.");
|
||||
return Result::Error;
|
||||
#if defined(HAVE_AUDIOCD) && defined(HAVE_GSTREAMER)
|
||||
#ifdef HAVE_AUDIOCD
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
#if defined(HAVE_AUDIOCD) && defined(HAVE_GSTREAMER)
|
||||
#ifdef HAVE_AUDIOCD
|
||||
|
||||
void SongLoader::AudioCDTracksLoadFinishedSlot(const SongList &songs, const QString &error) {
|
||||
|
||||
|
@ -436,13 +425,12 @@ void SongLoader::Timeout() {
|
|||
|
||||
void SongLoader::StopTypefind() {
|
||||
|
||||
#ifdef HAVE_GSTREAMER
|
||||
// Destroy the pipeline
|
||||
if (pipeline_) {
|
||||
gst_element_set_state(&*pipeline_, GST_STATE_NULL);
|
||||
CleanupPipeline();
|
||||
}
|
||||
#endif
|
||||
|
||||
timeout_timer_->stop();
|
||||
|
||||
if (success_ && parser_) {
|
||||
|
@ -467,7 +455,6 @@ void SongLoader::StopTypefind() {
|
|||
|
||||
}
|
||||
|
||||
#ifdef HAVE_GSTREAMER
|
||||
SongLoader::Result SongLoader::LoadRemote() {
|
||||
|
||||
qLog(Debug) << "Loading remote file" << url_;
|
||||
|
@ -542,9 +529,7 @@ SongLoader::Result SongLoader::LoadRemote() {
|
|||
return Result::Success;
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_GSTREAMER
|
||||
void SongLoader::TypeFound(GstElement *typefind, const uint probability, GstCaps *caps, void *self) {
|
||||
|
||||
Q_UNUSED(typefind)
|
||||
|
@ -567,9 +552,7 @@ void SongLoader::TypeFound(GstElement *typefind, const uint probability, GstCaps
|
|||
instance->StopTypefindAsync(true);
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_GSTREAMER
|
||||
GstPadProbeReturn SongLoader::DataReady(GstPad *pad, GstPadProbeInfo *info, gpointer self) {
|
||||
|
||||
Q_UNUSED(pad)
|
||||
|
@ -595,10 +578,9 @@ GstPadProbeReturn SongLoader::DataReady(GstPad *pad, GstPadProbeInfo *info, gpoi
|
|||
}
|
||||
|
||||
return GST_PAD_PROBE_OK;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_GSTREAMER
|
||||
}
|
||||
|
||||
gboolean SongLoader::BusWatchCallback(GstBus *bus, GstMessage *msg, gpointer self) {
|
||||
|
||||
Q_UNUSED(bus)
|
||||
|
@ -615,10 +597,9 @@ gboolean SongLoader::BusWatchCallback(GstBus *bus, GstMessage *msg, gpointer sel
|
|||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_GSTREAMER
|
||||
}
|
||||
|
||||
GstBusSyncReply SongLoader::BusCallbackSync(GstBus *bus, GstMessage *msg, gpointer self) {
|
||||
|
||||
Q_UNUSED(bus)
|
||||
|
@ -637,11 +618,11 @@ GstBusSyncReply SongLoader::BusCallbackSync(GstBus *bus, GstMessage *msg, gpoint
|
|||
default:
|
||||
break;
|
||||
}
|
||||
return GST_BUS_PASS;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_GSTREAMER
|
||||
return GST_BUS_PASS;
|
||||
|
||||
}
|
||||
|
||||
void SongLoader::ErrorMessageReceived(GstMessage *msg) {
|
||||
|
||||
if (state_ == State::Finished) return;
|
||||
|
@ -667,9 +648,7 @@ void SongLoader::ErrorMessageReceived(GstMessage *msg) {
|
|||
StopTypefindAsync(false);
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_GSTREAMER
|
||||
void SongLoader::EndOfStreamReached() {
|
||||
|
||||
qLog(Debug) << Q_FUNC_INFO << static_cast<int>(state_);
|
||||
|
@ -696,9 +675,7 @@ void SongLoader::EndOfStreamReached() {
|
|||
}
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_GSTREAMER
|
||||
void SongLoader::MagicReady() {
|
||||
|
||||
qLog(Debug) << Q_FUNC_INFO;
|
||||
|
@ -730,9 +707,7 @@ void SongLoader::MagicReady() {
|
|||
}
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_GSTREAMER
|
||||
bool SongLoader::IsPipelinePlaying() {
|
||||
|
||||
GstState state = GST_STATE_NULL;
|
||||
|
@ -746,9 +721,7 @@ bool SongLoader::IsPipelinePlaying() {
|
|||
return state == GST_STATE_PLAYING;
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_GSTREAMER
|
||||
void SongLoader::StopTypefindAsync(const bool success) {
|
||||
|
||||
state_ = State::Finished;
|
||||
|
@ -757,7 +730,6 @@ void SongLoader::StopTypefindAsync(const bool success) {
|
|||
QMetaObject::invokeMethod(this, &SongLoader::StopTypefind, Qt::QueuedConnection);
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
void SongLoader::ScheduleTimeoutAsync() {
|
||||
|
||||
|
@ -776,8 +748,6 @@ void SongLoader::ScheduleTimeout() {
|
|||
|
||||
}
|
||||
|
||||
#ifdef HAVE_GSTREAMER
|
||||
|
||||
void SongLoader::CleanupPipeline() {
|
||||
|
||||
if (pipeline_) {
|
||||
|
@ -809,4 +779,3 @@ void SongLoader::CleanupPipeline() {
|
|||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -27,10 +27,7 @@
|
|||
#include <memory>
|
||||
#include <functional>
|
||||
#include <glib.h>
|
||||
|
||||
#ifdef HAVE_GSTREAMER
|
||||
# include <gst/gst.h>
|
||||
#endif
|
||||
#include <gst/gst.h>
|
||||
|
||||
#include <QtGlobal>
|
||||
#include <QObject>
|
||||
|
@ -51,7 +48,7 @@ class PlaylistParser;
|
|||
class ParserBase;
|
||||
class CueParser;
|
||||
|
||||
#if defined(HAVE_AUDIOCD) && defined(HAVE_GSTREAMER)
|
||||
#ifdef HAVE_AUDIOCD
|
||||
class CddaSongLoader;
|
||||
#endif
|
||||
|
||||
|
@ -95,10 +92,10 @@ class SongLoader : public QObject {
|
|||
void ScheduleTimeout();
|
||||
void Timeout();
|
||||
void StopTypefind();
|
||||
#if defined(HAVE_AUDIOCD) && defined(HAVE_GSTREAMER)
|
||||
#ifdef HAVE_AUDIOCD
|
||||
void AudioCDTracksLoadFinishedSlot(const SongList &songs, const QString &error);
|
||||
void AudioCDTracksTagsLoaded(const SongList &songs);
|
||||
#endif // HAVE_AUDIOCD && HAVE_GSTREAMER
|
||||
#endif // HAVE_AUDIOCD
|
||||
|
||||
private:
|
||||
enum class State {
|
||||
|
@ -117,7 +114,6 @@ class SongLoader : public QObject {
|
|||
|
||||
void AddAsRawStream();
|
||||
|
||||
#ifdef HAVE_GSTREAMER
|
||||
Result LoadRemote();
|
||||
|
||||
// GStreamer callbacks
|
||||
|
@ -132,7 +128,6 @@ class SongLoader : public QObject {
|
|||
bool IsPipelinePlaying();
|
||||
void StopTypefindAsync(const bool success);
|
||||
void CleanupPipeline();
|
||||
#endif
|
||||
|
||||
void ScheduleTimeoutAsync();
|
||||
|
||||
|
@ -156,11 +151,9 @@ class SongLoader : public QObject {
|
|||
State state_;
|
||||
int timeout_;
|
||||
|
||||
#ifdef HAVE_GSTREAMER
|
||||
SharedPtr<GstElement> pipeline_;
|
||||
GstElement *fakesink_;
|
||||
gulong buffer_probe_cb_id_;
|
||||
#endif
|
||||
|
||||
QThreadPool thread_pool_;
|
||||
QStringList errors_;
|
||||
|
|
|
@ -65,7 +65,7 @@
|
|||
#ifdef HAVE_GIO
|
||||
# include "giolister.h"
|
||||
#endif
|
||||
#if defined(HAVE_AUDIOCD) && defined(HAVE_GSTREAMER)
|
||||
#ifdef HAVE_AUDIOCD
|
||||
# include "cddalister.h"
|
||||
# include "cddadevice.h"
|
||||
#endif
|
||||
|
@ -115,7 +115,7 @@ DeviceManager::DeviceManager(Application *app, QObject *parent)
|
|||
connected_devices_model_->setSourceModel(this);
|
||||
|
||||
// CD devices are detected via the DiskArbitration framework instead on MacOs.
|
||||
#if defined(HAVE_AUDIOCD) && defined(HAVE_GSTREAMER) && !defined(Q_OS_MACOS)
|
||||
#if defined(HAVE_AUDIOCD) && !defined(Q_OS_MACOS)
|
||||
AddLister(new CddaLister);
|
||||
#endif
|
||||
#if defined(HAVE_DBUS) && defined(HAVE_UDISKS2)
|
||||
|
@ -128,7 +128,7 @@ DeviceManager::DeviceManager(Application *app, QObject *parent)
|
|||
AddLister(new MacOsDeviceLister);
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_AUDIOCD) && defined(HAVE_GSTREAMER)
|
||||
#ifdef HAVE_AUDIOCD
|
||||
AddDeviceClass<CddaDevice>();
|
||||
#endif
|
||||
|
||||
|
|
|
@ -54,9 +54,7 @@
|
|||
#include "devicelister.h"
|
||||
#include "devicemanager.h"
|
||||
#include "deviceproperties.h"
|
||||
#ifdef HAVE_GSTREAMER
|
||||
# include "transcoder/transcoder.h"
|
||||
#endif
|
||||
#include "transcoder/transcoder.h"
|
||||
#include "ui_deviceproperties.h"
|
||||
|
||||
DeviceProperties::DeviceProperties(QWidget *parent)
|
||||
|
@ -103,14 +101,12 @@ void DeviceProperties::ShowDevice(const QModelIndex &idx) {
|
|||
item->setData(Qt::UserRole, icon_name);
|
||||
}
|
||||
|
||||
#ifdef HAVE_GSTREAMER
|
||||
// Load the transcode formats the first time the dialog is shown
|
||||
const QList<TranscoderPreset> presets = Transcoder::GetAllPresets();
|
||||
for (const TranscoderPreset &preset : presets) {
|
||||
ui_->transcode_format->addItem(preset.name_, QVariant::fromValue(preset.filetype_));
|
||||
}
|
||||
ui_->transcode_format->model()->sort(0);
|
||||
#endif
|
||||
}
|
||||
|
||||
index_ = idx;
|
||||
|
@ -310,7 +306,6 @@ void DeviceProperties::UpdateFormatsFinished() {
|
|||
}
|
||||
ui_->supported_formats->sortItems();
|
||||
|
||||
#ifdef HAVE_GSTREAMER
|
||||
// Set the format combobox item
|
||||
TranscoderPreset preset = Transcoder::PresetForFileType(static_cast<Song::FileType>(index_.data(DeviceManager::Role_TranscodeFormat).toInt()));
|
||||
if (preset.filetype_ == Song::FileType::Unknown) {
|
||||
|
@ -319,7 +314,6 @@ void DeviceProperties::UpdateFormatsFinished() {
|
|||
preset = Transcoder::PresetForFileType(Transcoder::PickBestFormat(supported_formats_));
|
||||
}
|
||||
ui_->transcode_format->setCurrentIndex(ui_->transcode_format->findText(preset.name_));
|
||||
#endif
|
||||
|
||||
ui_->formats_stack->setCurrentWidget(ui_->formats_page);
|
||||
|
||||
|
|
|
@ -86,7 +86,6 @@ EngineBase::~EngineBase() = default;
|
|||
EngineBase::Type EngineBase::TypeFromName(const QString &name) {
|
||||
|
||||
if (name.compare("gstreamer"_L1, Qt::CaseInsensitive) == 0) return Type::GStreamer;
|
||||
if (name.compare("vlc"_L1, Qt::CaseInsensitive) == 0) return Type::VLC;
|
||||
|
||||
return Type::None;
|
||||
|
||||
|
@ -96,7 +95,6 @@ QString EngineBase::Name(const Type type) {
|
|||
|
||||
switch (type) {
|
||||
case Type::GStreamer: return QStringLiteral("gstreamer");
|
||||
case Type::VLC: return QStringLiteral("vlc");
|
||||
case Type::None:
|
||||
default: return QStringLiteral("None");
|
||||
}
|
||||
|
@ -107,7 +105,6 @@ QString EngineBase::Description(const Type type) {
|
|||
|
||||
switch (type) {
|
||||
case Type::GStreamer: return QStringLiteral("GStreamer");
|
||||
case Type::VLC: return QStringLiteral("VLC");
|
||||
case Type::None:
|
||||
default: return QStringLiteral("None");
|
||||
}
|
||||
|
|
|
@ -1,349 +0,0 @@
|
|||
/*
|
||||
* Strawberry Music Player
|
||||
* This file was part of Clementine.
|
||||
* Copyright 2010, David Sansome <me@davidsansome.com>
|
||||
* Copyright 2017-2018, Jonas Kvinge <jonas@jkvinge.net>
|
||||
*
|
||||
* Strawberry is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Strawberry is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Strawberry. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <optional>
|
||||
|
||||
#include <vlc/vlc.h>
|
||||
|
||||
#include <QtGlobal>
|
||||
#include <QMetaType>
|
||||
#include <QVariant>
|
||||
#include <QByteArray>
|
||||
#include <QUrl>
|
||||
|
||||
#include "core/shared_ptr.h"
|
||||
#include "core/taskmanager.h"
|
||||
#include "core/logging.h"
|
||||
#include "utilities/timeconstants.h"
|
||||
#include "enginebase.h"
|
||||
#include "vlcengine.h"
|
||||
#include "vlcscopedref.h"
|
||||
|
||||
using namespace Qt::StringLiterals;
|
||||
|
||||
VLCEngine::VLCEngine(SharedPtr<TaskManager> task_manager, QObject *parent)
|
||||
: EngineBase(parent),
|
||||
instance_(nullptr),
|
||||
player_(nullptr),
|
||||
state_(State::Empty) {
|
||||
|
||||
Q_UNUSED(task_manager);
|
||||
|
||||
ReloadSettings();
|
||||
|
||||
}
|
||||
|
||||
VLCEngine::~VLCEngine() {
|
||||
|
||||
if (state_ == State::Playing || state_ == State::Paused) {
|
||||
libvlc_media_player_stop(player_);
|
||||
}
|
||||
|
||||
libvlc_event_manager_t *player_em = libvlc_media_player_event_manager(player_);
|
||||
if (player_em) {
|
||||
libvlc_event_detach(player_em, libvlc_MediaPlayerEncounteredError, StateChangedCallback, this);
|
||||
libvlc_event_detach(player_em, libvlc_MediaPlayerNothingSpecial, StateChangedCallback, this);
|
||||
libvlc_event_detach(player_em, libvlc_MediaPlayerOpening, StateChangedCallback, this);
|
||||
libvlc_event_detach(player_em, libvlc_MediaPlayerBuffering, StateChangedCallback, this);
|
||||
libvlc_event_detach(player_em, libvlc_MediaPlayerPlaying, StateChangedCallback, this);
|
||||
libvlc_event_detach(player_em, libvlc_MediaPlayerPaused, StateChangedCallback, this);
|
||||
libvlc_event_detach(player_em, libvlc_MediaPlayerStopped, StateChangedCallback, this);
|
||||
libvlc_event_detach(player_em, libvlc_MediaPlayerEndReached, StateChangedCallback, this);
|
||||
}
|
||||
|
||||
libvlc_media_player_release(player_);
|
||||
libvlc_release(instance_);
|
||||
|
||||
}
|
||||
|
||||
bool VLCEngine::Init() {
|
||||
|
||||
// Create the VLC instance
|
||||
instance_ = libvlc_new(0, nullptr);
|
||||
if (!instance_) return false;
|
||||
|
||||
// Create the media player
|
||||
player_ = libvlc_media_player_new(instance_);
|
||||
if (!player_) return false;
|
||||
|
||||
// Add event handlers
|
||||
libvlc_event_manager_t *player_em = libvlc_media_player_event_manager(player_);
|
||||
if (!player_em) return false;
|
||||
|
||||
AttachCallback(player_em, libvlc_MediaPlayerEncounteredError, StateChangedCallback);
|
||||
AttachCallback(player_em, libvlc_MediaPlayerNothingSpecial, StateChangedCallback);
|
||||
AttachCallback(player_em, libvlc_MediaPlayerOpening, StateChangedCallback);
|
||||
AttachCallback(player_em, libvlc_MediaPlayerBuffering, StateChangedCallback);
|
||||
AttachCallback(player_em, libvlc_MediaPlayerPlaying, StateChangedCallback);
|
||||
AttachCallback(player_em, libvlc_MediaPlayerPaused, StateChangedCallback);
|
||||
AttachCallback(player_em, libvlc_MediaPlayerStopped, StateChangedCallback);
|
||||
AttachCallback(player_em, libvlc_MediaPlayerEndReached, StateChangedCallback);
|
||||
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
bool VLCEngine::Load(const QUrl &media_url, const QUrl &stream_url, const EngineBase::TrackChangeFlags change, const bool force_stop_at_end, const quint64 beginning_nanosec, const qint64 end_nanosec, const std::optional<double> ebur128_integrated_loudness_lufs) {
|
||||
|
||||
// FIXME: why is this not calling `EngineBase::Load()`?
|
||||
|
||||
Q_UNUSED(media_url);
|
||||
Q_UNUSED(ebur128_integrated_loudness_lufs);
|
||||
Q_UNUSED(change);
|
||||
Q_UNUSED(force_stop_at_end);
|
||||
Q_UNUSED(beginning_nanosec);
|
||||
Q_UNUSED(end_nanosec);
|
||||
|
||||
if (!Initialized()) return false;
|
||||
|
||||
// Create the media object
|
||||
VlcScopedRef<libvlc_media_t> media(libvlc_media_new_location(instance_, stream_url.toEncoded().constData()));
|
||||
|
||||
libvlc_media_player_set_media(player_, media);
|
||||
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
bool VLCEngine::Play(const bool pause, const quint64 offset_nanosec) {
|
||||
|
||||
Q_UNUSED(pause);
|
||||
|
||||
if (!Initialized()) return false;
|
||||
|
||||
// Set audio output
|
||||
if (!output_.isEmpty() && output_ != "auto"_L1) {
|
||||
int result = libvlc_audio_output_set(player_, output_.toUtf8().constData());
|
||||
if (result != 0) qLog(Error) << "Failed to set output to" << output_;
|
||||
}
|
||||
|
||||
// Set audio device
|
||||
if (device_.isValid() && device_.metaType().id() == QMetaType::QString && !device_.toString().isEmpty()) {
|
||||
libvlc_audio_output_device_set(player_, nullptr, device_.toString().toLocal8Bit().data());
|
||||
}
|
||||
|
||||
int result = libvlc_media_player_play(player_);
|
||||
if (result != 0) return false;
|
||||
|
||||
Seek(offset_nanosec);
|
||||
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
void VLCEngine::Stop(const bool stop_after) {
|
||||
|
||||
Q_UNUSED(stop_after);
|
||||
|
||||
if (!Initialized()) return;
|
||||
libvlc_media_player_stop(player_);
|
||||
|
||||
}
|
||||
|
||||
void VLCEngine::Pause() {
|
||||
|
||||
if (!Initialized()) return;
|
||||
libvlc_media_player_pause(player_);
|
||||
|
||||
}
|
||||
|
||||
void VLCEngine::Unpause() {
|
||||
|
||||
if (!Initialized()) return;
|
||||
libvlc_media_player_play(player_);
|
||||
|
||||
}
|
||||
|
||||
void VLCEngine::Seek(const quint64 offset_nanosec) {
|
||||
|
||||
if (!Initialized()) return;
|
||||
|
||||
int offset = static_cast<int>(offset_nanosec / kNsecPerMsec);
|
||||
|
||||
uint len = length();
|
||||
if (len == 0) return;
|
||||
|
||||
float pos = static_cast<float>(offset) / static_cast<float>(len);
|
||||
|
||||
libvlc_media_player_set_position(player_, pos);
|
||||
|
||||
}
|
||||
|
||||
void VLCEngine::SetVolumeSW(const uint percent) {
|
||||
|
||||
if (!Initialized()) return;
|
||||
if (!volume_control_ && percent != 100) return;
|
||||
libvlc_audio_set_volume(player_, static_cast<int>(percent));
|
||||
|
||||
}
|
||||
|
||||
qint64 VLCEngine::position_nanosec() const {
|
||||
|
||||
if (state_ == State::Empty) return 0;
|
||||
const qint64 result = (position() * kNsecPerMsec);
|
||||
return qMax(0LL, result);
|
||||
|
||||
}
|
||||
|
||||
qint64 VLCEngine::length_nanosec() const {
|
||||
|
||||
if (state_ == State::Empty) return 0;
|
||||
const qint64 result = (end_nanosec_ - static_cast<qint64>(beginning_nanosec_));
|
||||
if (result > 0) {
|
||||
return result;
|
||||
}
|
||||
|
||||
// Get the length from the pipeline if we don't know.
|
||||
return (length() * kNsecPerMsec);
|
||||
|
||||
}
|
||||
|
||||
EngineBase::OutputDetailsList VLCEngine::GetOutputsList() const {
|
||||
|
||||
OutputDetailsList outputs;
|
||||
OutputDetails output_auto;
|
||||
output_auto.name = "auto"_L1;
|
||||
output_auto.description = "Automatically detected"_L1;
|
||||
outputs << output_auto;
|
||||
|
||||
libvlc_audio_output_t *audio_output_list = libvlc_audio_output_list_get(instance_);
|
||||
for (libvlc_audio_output_t *audio_output = audio_output_list; audio_output; audio_output = audio_output->p_next) {
|
||||
OutputDetails output;
|
||||
output.name = QString::fromUtf8(audio_output->psz_name);
|
||||
output.description = QString::fromUtf8(audio_output->psz_description);
|
||||
if (output.name == "auto"_L1) output.iconname = "soundcard"_L1;
|
||||
else if ((output.name == "alsa"_L1)||(output.name == "oss"_L1)) output.iconname = "alsa"_L1;
|
||||
else if (output.name== "jack"_L1) output.iconname = "jack"_L1;
|
||||
else if (output.name == "pulse"_L1) output.iconname = "pulseaudio"_L1;
|
||||
else if (output.name == "afile"_L1) output.iconname = "document-new"_L1;
|
||||
else output.iconname = "soundcard"_L1;
|
||||
outputs << output;
|
||||
}
|
||||
libvlc_audio_output_list_release(audio_output_list);
|
||||
|
||||
return outputs;
|
||||
|
||||
}
|
||||
|
||||
bool VLCEngine::ValidOutput(const QString &output) {
|
||||
|
||||
const OutputDetailsList output_details = GetOutputsList();
|
||||
return std::any_of(output_details.begin(), output_details.end(), [output](const OutputDetails &output_detail) { return output_detail.name == output; });
|
||||
|
||||
}
|
||||
|
||||
bool VLCEngine::CustomDeviceSupport(const QString &output) const {
|
||||
return output != "auto"_L1;
|
||||
}
|
||||
|
||||
bool VLCEngine::ALSADeviceSupport(const QString &output) const {
|
||||
return output == "alsa"_L1;
|
||||
}
|
||||
|
||||
bool VLCEngine::ExclusiveModeSupport(const QString &output) const {
|
||||
Q_UNUSED(output);
|
||||
return false;
|
||||
}
|
||||
|
||||
uint VLCEngine::position() const {
|
||||
|
||||
if (!Initialized() || !libvlc_media_player_is_playing(player_)) return 0;
|
||||
|
||||
float pos = libvlc_media_player_get_position(player_);
|
||||
return static_cast<uint>(pos * static_cast<float>(length()));
|
||||
|
||||
}
|
||||
|
||||
uint VLCEngine::length() const {
|
||||
|
||||
if (!Initialized() || !libvlc_media_player_is_playing(player_)) return 0;
|
||||
|
||||
return libvlc_media_player_get_length(player_);
|
||||
|
||||
}
|
||||
|
||||
bool VLCEngine::CanDecode(const QUrl &url) { Q_UNUSED(url); return true; }
|
||||
|
||||
void VLCEngine::AttachCallback(libvlc_event_manager_t *em, libvlc_event_type_t type, libvlc_callback_t callback) {
|
||||
|
||||
if (libvlc_event_attach(em, type, callback, this) != 0) {
|
||||
qLog(Error) << "Failed to attach callback.";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void VLCEngine::StateChangedCallback(const libvlc_event_t *e, void *data) {
|
||||
|
||||
VLCEngine *engine = reinterpret_cast<VLCEngine*>(data);
|
||||
|
||||
switch (e->type) {
|
||||
case libvlc_MediaPlayerNothingSpecial:
|
||||
case libvlc_MediaPlayerOpening:
|
||||
case libvlc_MediaPlayerBuffering:
|
||||
break;
|
||||
|
||||
case libvlc_MediaPlayerStopped:{
|
||||
const EngineBase::State state = engine->state_;
|
||||
engine->state_ = EngineBase::State::Empty;
|
||||
if (state == EngineBase::State::Playing) {
|
||||
Q_EMIT engine->StateChanged(engine->state_);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case libvlc_MediaPlayerEncounteredError:
|
||||
engine->state_ = EngineBase::State::Error;
|
||||
Q_EMIT engine->StateChanged(engine->state_);
|
||||
Q_EMIT engine->FatalError();
|
||||
break;
|
||||
|
||||
case libvlc_MediaPlayerPlaying:
|
||||
engine->state_ = EngineBase::State::Playing;
|
||||
Q_EMIT engine->StateChanged(engine->state_);
|
||||
break;
|
||||
|
||||
case libvlc_MediaPlayerPaused:
|
||||
engine->state_ = EngineBase::State::Paused;
|
||||
Q_EMIT engine->StateChanged(engine->state_);
|
||||
break;
|
||||
|
||||
case libvlc_MediaPlayerEndReached:
|
||||
engine->state_ = EngineBase::State::Idle;
|
||||
Q_EMIT engine->TrackEnded();
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void VLCEngine::GetDevicesList(const QString &output) const {
|
||||
|
||||
Q_UNUSED(output);
|
||||
|
||||
libvlc_audio_output_device_t *audio_output_device_list = libvlc_audio_output_device_list_get(instance_, output_.toUtf8().constData());
|
||||
for (libvlc_audio_output_device_t *audio_device = audio_output_device_list; audio_device; audio_device = audio_device->p_next) {
|
||||
qLog(Debug) << audio_device->psz_device << audio_device->psz_description;
|
||||
}
|
||||
libvlc_audio_output_device_list_release(audio_output_device_list);
|
||||
|
||||
}
|
|
@ -1,92 +0,0 @@
|
|||
/*
|
||||
* Strawberry Music Player
|
||||
* This file was part of Clementine.
|
||||
* Copyright 2010, David Sansome <me@davidsansome.com>
|
||||
* Copyright 2017-2018, Jonas Kvinge <jonas@jkvinge.net>
|
||||
*
|
||||
* Strawberry is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Strawberry is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Strawberry. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef VLCENGINE_H
|
||||
#define VLCENGINE_H
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <optional>
|
||||
|
||||
#include <vlc/vlc.h>
|
||||
|
||||
#include <QtGlobal>
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
#include <QUrl>
|
||||
|
||||
#include "core/shared_ptr.h"
|
||||
|
||||
#include "enginebase.h"
|
||||
|
||||
using namespace Qt::Literals::StringLiterals;
|
||||
|
||||
struct libvlc_event_t;
|
||||
|
||||
class TaskManager;
|
||||
|
||||
class VLCEngine : public EngineBase {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit VLCEngine(SharedPtr<TaskManager> task_manager, QObject *parent = nullptr);
|
||||
~VLCEngine() override;
|
||||
|
||||
Type type() const override { return Type::VLC; }
|
||||
bool Init() override;
|
||||
EngineBase::State state() const override { return state_; }
|
||||
bool Load(const QUrl &media_url, const QUrl &stream_url, const EngineBase::TrackChangeFlags change, const bool force_stop_at_end, const quint64 beginning_nanosec, const qint64 end_nanosec, const std::optional<double> ebur128_integrated_loudness_lufs) override;
|
||||
bool Play(const bool pause, const quint64 offset_nanosec) override;
|
||||
void Stop(const bool stop_after = false) override;
|
||||
void Pause() override;
|
||||
void Unpause() override;
|
||||
void Seek(const quint64 offset_nanosec) override;
|
||||
|
||||
protected:
|
||||
void SetVolumeSW(const uint percent) override;
|
||||
|
||||
public:
|
||||
qint64 position_nanosec() const override;
|
||||
qint64 length_nanosec() const override;
|
||||
|
||||
OutputDetailsList GetOutputsList() const override;
|
||||
bool ValidOutput(const QString &output) override;
|
||||
QString DefaultOutput() const override { return ""_L1; }
|
||||
bool CustomDeviceSupport(const QString &output) const override;
|
||||
bool ALSADeviceSupport(const QString &output) const override;
|
||||
bool ExclusiveModeSupport(const QString &output) const override;
|
||||
|
||||
private:
|
||||
libvlc_instance_t *instance_;
|
||||
libvlc_media_player_t *player_;
|
||||
State state_;
|
||||
|
||||
bool Initialized() const { return (instance_ && player_); }
|
||||
uint position() const;
|
||||
uint length() const;
|
||||
static bool CanDecode(const QUrl &url);
|
||||
void AttachCallback(libvlc_event_manager_t *em, libvlc_event_type_t type, libvlc_callback_t callback);
|
||||
static void StateChangedCallback(const libvlc_event_t *e, void *data);
|
||||
|
||||
void GetDevicesList(const QString &output) const;
|
||||
};
|
||||
|
||||
#endif // VLCENGINE_H
|
|
@ -1,71 +0,0 @@
|
|||
/*
|
||||
* Strawberry Music Player
|
||||
* This file was part of Clementine.
|
||||
* Copyright 2010, David Sansome <me@davidsansome.com>
|
||||
*
|
||||
* Strawberry is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Strawberry is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Strawberry. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef VLCSCOPEDREF_H
|
||||
#define VLCSCOPEDREF_H
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <vlc/vlc.h>
|
||||
|
||||
template<typename T>
|
||||
class VlcScopedRef {
|
||||
public:
|
||||
explicit VlcScopedRef(T *ptr);
|
||||
~VlcScopedRef();
|
||||
|
||||
operator T *() const { return ptr_; }
|
||||
operator bool() const { return ptr_; }
|
||||
T *operator->() const { return ptr_; }
|
||||
|
||||
private:
|
||||
VlcScopedRef(VlcScopedRef&) {}
|
||||
VlcScopedRef &operator =(const VlcScopedRef&) { return *this; }
|
||||
|
||||
T *ptr_;
|
||||
};
|
||||
|
||||
|
||||
#define VLCSCOPEDREF_DEFINE2(type, dtor) \
|
||||
template <> void VlcScopedRef_Release<libvlc_##type##_t>(libvlc_##type##_t *ptr) { \
|
||||
dtor(ptr); \
|
||||
}
|
||||
#define VLCSCOPEDREF_DEFINE(type) VLCSCOPEDREF_DEFINE2(type, libvlc_##type##_release)
|
||||
|
||||
template<typename T>
|
||||
void VlcScopedRef_Release(T *ptr);
|
||||
|
||||
VLCSCOPEDREF_DEFINE2(instance, libvlc_release)
|
||||
VLCSCOPEDREF_DEFINE(media_player)
|
||||
VLCSCOPEDREF_DEFINE(media)
|
||||
|
||||
template<> void VlcScopedRef_Release<char>(char *ptr) { free(ptr); }
|
||||
|
||||
template<typename T>
|
||||
VlcScopedRef<T>::VlcScopedRef(T *ptr)
|
||||
: ptr_(ptr) {
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
VlcScopedRef<T>::~VlcScopedRef() {
|
||||
VlcScopedRef_Release(ptr_);
|
||||
}
|
||||
|
||||
#endif // VLCSCOPEDREF_H
|
|
@ -43,9 +43,7 @@
|
|||
#include "utilities/strutils.h"
|
||||
#include "tagreader/tagreaderclient.h"
|
||||
#include "organize.h"
|
||||
#ifdef HAVE_GSTREAMER
|
||||
# include "transcoder/transcoder.h"
|
||||
#endif
|
||||
#include "transcoder/transcoder.h"
|
||||
|
||||
using namespace std::chrono_literals;
|
||||
|
||||
|
@ -60,9 +58,7 @@ Organize::Organize(SharedPtr<TaskManager> task_manager, SharedPtr<MusicStorage>
|
|||
: QObject(parent),
|
||||
thread_(nullptr),
|
||||
task_manager_(task_manager),
|
||||
#ifdef HAVE_GSTREAMER
|
||||
transcoder_(new Transcoder(this)),
|
||||
#endif
|
||||
process_files_timer_(new QTimer(this)),
|
||||
destination_(destination),
|
||||
format_(format),
|
||||
|
@ -109,10 +105,9 @@ void Organize::Start() {
|
|||
|
||||
thread_ = new QThread;
|
||||
QObject::connect(thread_, &QThread::started, this, &Organize::ProcessSomeFiles);
|
||||
#ifdef HAVE_GSTREAMER
|
||||
|
||||
QObject::connect(transcoder_, &Transcoder::JobComplete, this, &Organize::FileTranscoded);
|
||||
QObject::connect(transcoder_, &Transcoder::LogLine, this, &Organize::LogLine);
|
||||
#endif
|
||||
|
||||
moveToThread(thread_);
|
||||
thread_->start();
|
||||
|
@ -136,14 +131,12 @@ void Organize::ProcessSomeFiles() {
|
|||
|
||||
// None left?
|
||||
if (tasks_pending_.isEmpty()) {
|
||||
#ifdef HAVE_GSTREAMER
|
||||
if (!tasks_transcoding_.isEmpty()) {
|
||||
// Just wait - FileTranscoded will start us off again in a little while
|
||||
qLog(Debug) << "Waiting for transcoding jobs";
|
||||
transcode_progress_timer_.start(kTranscodeProgressInterval, this);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
UpdateProgress();
|
||||
|
||||
|
@ -180,7 +173,6 @@ void Organize::ProcessSomeFiles() {
|
|||
Song song = task.song_info_.song_;
|
||||
if (!song.is_valid()) continue;
|
||||
|
||||
#ifdef HAVE_GSTREAMER
|
||||
// Maybe this file is one that's been transcoded already?
|
||||
if (!task.transcoded_filename_.isEmpty()) {
|
||||
qLog(Debug) << "This file has already been transcoded";
|
||||
|
@ -217,7 +209,6 @@ void Organize::ProcessSomeFiles() {
|
|||
continue;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
MusicStorage::CopyJob job;
|
||||
job.source_ = task.transcoded_filename_.isEmpty() ? task.song_info_.song_.url().toLocalFile() : task.transcoded_filename_;
|
||||
|
@ -289,7 +280,6 @@ void Organize::ProcessSomeFiles() {
|
|||
|
||||
}
|
||||
|
||||
#ifdef HAVE_GSTREAMER
|
||||
Song::FileType Organize::CheckTranscode(Song::FileType original_type) const {
|
||||
|
||||
if (original_type == Song::FileType::Stream) return Song::FileType::Unknown;
|
||||
|
@ -316,7 +306,6 @@ Song::FileType Organize::CheckTranscode(Song::FileType original_type) const {
|
|||
return Song::FileType::Unknown;
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
void Organize::SetSongProgress(float progress, bool transcoded) {
|
||||
|
||||
|
@ -330,7 +319,6 @@ void Organize::UpdateProgress() {
|
|||
|
||||
const quint64 total = task_count_ * 100;
|
||||
|
||||
#ifdef HAVE_GSTREAMER
|
||||
// Update transcoding progress
|
||||
QMap<QString, float> transcode_progress = transcoder_->GetProgress();
|
||||
const QStringList filenames = transcode_progress.keys();
|
||||
|
@ -338,7 +326,6 @@ void Organize::UpdateProgress() {
|
|||
if (!tasks_transcoding_.contains(filename)) continue;
|
||||
tasks_transcoding_[filename].transcode_progress_ = transcode_progress[filename];
|
||||
}
|
||||
#endif
|
||||
|
||||
// Count the progress of all tasks that are in the queue.
|
||||
// Files that need transcoding total 50 for the transcode and 50 for the copy, files that only need to be copied total 100.
|
||||
|
@ -347,12 +334,11 @@ void Organize::UpdateProgress() {
|
|||
for (const Task &task : std::as_const(tasks_pending_)) {
|
||||
progress += qBound(0, static_cast<int>(task.transcode_progress_ * 50), 50);
|
||||
}
|
||||
#ifdef HAVE_GSTREAMER
|
||||
|
||||
const QList<Task> tasks_transcoding = tasks_transcoding_.values();
|
||||
for (const Task &task : tasks_transcoding) {
|
||||
progress += qBound(0, static_cast<int>(task.transcode_progress_ * 50), 50);
|
||||
}
|
||||
#endif
|
||||
|
||||
// Add the progress of the track that's currently copying
|
||||
progress += current_copy_progress_;
|
||||
|
@ -386,11 +372,9 @@ void Organize::timerEvent(QTimerEvent *e) {
|
|||
|
||||
QObject::timerEvent(e);
|
||||
|
||||
#ifdef HAVE_GSTREAMER
|
||||
if (e->timerId() == transcode_progress_timer_.timerId()) {
|
||||
UpdateProgress();
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -45,9 +45,7 @@ class QTimerEvent;
|
|||
|
||||
class MusicStorage;
|
||||
class TaskManager;
|
||||
#ifdef HAVE_GSTREAMER
|
||||
class Transcoder;
|
||||
#endif
|
||||
|
||||
class Organize : public QObject {
|
||||
Q_OBJECT
|
||||
|
@ -83,9 +81,7 @@ class Organize : public QObject {
|
|||
private:
|
||||
void SetSongProgress(float progress, bool transcoded = false);
|
||||
void UpdateProgress();
|
||||
#ifdef HAVE_GSTREAMER
|
||||
Song::FileType CheckTranscode(Song::FileType original_type) const;
|
||||
#endif
|
||||
|
||||
private:
|
||||
struct Task {
|
||||
|
@ -103,9 +99,7 @@ class Organize : public QObject {
|
|||
QThread *thread_;
|
||||
QThread *original_thread_;
|
||||
SharedPtr<TaskManager> task_manager_;
|
||||
#ifdef HAVE_GSTREAMER
|
||||
Transcoder *transcoder_;
|
||||
#endif
|
||||
QTimer *process_files_timer_;
|
||||
SharedPtr<MusicStorage> destination_;
|
||||
QList<Song::FileType> supported_filetypes_;
|
||||
|
|
|
@ -72,9 +72,7 @@
|
|||
#include "organizedialog.h"
|
||||
#include "organizeerrordialog.h"
|
||||
#include "ui_organizedialog.h"
|
||||
#ifdef HAVE_GSTREAMER
|
||||
# include "transcoder/transcoder.h"
|
||||
#endif
|
||||
#include "transcoder/transcoder.h"
|
||||
|
||||
using std::make_unique;
|
||||
|
||||
|
@ -522,13 +520,11 @@ void OrganizeDialog::UpdatePreviews() {
|
|||
|
||||
if (ok) {
|
||||
QString extension;
|
||||
#ifdef HAVE_GSTREAMER
|
||||
if (storage && storage->GetTranscodeMode() == MusicStorage::TranscodeMode::Transcode_Always) {
|
||||
const Song::FileType format = storage->GetTranscodeFormat();
|
||||
TranscoderPreset preset = Transcoder::PresetForFileType(format);
|
||||
extension = preset.extension_;
|
||||
}
|
||||
#endif
|
||||
new_songs_info_ = ComputeNewSongsFilenames(songs_, format_, extension);
|
||||
if (new_songs_info_.isEmpty()) {
|
||||
ok = false;
|
||||
|
|
|
@ -97,9 +97,7 @@ BackendSettingsPage::BackendSettingsPage(SettingsDialog *dialog, QWidget *parent
|
|||
#endif
|
||||
QObject::connect(ui_->stickyslider_replaygainpreamp, &StickySlider::valueChanged, this, &BackendSettingsPage::RgPreampChanged);
|
||||
QObject::connect(ui_->stickyslider_replaygainfallbackgain, &StickySlider::valueChanged, this, &BackendSettingsPage::RgFallbackGainChanged);
|
||||
#ifdef HAVE_GSTREAMER
|
||||
QObject::connect(ui_->stickyslider_ebur128_target_level, &StickySlider::valueChanged, this, &BackendSettingsPage::EbuR128TargetLevelChanged);
|
||||
#endif
|
||||
QObject::connect(ui_->checkbox_fadeout_stop, &QCheckBox::toggled, this, &BackendSettingsPage::FadingOptionsChanged);
|
||||
QObject::connect(ui_->checkbox_fadeout_cross, &QCheckBox::toggled, this, &BackendSettingsPage::FadingOptionsChanged);
|
||||
QObject::connect(ui_->checkbox_fadeout_auto, &QCheckBox::toggled, this, &BackendSettingsPage::FadingOptionsChanged);
|
||||
|
@ -132,12 +130,7 @@ void BackendSettingsPage::Load() {
|
|||
if (enginetype == EngineBase::Type::None && engine()) enginetype = engine()->type();
|
||||
|
||||
ui_->combobox_engine->clear();
|
||||
#ifdef HAVE_GSTREAMER
|
||||
ui_->combobox_engine->addItem(IconLoader::Load(QStringLiteral("gstreamer")), EngineBase::Description(EngineBase::Type::GStreamer), static_cast<int>(EngineBase::Type::GStreamer));
|
||||
#endif
|
||||
#ifdef HAVE_VLC
|
||||
ui_->combobox_engine->addItem(IconLoader::Load(QStringLiteral("vlc")), EngineBase::Description(EngineBase::Type::VLC), static_cast<int>(EngineBase::Type::VLC));
|
||||
#endif
|
||||
|
||||
enginetype_current_ = enginetype;
|
||||
output_current_ = s.value("output", QString()).toString();
|
||||
|
@ -192,12 +185,6 @@ void BackendSettingsPage::Load() {
|
|||
ui_->checkbox_replaygaincompression->setChecked(s.value("rgcompression", true).toBool());
|
||||
ui_->stickyslider_replaygainfallbackgain->setValue(static_cast<int>(s.value("rgfallbackgain", 0.0).toDouble() * 10 + 600));
|
||||
|
||||
#ifdef HAVE_GSTREAMER
|
||||
ui_->groupbox_ebur128->show();
|
||||
#else
|
||||
ui_->groupbox_ebur128->hide();
|
||||
#endif
|
||||
|
||||
ui_->radiobutton_ebur128_loudness_normalization->setChecked(s.value("ebur128_loudness_normalization", false).toBool());
|
||||
ui_->stickyslider_ebur128_target_level->setValue(static_cast<int>(s.value("ebur128_target_level_lufs", -23.0).toDouble() * 10));
|
||||
|
||||
|
@ -230,10 +217,7 @@ void BackendSettingsPage::Load() {
|
|||
FadingOptionsChanged();
|
||||
RgPreampChanged(ui_->stickyslider_replaygainpreamp->value());
|
||||
RgFallbackGainChanged(ui_->stickyslider_replaygainfallbackgain->value());
|
||||
|
||||
#ifdef HAVE_GSTREAMER
|
||||
EbuR128TargetLevelChanged(ui_->stickyslider_ebur128_target_level->value());
|
||||
#endif
|
||||
|
||||
Init(ui_->layout_backendsettingspage->parentWidget());
|
||||
if (!Settings().childGroups().contains(QLatin1String(kSettingsGroup))) set_changed();
|
||||
|
@ -684,7 +668,6 @@ void BackendSettingsPage::RgFallbackGainChanged(const int value) {
|
|||
|
||||
}
|
||||
|
||||
#ifdef HAVE_GSTREAMER
|
||||
void BackendSettingsPage::EbuR128TargetLevelChanged(const int value) {
|
||||
|
||||
double db = static_cast<double>(value) / 10;
|
||||
|
@ -692,7 +675,6 @@ void BackendSettingsPage::EbuR128TargetLevelChanged(const int value) {
|
|||
ui_->label_ebur128_target_level->setText(db_str);
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_ALSA
|
||||
void BackendSettingsPage::SwitchALSADevices(const ALSAPluginType alsa_plugin_type) {
|
||||
|
|
|
@ -69,9 +69,7 @@ class BackendSettingsPage : public SettingsPage {
|
|||
void DeviceStringChanged();
|
||||
void RgPreampChanged(const int value);
|
||||
void RgFallbackGainChanged(const int value);
|
||||
#ifdef HAVE_GSTREAMER
|
||||
void EbuR128TargetLevelChanged(const int value);
|
||||
#endif
|
||||
void radiobutton_alsa_hw_clicked(const bool checked);
|
||||
void radiobutton_alsa_plughw_clicked(const bool checked);
|
||||
void radiobutton_alsa_pcm_clicked(const bool checked);
|
||||
|
|
|
@ -140,9 +140,7 @@ SettingsDialog::SettingsDialog(Application *app, OSDBase *osd, QMainWindow *main
|
|||
AddPage(Page::Scrobbler, new ScrobblerSettingsPage(this, this), general);
|
||||
AddPage(Page::Covers, new CoversSettingsPage(this, this), general);
|
||||
AddPage(Page::Lyrics, new LyricsSettingsPage(this, this), general);
|
||||
#ifdef HAVE_GSTREAMER
|
||||
AddPage(Page::Transcoding, new TranscoderSettingsPage(this, this), general);
|
||||
#endif
|
||||
AddPage(Page::Proxy, new NetworkProxySettingsPage(this, this), general);
|
||||
|
||||
QTreeWidgetItem *iface = AddCategory(tr("User interface"));
|
||||
|
|
|
@ -498,6 +498,9 @@ msgstr ""
|
|||
msgid "Available fields"
|
||||
msgstr ""
|
||||
|
||||
msgid "Buffering"
|
||||
msgstr ""
|
||||
|
||||
msgid "Framerate"
|
||||
msgstr ""
|
||||
|
||||
|
@ -2010,6 +2013,64 @@ msgid ""
|
|||
"deleted:"
|
||||
msgstr ""
|
||||
|
||||
#, qt-format
|
||||
msgid ""
|
||||
"Could not create the GStreamer element \"%1\" - make sure you have all the "
|
||||
"required GStreamer plugins installed"
|
||||
msgstr ""
|
||||
|
||||
#, qt-format
|
||||
msgid "Successfully written %1"
|
||||
msgstr ""
|
||||
|
||||
#, qt-format
|
||||
msgid "Transcoding %1 files using %2 threads"
|
||||
msgstr ""
|
||||
|
||||
#, qt-format
|
||||
msgid "Error processing %1: %2"
|
||||
msgstr ""
|
||||
|
||||
#, qt-format
|
||||
msgid "Starting %1"
|
||||
msgstr ""
|
||||
|
||||
#, qt-format
|
||||
msgid ""
|
||||
"Couldn't find an encoder for %1, check you have the correct GStreamer "
|
||||
"plugins installed"
|
||||
msgstr ""
|
||||
|
||||
#, qt-format
|
||||
msgid ""
|
||||
"Couldn't find a muxer for %1, check you have the correct GStreamer plugins "
|
||||
"installed"
|
||||
msgstr ""
|
||||
|
||||
msgid "Start transcoding"
|
||||
msgstr ""
|
||||
|
||||
#, c-format, qt-plural-format
|
||||
msgctxt ""
|
||||
msgid "%n remaining"
|
||||
msgstr ""
|
||||
|
||||
#, c-format, qt-plural-format
|
||||
msgctxt ""
|
||||
msgid "%n finished"
|
||||
msgstr ""
|
||||
|
||||
#, c-format, qt-plural-format
|
||||
msgctxt ""
|
||||
msgid "%n failed"
|
||||
msgstr ""
|
||||
|
||||
msgid "Add files to transcode"
|
||||
msgstr ""
|
||||
|
||||
msgid "Open a directory to import music from"
|
||||
msgstr ""
|
||||
|
||||
msgid "Play/Pause"
|
||||
msgstr ""
|
||||
|
||||
|
@ -2104,9 +2165,6 @@ msgid ""
|
|||
"configured there instead."
|
||||
msgstr ""
|
||||
|
||||
msgid "Buffering"
|
||||
msgstr ""
|
||||
|
||||
msgid "D-Bus path"
|
||||
msgstr ""
|
||||
|
||||
|
@ -2245,64 +2303,6 @@ msgstr ""
|
|||
msgid "Error connecting MTP device %1: %2"
|
||||
msgstr ""
|
||||
|
||||
#, qt-format
|
||||
msgid ""
|
||||
"Could not create the GStreamer element \"%1\" - make sure you have all the "
|
||||
"required GStreamer plugins installed"
|
||||
msgstr ""
|
||||
|
||||
#, qt-format
|
||||
msgid "Successfully written %1"
|
||||
msgstr ""
|
||||
|
||||
#, qt-format
|
||||
msgid "Transcoding %1 files using %2 threads"
|
||||
msgstr ""
|
||||
|
||||
#, qt-format
|
||||
msgid "Error processing %1: %2"
|
||||
msgstr ""
|
||||
|
||||
#, qt-format
|
||||
msgid "Starting %1"
|
||||
msgstr ""
|
||||
|
||||
#, qt-format
|
||||
msgid ""
|
||||
"Couldn't find an encoder for %1, check you have the correct GStreamer "
|
||||
"plugins installed"
|
||||
msgstr ""
|
||||
|
||||
#, qt-format
|
||||
msgid ""
|
||||
"Couldn't find a muxer for %1, check you have the correct GStreamer plugins "
|
||||
"installed"
|
||||
msgstr ""
|
||||
|
||||
msgid "Start transcoding"
|
||||
msgstr ""
|
||||
|
||||
#, c-format, qt-plural-format
|
||||
msgctxt ""
|
||||
msgid "%n remaining"
|
||||
msgstr ""
|
||||
|
||||
#, c-format, qt-plural-format
|
||||
msgctxt ""
|
||||
msgid "%n finished"
|
||||
msgstr ""
|
||||
|
||||
#, c-format, qt-plural-format
|
||||
msgctxt ""
|
||||
msgid "%n failed"
|
||||
msgstr ""
|
||||
|
||||
msgid "Add files to transcode"
|
||||
msgstr ""
|
||||
|
||||
msgid "Open a directory to import music from"
|
||||
msgstr ""
|
||||
|
||||
msgid "Identifying song"
|
||||
msgstr ""
|
||||
|
||||
|
@ -3800,6 +3800,38 @@ msgstr ""
|
|||
msgid "Enable fading"
|
||||
msgstr ""
|
||||
|
||||
msgid "Transcoding"
|
||||
msgstr ""
|
||||
|
||||
msgid ""
|
||||
"These settings are used in the \"Transcode Music\" dialog, and when "
|
||||
"converting music before copying it to a device."
|
||||
msgstr ""
|
||||
|
||||
msgid "FLAC"
|
||||
msgstr ""
|
||||
|
||||
msgid "WavPack"
|
||||
msgstr ""
|
||||
|
||||
msgid "Vorbis"
|
||||
msgstr ""
|
||||
|
||||
msgid "Opus"
|
||||
msgstr ""
|
||||
|
||||
msgid "Speex"
|
||||
msgstr ""
|
||||
|
||||
msgid "AAC"
|
||||
msgstr ""
|
||||
|
||||
msgid "ASF (WMA)"
|
||||
msgstr ""
|
||||
|
||||
msgid "MP3"
|
||||
msgstr ""
|
||||
|
||||
msgid "Equalizer"
|
||||
msgstr ""
|
||||
|
||||
|
@ -4055,104 +4087,6 @@ msgstr ""
|
|||
msgid "Safely remove the device after copying"
|
||||
msgstr ""
|
||||
|
||||
msgid "Press a key"
|
||||
msgstr ""
|
||||
|
||||
msgid "Global Shortcuts"
|
||||
msgstr ""
|
||||
|
||||
msgid "Use Gnome (GSD) shortcuts when available"
|
||||
msgstr ""
|
||||
|
||||
msgid "Open..."
|
||||
msgstr ""
|
||||
|
||||
msgid "Use MATE shortcuts when available"
|
||||
msgstr ""
|
||||
|
||||
msgid "Use KDE (KGlobalAccel) shortcuts when available"
|
||||
msgstr ""
|
||||
|
||||
msgid "Use X11 shortcuts when available"
|
||||
msgstr ""
|
||||
|
||||
msgid ""
|
||||
"You need to launch System Preferences and allow Strawberry to \"<span "
|
||||
"style=\"font-style:italic\">control your computer</span>\" to use global "
|
||||
"shortcuts in Strawberry."
|
||||
msgstr ""
|
||||
|
||||
msgid "Shortcut"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "Category label"
|
||||
msgid "Action"
|
||||
msgstr ""
|
||||
|
||||
msgid "&None"
|
||||
msgstr ""
|
||||
|
||||
msgid "&Default"
|
||||
msgstr ""
|
||||
|
||||
msgid "&Custom"
|
||||
msgstr ""
|
||||
|
||||
msgid "Change shortcut..."
|
||||
msgstr ""
|
||||
|
||||
msgid "Device Properties"
|
||||
msgstr ""
|
||||
|
||||
msgid "Icon"
|
||||
msgstr ""
|
||||
|
||||
msgid "Hardware information"
|
||||
msgstr ""
|
||||
|
||||
msgid "Hardware information is only available while the device is connected."
|
||||
msgstr ""
|
||||
|
||||
msgid "Information"
|
||||
msgstr ""
|
||||
|
||||
msgid "Supported formats"
|
||||
msgstr ""
|
||||
|
||||
msgid "This device supports the following file formats:"
|
||||
msgstr ""
|
||||
|
||||
msgid ""
|
||||
"Strawberry can automatically convert the music you copy to this device into "
|
||||
"a format that it can play."
|
||||
msgstr ""
|
||||
|
||||
msgid "Do not convert any music"
|
||||
msgstr ""
|
||||
|
||||
msgid "Convert any music that the device can't play"
|
||||
msgstr ""
|
||||
|
||||
msgid "Convert all music"
|
||||
msgstr ""
|
||||
|
||||
msgid "Preferred format"
|
||||
msgstr ""
|
||||
|
||||
msgid ""
|
||||
"This device must be connected and opened before Strawberry can see what file "
|
||||
"formats it supports."
|
||||
msgstr ""
|
||||
|
||||
msgid "Open device"
|
||||
msgstr ""
|
||||
|
||||
msgid "Querying device..."
|
||||
msgstr ""
|
||||
|
||||
msgid "File formats"
|
||||
msgstr ""
|
||||
|
||||
msgid "Transcode Music"
|
||||
msgstr ""
|
||||
|
||||
|
@ -4316,36 +4250,102 @@ msgstr ""
|
|||
msgid "Force mono encoding"
|
||||
msgstr ""
|
||||
|
||||
msgid "Transcoding"
|
||||
msgid "Press a key"
|
||||
msgstr ""
|
||||
|
||||
msgid "Global Shortcuts"
|
||||
msgstr ""
|
||||
|
||||
msgid "Use Gnome (GSD) shortcuts when available"
|
||||
msgstr ""
|
||||
|
||||
msgid "Open..."
|
||||
msgstr ""
|
||||
|
||||
msgid "Use MATE shortcuts when available"
|
||||
msgstr ""
|
||||
|
||||
msgid "Use KDE (KGlobalAccel) shortcuts when available"
|
||||
msgstr ""
|
||||
|
||||
msgid "Use X11 shortcuts when available"
|
||||
msgstr ""
|
||||
|
||||
msgid ""
|
||||
"These settings are used in the \"Transcode Music\" dialog, and when "
|
||||
"converting music before copying it to a device."
|
||||
"You need to launch System Preferences and allow Strawberry to \"<span "
|
||||
"style=\"font-style:italic\">control your computer</span>\" to use global "
|
||||
"shortcuts in Strawberry."
|
||||
msgstr ""
|
||||
|
||||
msgid "FLAC"
|
||||
msgid "Shortcut"
|
||||
msgstr ""
|
||||
|
||||
msgid "WavPack"
|
||||
msgctxt "Category label"
|
||||
msgid "Action"
|
||||
msgstr ""
|
||||
|
||||
msgid "Vorbis"
|
||||
msgid "&None"
|
||||
msgstr ""
|
||||
|
||||
msgid "Opus"
|
||||
msgid "&Default"
|
||||
msgstr ""
|
||||
|
||||
msgid "Speex"
|
||||
msgid "&Custom"
|
||||
msgstr ""
|
||||
|
||||
msgid "AAC"
|
||||
msgid "Change shortcut..."
|
||||
msgstr ""
|
||||
|
||||
msgid "ASF (WMA)"
|
||||
msgid "Device Properties"
|
||||
msgstr ""
|
||||
|
||||
msgid "MP3"
|
||||
msgid "Icon"
|
||||
msgstr ""
|
||||
|
||||
msgid "Hardware information"
|
||||
msgstr ""
|
||||
|
||||
msgid "Hardware information is only available while the device is connected."
|
||||
msgstr ""
|
||||
|
||||
msgid "Information"
|
||||
msgstr ""
|
||||
|
||||
msgid "Supported formats"
|
||||
msgstr ""
|
||||
|
||||
msgid "This device supports the following file formats:"
|
||||
msgstr ""
|
||||
|
||||
msgid ""
|
||||
"Strawberry can automatically convert the music you copy to this device into "
|
||||
"a format that it can play."
|
||||
msgstr ""
|
||||
|
||||
msgid "Do not convert any music"
|
||||
msgstr ""
|
||||
|
||||
msgid "Convert any music that the device can't play"
|
||||
msgstr ""
|
||||
|
||||
msgid "Convert all music"
|
||||
msgstr ""
|
||||
|
||||
msgid "Preferred format"
|
||||
msgstr ""
|
||||
|
||||
msgid ""
|
||||
"This device must be connected and opened before Strawberry can see what file "
|
||||
"formats it supports."
|
||||
msgstr ""
|
||||
|
||||
msgid "Open device"
|
||||
msgstr ""
|
||||
|
||||
msgid "Querying device..."
|
||||
msgstr ""
|
||||
|
||||
msgid "File formats"
|
||||
msgstr ""
|
||||
|
||||
msgid "Server URL"
|
||||
|
|
|
@ -47,9 +47,9 @@ target_include_directories(test_gui_main PRIVATE
|
|||
${CMAKE_BINARY_DIR}/src
|
||||
${CMAKE_SOURCE_DIR}/src
|
||||
)
|
||||
if(HAVE_GSTREAMER)
|
||||
target_include_directories(test_gui_main SYSTEM PRIVATE ${GSTREAMER_INCLUDE_DIRS})
|
||||
endif()
|
||||
|
||||
target_include_directories(test_gui_main SYSTEM PRIVATE ${GSTREAMER_INCLUDE_DIRS})
|
||||
|
||||
target_link_libraries(test_gui_main PRIVATE strawberry_lib)
|
||||
set_target_properties(test_gui_main PROPERTIES COMPILE_DEFINITIONS GUI)
|
||||
|
||||
|
|
Loading…
Reference in New Issue