summaryrefslogtreecommitdiff
path: root/indra/llplugin
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llplugin')
-rw-r--r--indra/llplugin/CMakeLists.txt9
-rw-r--r--indra/llplugin/llpluginclassmedia.cpp21
-rw-r--r--indra/llplugin/llpluginclassmedia.h8
-rw-r--r--indra/llplugin/llpluginsharedmemory.cpp4
-rw-r--r--indra/llplugin/slplugin/CMakeLists.txt15
-rw-r--r--indra/llplugin/slplugin/slplugin.cpp6
6 files changed, 51 insertions, 12 deletions
diff --git a/indra/llplugin/CMakeLists.txt b/indra/llplugin/CMakeLists.txt
index 14a69afe6e..7fa5c957b6 100644
--- a/indra/llplugin/CMakeLists.txt
+++ b/indra/llplugin/CMakeLists.txt
@@ -31,14 +31,6 @@ set(llplugin_HEADER_FILES
llpluginsharedmemory.h
)
-if(NOT ADDRESS_SIZE EQUAL 32)
- if(WINDOWS)
- ##add_definitions(/FIXED:NO)
- else(WINDOWS) # not windows therefore gcc LINUX and DARWIN
- add_definitions(-fPIC)
- endif(WINDOWS)
-endif(NOT ADDRESS_SIZE EQUAL 32)
-
list(APPEND llplugin_SOURCE_FILES ${llplugin_HEADER_FILES})
add_library (llplugin ${llplugin_SOURCE_FILES})
@@ -46,3 +38,4 @@ target_include_directories( llplugin INTERFACE ${CMAKE_CURRENT_SOURCE_DIR})
target_link_libraries( llplugin llcommon llmath llrender llmessage )
add_subdirectory(slplugin)
+include(LibraryInstall)
diff --git a/indra/llplugin/llpluginclassmedia.cpp b/indra/llplugin/llpluginclassmedia.cpp
index 8a356da93a..17f403e8e8 100644
--- a/indra/llplugin/llpluginclassmedia.cpp
+++ b/indra/llplugin/llpluginclassmedia.cpp
@@ -33,7 +33,9 @@
#include "llpluginmessageclasses.h"
#include "llcontrol.h"
+#if LL_DARWIN || LL_LINUX || __FreeBSD__
extern LLControlGroup gSavedSettings;
+#endif
#if LL_DARWIN
extern bool gHiDPISupport;
#endif
@@ -934,8 +936,10 @@ void LLPluginClassMedia::setUserDataPath(const std::string &user_data_path_cache
message.setValue("username", username); // cef shares cache between users but creates user-based contexts
message.setValue("cef_log_file", user_data_path_cef_log);
+#if LL_DARWIN || LL_LINUX || __FreeBSD__
bool cef_verbose_log = gSavedSettings.getBOOL("CefVerboseLog");
message.setValueBoolean("cef_verbose_log", cef_verbose_log);
+#endif
sendMessage(message);
}
@@ -981,6 +985,15 @@ void LLPluginClassMedia::enableMediaPluginDebugging( bool enable )
sendMessage( message );
}
+#if LL_LINUX
+void LLPluginClassMedia::enablePipeWireVolumeCatcher( bool enable )
+{
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "enable_pipewire_volume_catcher");
+ message.setValueBoolean( "enable", enable );
+ sendMessage( message );
+}
+#endif
+
void LLPluginClassMedia::setTarget(const std::string &target)
{
mTarget = target;
@@ -1198,6 +1211,14 @@ void LLPluginClassMedia::receivePluginMessage(const LLPluginMessage &message)
mMediaName = message.getValue("name");
mediaEvent(LLPluginClassMediaOwner::MEDIA_EVENT_NAME_CHANGED);
}
+ else if(message_name == "title_text")
+ {
+ mMediaTitle = message.getValue("title");
+ }
+ else if(message_name == "nowplaying_text")
+ {
+ mMediaNowPlaying = message.getValue("nowplaying");
+ }
else if(message_name == "pick_file")
{
mIsMultipleFilePick = message.getValueBoolean("multiple_files");
diff --git a/indra/llplugin/llpluginclassmedia.h b/indra/llplugin/llpluginclassmedia.h
index d74b790d8f..80862284ff 100644
--- a/indra/llplugin/llpluginclassmedia.h
+++ b/indra/llplugin/llpluginclassmedia.h
@@ -135,6 +135,10 @@ public:
// Text may be unicode (utf8 encoded)
bool textInput(const std::string &text, MASK modifiers, LLSD native_key_data);
+#if LL_LINUX
+ void enablePipeWireVolumeCatcher( bool enable );
+#endif
+
static std::string sOIDcookieUrl;
static std::string sOIDcookieName;
static std::string sOIDcookieValue;
@@ -307,6 +311,8 @@ public:
const std::string& getMediaName() const { return mMediaName; };
+ const std::string& getMediaTitle() const { return mMediaTitle; };
+ const std::string& getMediaNowPlaying() const { return mMediaNowPlaying; };
std::string getMediaDescription() const { return mMediaDescription; };
// Crash the plugin. If you use this outside of a testbed, you will be punished.
@@ -424,6 +430,8 @@ protected:
bool mCanPaste;
std::string mMediaName;
+ std::string mMediaTitle;
+ std::string mMediaNowPlaying;
std::string mMediaDescription;
LLColor4 mBackgroundColor;
diff --git a/indra/llplugin/llpluginsharedmemory.cpp b/indra/llplugin/llpluginsharedmemory.cpp
index 28a0f0bf4e..955c9f90d7 100644
--- a/indra/llplugin/llpluginsharedmemory.cpp
+++ b/indra/llplugin/llpluginsharedmemory.cpp
@@ -45,8 +45,12 @@
#define USE_WIN32_SHARED_MEMORY 1
#elif LL_DARWIN
#define USE_SHM_OPEN_SHARED_MEMORY 1
+#elif _POSIX_SHARED_MEMORY_OBJECTS == -1
+ #define USE_APR_SHARED_MEMORY 1
#elif LL_LINUX
#define USE_SHM_OPEN_SHARED_MEMORY 1
+#elif __FreeBSD__
+ #define USE_SHM_OPEN_SHARED_MEMORY 1
#endif
diff --git a/indra/llplugin/slplugin/CMakeLists.txt b/indra/llplugin/slplugin/CMakeLists.txt
index 0ea6495eac..3ad6d10336 100644
--- a/indra/llplugin/slplugin/CMakeLists.txt
+++ b/indra/llplugin/slplugin/CMakeLists.txt
@@ -56,10 +56,23 @@ if (DARWIN)
COMMAND mkdir
ARGS
-p
- ${CMAKE_CURRENT_BINARY_DIR}/$<IF:$<BOOL:${LL_GENERATOR_IS_MULTI_CONFIG}>,$<CONFIG>,>/SLPlugin.app/Contents/Resources
+ ${CMAKE_CURRENT_BINARY_DIR}/$<IF:$<BOOL:${LL_GENERATOR_IS_MULTI_CONFIG}>,$<CONFIG>,>/SLPlugin.app/Contents/Frameworks
)
endif (DARWIN)
+if (BUILD_SHARED_LIBS)
+ set_target_properties(SLPlugin PROPERTIES LINK_FLAGS_RELEASE
+ "${LINK_FLAGS_RELEASE} -Wl,--allow-shlib-undefined")
+endif ()
+
+if (INSTALL)
+ if (DARWIN)
+ install(TARGETS ${PROJECT_NAME} DESTINATION .)
+ else (DARWIN)
+ install(TARGETS ${PROJECT_NAME} DESTINATION libexec/${VIEWER_BINARY_NAME})
+ endif (DARWIN)
+endif (INSTALL)
+
if (LL_TESTS)
ll_deploy_sharedlibs_command(SLPlugin)
endif (LL_TESTS)
diff --git a/indra/llplugin/slplugin/slplugin.cpp b/indra/llplugin/slplugin/slplugin.cpp
index 81a27cf2e5..ae26b9d452 100644
--- a/indra/llplugin/slplugin/slplugin.cpp
+++ b/indra/llplugin/slplugin/slplugin.cpp
@@ -46,7 +46,7 @@ using namespace std;
#include "slplugin-objc.h"
#endif
-#if LL_DARWIN || LL_LINUX
+#if LL_DARWIN || LL_LINUX || __FreeBSD__
#include <signal.h>
#endif
@@ -64,7 +64,7 @@ using namespace std;
Now that SLPlugin is a bundled app on the Mac, this is no longer necessary (it can just use a regular Info.plist file), but I'm leaving this comment in for posterity.
*/
-#if LL_DARWIN || LL_LINUX
+#if LL_DARWIN || LL_LINUX || __FreeBSD__
// Signal handlers to make crashes not show an OS dialog...
static void crash_handler(int sig)
{
@@ -163,7 +163,7 @@ int main(int argc, char **argv)
// display a crash message if something bad happens. The host app will
// see the missing heartbeat and log appropriately.
initExceptionHandler();
-#elif LL_DARWIN || LL_LINUX
+#elif LL_DARWIN || LL_LINUX || __FreeBSD__
if(argc < 2)
{
LL_ERRS("slplugin") << "usage: " << argv[0] << " launcher_port" << LL_ENDL;