diff options
Diffstat (limited to 'indra/newview/llviewermedia.cpp')
| -rw-r--r-- | indra/newview/llviewermedia.cpp | 30 | 
1 files changed, 23 insertions, 7 deletions
| diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 9739cac311..5c2d75e92d 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -397,7 +397,7 @@ std::string LLViewerMedia::getCurrentUserAgent()      // This was also helpful:      // http://www.mozilla.org/build/revised-user-agent-strings.html      std::ostringstream codec; -    codec << "SecondLife/"; +    codec << "Megapahit/";      codec << LLVersionInfo::instance().getVersion();      codec << " (" << channel << "; " << skin_name << " skin)";      LL_INFOS() << codec.str() << LL_ENDL; @@ -1724,12 +1724,17 @@ LLPluginClassMedia* LLViewerMediaImpl::newSourceFromMediaType(std::string media_      {          std::string launcher_name = gDirUtilp->getLLPluginLauncher();          std::string plugin_name = gDirUtilp->getLLPluginFilename(plugin_basename); +#if __FreeBSD__ +        if (plugin_basename == "media_plugin_cef") +        { +            launcher_name = "/compat/linux/usr/libexec/megapahit/SLPlugin"; +            plugin_name = "/compat/linux/usr/lib/x86_64-linux-gnu/libmedia_plugin_cef.so"; +        } +#endif          std::string user_data_path_cache = gDirUtilp->getCacheDir(false);          user_data_path_cache += gDirUtilp->getDirDelimiter(); -        std::string user_data_path_cef_log = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "cef_log.txt"); -          // See if the plugin executable exists          llstat s;          if(LLFile::stat(launcher_name, &s)) @@ -1738,14 +1743,13 @@ LLPluginClassMedia* LLViewerMediaImpl::newSourceFromMediaType(std::string media_          }          else if(LLFile::stat(plugin_name, &s))          { -#if !LL_LINUX              LL_WARNS_ONCE("Media") << "Couldn't find plugin at " << plugin_name << LL_ENDL; -#endif          }          else          {              media_source = new LLPluginClassMedia(owner);              media_source->setSize(default_width, default_height); +            std::string user_data_path_cef_log = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "cef.log");              media_source->setUserDataPath(user_data_path_cache, gDirUtilp->getUserName(), user_data_path_cef_log);              media_source->setLanguageCode(LLUI::getLanguage());              media_source->setZoomFactor(zoom_factor); @@ -1771,6 +1775,11 @@ LLPluginClassMedia* LLViewerMediaImpl::newSourceFromMediaType(std::string media_              bool media_plugin_debugging_enabled = gSavedSettings.getBOOL("MediaPluginDebugging");              media_source->enableMediaPluginDebugging( media_plugin_debugging_enabled  || clean_browser); +#if LL_LINUX +            bool media_plugin_pipewire_volume_catcher = gSavedSettings.getBOOL("MediaPluginPipeWireVolumeCatcher"); +            media_source->enablePipeWireVolumeCatcher( media_plugin_pipewire_volume_catcher ); +#endif +              // need to set agent string here before instance created              media_source->setBrowserUserAgent(LLViewerMedia::getInstance()->getCurrentUserAgent()); @@ -1780,7 +1789,16 @@ LLPluginClassMedia* LLViewerMediaImpl::newSourceFromMediaType(std::string media_              media_source->setTarget(target); +#if __FreeBSD__ +            std::string plugin_dir = gDirUtilp->getLLPluginDir(); +            if (plugin_basename == "media_plugin_cef") +            { +                plugin_dir = "/compat/linux/usr/lib/x86_64-linux-gnu"; +                plugin_name = "/usr/lib/x86_64-linux-gnu/libmedia_plugin_cef.so"; +            } +#else              const std::string plugin_dir = gDirUtilp->getLLPluginDir(); +#endif              if (media_source->init(launcher_name, plugin_dir, plugin_name, gSavedSettings.getBOOL("PluginAttachDebuggerToPlugins")))              {                  return media_source; @@ -1792,9 +1810,7 @@ LLPluginClassMedia* LLViewerMediaImpl::newSourceFromMediaType(std::string media_              }          }      } -#if !LL_LINUX      LL_WARNS_ONCE("Plugin") << "plugin initialization failed for mime type: " << media_type << LL_ENDL; -#endif      if(gAgent.isInitialized())      { | 
