diff options
Diffstat (limited to 'indra/media_plugins')
4 files changed, 51 insertions, 15 deletions
diff --git a/indra/media_plugins/cef/CMakeLists.txt b/indra/media_plugins/cef/CMakeLists.txt index 042b658d75..236e117aa7 100644 --- a/indra/media_plugins/cef/CMakeLists.txt +++ b/indra/media_plugins/cef/CMakeLists.txt @@ -49,11 +49,6 @@ if (LINUX) linux/volume_catcher_pipewire.cpp ) - if (NOT (${LINUX_DISTRO} MATCHES ubuntu)) - message( "Building with Linux volume catcher for PulseAudio only and cancelling PipeWire" ) - list(REMOVE_ITEM LINUX_VOLUME_CATCHER linux/volume_catcher_pipewire.cpp) - endif () - list(APPEND media_plugin_cef_SOURCE_FILES ${LINUX_VOLUME_CATCHER}) set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--build-id -Wl,-rpath,'$ORIGIN:$ORIGIN/../../lib'") list(APPEND media_plugin_cef_LINK_LIBRARIES llwindow ) @@ -76,10 +71,6 @@ add_library(media_plugin_cef ${media_plugin_cef_SOURCE_FILES} ) -if (${LINUX_DISTRO} MATCHES ubuntu) - target_compile_definitions(media_plugin_cef PRIVATE USE_VOLUME_CATCHER_PW=1) -endif () - #add_dependencies(media_plugin_cef # ${MEDIA_PLUGIN_BASE_LIBRARIES} #) @@ -214,7 +205,6 @@ if (INSTALL) ${AUTOBUILD_INSTALL_DIR}/resources/chrome_200_percent.pak ${AUTOBUILD_INSTALL_DIR}/resources/icudtl.dat ${AUTOBUILD_INSTALL_DIR}/resources/resources.pak - ${AUTOBUILD_INSTALL_DIR}/bin/release/snapshot_blob.bin ${AUTOBUILD_INSTALL_DIR}/bin/release/v8_context_snapshot.bin DESTINATION llplugin ) diff --git a/indra/media_plugins/cef/linux/volume_catcher_linux.cpp b/indra/media_plugins/cef/linux/volume_catcher_linux.cpp index ba2ed1aa56..7d33242063 100644 --- a/indra/media_plugins/cef/linux/volume_catcher_linux.cpp +++ b/indra/media_plugins/cef/linux/volume_catcher_linux.cpp @@ -37,14 +37,12 @@ void VolumeCatcher::onEnablePipeWireVolumeCatcher(bool enable) if (pimpl != nullptr) return; -#if USE_VOLUME_CATCHER_PW if (enable) { LL_DEBUGS() << "volume catcher using pipewire" << LL_ENDL; pimpl = new VolumeCatcherPipeWire(); } else -#endif { LL_DEBUGS() << "volume catcher using pulseaudio" << LL_ENDL; pimpl = new VolumeCatcherPulseAudio(); diff --git a/indra/media_plugins/cef/linux/volume_catcher_pipewire.cpp b/indra/media_plugins/cef/linux/volume_catcher_pipewire.cpp index 27fea547c9..04bbbcff6c 100755 --- a/indra/media_plugins/cef/linux/volume_catcher_pipewire.cpp +++ b/indra/media_plugins/cef/linux/volume_catcher_pipewire.cpp @@ -207,7 +207,7 @@ void VolumeCatcherPipeWire::ChildNode::updateVolume() { std::lock_guard pwLock(*mImpl); - pw_node_set_param(mProxy, SPA_PARAM_Props, 0, pod); + pw_node_set_param((pw_node*)mProxy, SPA_PARAM_Props, 0, pod); } } @@ -303,7 +303,7 @@ void VolumeCatcherPipeWire::handleRegistryEventGlobal( childNode->mProxy = proxy; childNode->mImpl = this; - pw_node_add_listener(proxy, &childNode->mNodeListener, &NODE_EVENTS, childNode); + pw_node_add_listener((pw_node*)proxy, &childNode->mNodeListener, &NODE_EVENTS, childNode); llpw_proxy_add_listener(proxy, &childNode->mProxyListener, &PROXY_EVENTS, childNode); } diff --git a/indra/media_plugins/libvlc/media_plugin_libvlc.cpp b/indra/media_plugins/libvlc/media_plugin_libvlc.cpp index 3fe2c2b193..edf93f359a 100644 --- a/indra/media_plugins/libvlc/media_plugin_libvlc.cpp +++ b/indra/media_plugins/libvlc/media_plugin_libvlc.cpp @@ -191,7 +191,11 @@ void MediaPluginLibVLC::initVLC() // void MediaPluginLibVLC::resetVLC() { +#if LIBVLC_VERSION_MAJOR < 4 libvlc_media_player_stop(mLibVLCMediaPlayer); +#else + libvlc_media_player_stop_async(mLibVLCMediaPlayer); +#endif libvlc_media_player_release(mLibVLCMediaPlayer); libvlc_release(mLibVLC); } @@ -258,7 +262,11 @@ void MediaPluginLibVLC::eventCallbacks(const libvlc_event_t* event, void* ptr) parent->mVlcStatus = STATUS_DONE; break; +#if LIBVLC_VERSION_MAJOR < 4 case libvlc_MediaPlayerEndReached: +#else + case libvlc_MediaPlayerStopping: +#endif parent->mVlcStatus = STATUS_DONE; parent->mCurTime = parent->mDuration; parent->setDurationDirty(); @@ -285,6 +293,7 @@ void MediaPluginLibVLC::eventCallbacks(const libvlc_event_t* event, void* ptr) parent->setDurationDirty(); break; +#if LIBVLC_VERSION_MAJOR < 4 case libvlc_MediaPlayerTitleChanged: { char* title = libvlc_media_get_meta(parent->mLibVLCMedia, libvlc_meta_Title); @@ -294,6 +303,7 @@ void MediaPluginLibVLC::eventCallbacks(const libvlc_event_t* event, void* ptr) } } break; +#endif case libvlc_MediaMetaChanged: auto title = libvlc_media_get_meta(parent->mLibVLCMedia, libvlc_meta_Title); if (title) @@ -331,10 +341,18 @@ void MediaPluginLibVLC::playMedia() // memory. if (mLibVLCMediaPlayer) { +#if LIBVLC_VERSION_MAJOR < 4 libvlc_media_player_stop(mLibVLCMediaPlayer); +#else + libvlc_media_player_stop_async(mLibVLCMediaPlayer); +#endif } +#if LIBVLC_VERSION_MAJOR < 4 mLibVLCMedia = libvlc_media_new_location(mLibVLC, mURL.c_str()); +#else + mLibVLCMedia = libvlc_media_new_location(mURL.c_str()); +#endif if (!mLibVLCMedia) { mLibVLCMediaPlayer = 0; @@ -342,7 +360,11 @@ void MediaPluginLibVLC::playMedia() return; } +#if LIBVLC_VERSION_MAJOR < 4 mLibVLCMediaPlayer = libvlc_media_player_new_from_media(mLibVLCMedia); +#else + mLibVLCMediaPlayer = libvlc_media_player_new_from_media(mLibVLC, mLibVLCMedia); +#endif if (!mLibVLCMediaPlayer) { setStatus(STATUS_ERROR); @@ -357,12 +379,18 @@ void MediaPluginLibVLC::playMedia() libvlc_event_attach(em, libvlc_MediaPlayerPlaying, eventCallbacks, this); libvlc_event_attach(em, libvlc_MediaPlayerPaused, eventCallbacks, this); libvlc_event_attach(em, libvlc_MediaPlayerStopped, eventCallbacks, this); +#if LIBVLC_VERSION_MAJOR < 4 libvlc_event_attach(em, libvlc_MediaPlayerEndReached, eventCallbacks, this); +#else + libvlc_event_attach(em, libvlc_MediaPlayerStopping, eventCallbacks, this); +#endif libvlc_event_attach(em, libvlc_MediaPlayerEncounteredError, eventCallbacks, this); libvlc_event_attach(em, libvlc_MediaPlayerTimeChanged, eventCallbacks, this); libvlc_event_attach(em, libvlc_MediaPlayerPositionChanged, eventCallbacks, this); libvlc_event_attach(em, libvlc_MediaPlayerLengthChanged, eventCallbacks, this); +#if LIBVLC_VERSION_MAJOR < 4 libvlc_event_attach(em, libvlc_MediaPlayerTitleChanged, eventCallbacks, this); +#endif } auto event_manager = libvlc_media_event_manager(mLibVLCMedia); if (event_manager) @@ -548,7 +576,11 @@ void MediaPluginLibVLC::receiveMessage(const char* message_string) { if (mPixels == iter->second.mAddress) { +#if LIBVLC_VERSION_MAJOR < 4 libvlc_media_player_stop(mLibVLCMediaPlayer); +#else + libvlc_media_player_stop_async(mLibVLCMediaPlayer); +#endif libvlc_media_player_release(mLibVLCMediaPlayer); mLibVLCMediaPlayer = 0; @@ -612,7 +644,11 @@ void MediaPluginLibVLC::receiveMessage(const char* message_string) if (mLibVLCMediaPlayer) { +#if LIBVLC_VERSION_MAJOR < 4 libvlc_media_player_set_time(mLibVLCMediaPlayer, time); +#else + libvlc_media_player_set_time(mLibVLCMediaPlayer, time, true); +#endif time = libvlc_media_player_get_time(mLibVLCMediaPlayer); if (time < 0) { @@ -648,7 +684,11 @@ void MediaPluginLibVLC::receiveMessage(const char* message_string) { if (mLibVLCMediaPlayer) { +#if LIBVLC_VERSION_MAJOR < 4 libvlc_media_player_stop(mLibVLCMediaPlayer); +#else + libvlc_media_player_stop_async(mLibVLCMediaPlayer); +#endif } } else if (message_name == "start") @@ -658,9 +698,13 @@ void MediaPluginLibVLC::receiveMessage(const char* message_string) if (mVlcStatus == STATUS_DONE && !libvlc_media_player_is_playing(mLibVLCMediaPlayer)) { // stop or vlc will ignore 'play', it will just - // make an MediaPlayerEndReached event even if + // make an MediaPlayerEndReached/MediaPlayerStopping event even if // seek was used +#if LIBVLC_VERSION_MAJOR < 4 libvlc_media_player_stop(mLibVLCMediaPlayer); +#else + libvlc_media_player_stop_async(mLibVLCMediaPlayer); +#endif } libvlc_media_player_play(mLibVLCMediaPlayer); } @@ -677,7 +721,11 @@ void MediaPluginLibVLC::receiveMessage(const char* message_string) if (mLibVLCMediaPlayer) { libvlc_time_t time = (libvlc_time_t)(1000.0 * message_in.getValueReal("time")); +#if LIBVLC_VERSION_MAJOR < 4 libvlc_media_player_set_time(mLibVLCMediaPlayer, time); +#else + libvlc_media_player_set_time(mLibVLCMediaPlayer, time, true); +#endif time = libvlc_media_player_get_time(mLibVLCMediaPlayer); if (time < 0) { |
