summaryrefslogtreecommitdiff
path: root/indra/media_plugins/cef
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2017-02-03 09:54:52 -0500
committerNat Goodspeed <nat@lindenlab.com>2017-02-03 09:54:52 -0500
commit434f0e161aa7b378ff16d526e104e580ba367ab2 (patch)
treea7eed0bd6d7278fa63c362fb7ddb4789d7408705 /indra/media_plugins/cef
parent080744d8990e6b18a80858803a20a5ec87020d82 (diff)
parentf40bd0fac308b21319d84ee221cb8f81d369dd71 (diff)
Automated merge with ssh://bitbucket.org/lindenlab/viewer-release
Diffstat (limited to 'indra/media_plugins/cef')
-rw-r--r--indra/media_plugins/cef/CMakeLists.txt10
-rw-r--r--indra/media_plugins/cef/media_plugin_cef.cpp8
-rw-r--r--indra/media_plugins/cef/windows_volume_catcher.cpp55
3 files changed, 18 insertions, 55 deletions
diff --git a/indra/media_plugins/cef/CMakeLists.txt b/indra/media_plugins/cef/CMakeLists.txt
index db471c7906..711e870ee4 100644
--- a/indra/media_plugins/cef/CMakeLists.txt
+++ b/indra/media_plugins/cef/CMakeLists.txt
@@ -34,13 +34,13 @@ include_directories(SYSTEM
### media_plugin_cef
-if(NOT WORD_SIZE EQUAL 32)
+if(NOT ADDRESS_SIZE EQUAL 32)
if(WINDOWS)
- add_definitions(/FIXED:NO)
+ ##add_definitions(/FIXED:NO)
else(WINDOWS) # not windows therefore gcc LINUX and DARWIN
add_definitions(-fPIC)
endif(WINDOWS)
-endif(NOT WORD_SIZE EQUAL 32)
+endif(NOT ADDRESS_SIZE EQUAL 32)
set(media_plugin_cef_SOURCE_FILES
media_plugin_cef.cpp
@@ -97,8 +97,8 @@ if (WINDOWS)
set_target_properties(
media_plugin_cef
PROPERTIES
- LINK_FLAGS "/MANIFEST:NO /SAFESEH:NO /LTCG /NODEFAULTLIB:LIBCMT"
- LINK_FLAGS_DEBUG "/MANIFEST:NO /SAFESEH:NO /NODEFAULTLIB:LIBCMTD"
+ LINK_FLAGS "/MANIFEST:NO /SAFESEH:NO /LTCG /NODEFAULTLIB:LIBCMT /IGNORE:4099"
+ LINK_FLAGS_DEBUG "/MANIFEST:NO /SAFESEH:NO /NODEFAULTLIB:LIBCMTD /IGNORE:4099"
)
endif (WINDOWS)
diff --git a/indra/media_plugins/cef/media_plugin_cef.cpp b/indra/media_plugins/cef/media_plugin_cef.cpp
index 4eb29c98f9..d04bc16d4f 100644
--- a/indra/media_plugins/cef/media_plugin_cef.cpp
+++ b/indra/media_plugins/cef/media_plugin_cef.cpp
@@ -501,7 +501,10 @@ void MediaPluginCEF::receiveMessage(const char* message_string)
LLCEFLib::LLCEFLibSettings settings;
settings.initial_width = 1024;
settings.initial_height = 1024;
- settings.page_zoom_factor = message_in.getValueReal("factor");
+ // The LLCEFLibSettings struct in the Windows 32-bit
+ // llceflib's build 500907 does not have a page_zoom_factor
+ // member. Set below.
+ //settings.page_zoom_factor = message_in.getValueReal("factor");
settings.plugins_enabled = mPluginsEnabled;
settings.media_stream_enabled = false; // MAINT-6060 - WebRTC media removed until we can add granualrity/query UI
settings.javascript_enabled = mJavascriptEnabled;
@@ -518,6 +521,9 @@ void MediaPluginCEF::receiveMessage(const char* message_string)
// if this fails, the media system in viewer will put up a message
}
+ // now we can set page zoom factor
+ mLLCEFLib->setPageZoom(message_in.getValueReal("factor"));
+
// Plugin gets to decide the texture parameters to use.
mDepth = 4;
LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "texture_params");
diff --git a/indra/media_plugins/cef/windows_volume_catcher.cpp b/indra/media_plugins/cef/windows_volume_catcher.cpp
index c9ea3ed597..6953ad3ab8 100644
--- a/indra/media_plugins/cef/windows_volume_catcher.cpp
+++ b/indra/media_plugins/cef/windows_volume_catcher.cpp
@@ -41,44 +41,15 @@ public:
void setPan(F32 pan);
private:
- typedef void (WINAPI *set_volume_func_t)(F32);
- typedef void (WINAPI *set_mute_func_t)(bool);
-
- set_volume_func_t mSetVolumeFunc;
- set_mute_func_t mSetMuteFunc;
-
- // tests if running on Vista, 7, 8 + once in CTOR
- bool isWindowsVistaOrHigher();
-
F32 mVolume;
F32 mPan;
bool mSystemIsVistaOrHigher;
};
-bool VolumeCatcherImpl::isWindowsVistaOrHigher()
-{
- OSVERSIONINFO osvi;
- ZeroMemory(&osvi, sizeof(OSVERSIONINFO));
- osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
- GetVersionEx(&osvi);
- return osvi.dwMajorVersion >= 6;
-}
-
VolumeCatcherImpl::VolumeCatcherImpl()
: mVolume(1.0f), // default volume is max
mPan(0.f) // default pan is centered
{
- mSystemIsVistaOrHigher = isWindowsVistaOrHigher();
-
- if ( ! mSystemIsVistaOrHigher )
- {
- HMODULE handle = ::LoadLibrary(L"winmm.dll");
- if(handle)
- {
- mSetVolumeFunc = (set_volume_func_t)::GetProcAddress(handle, "setPluginVolume");
- mSetMuteFunc = (set_mute_func_t)::GetProcAddress(handle, "setPluginMute");
- }
- }
}
VolumeCatcherImpl::~VolumeCatcherImpl()
@@ -89,26 +60,12 @@ void VolumeCatcherImpl::setVolume(F32 volume)
{
mVolume = volume;
- if ( mSystemIsVistaOrHigher )
- {
- // set both left/right to same volume
- // TODO: use pan value to set independently
- DWORD left_channel = (DWORD)(mVolume * 65535.0f);
- DWORD right_channel = (DWORD)(mVolume * 65535.0f);
- DWORD hw_volume = left_channel << 16 | right_channel;
- ::waveOutSetVolume(NULL, hw_volume);
- }
- else
- {
- if (mSetMuteFunc)
- {
- mSetMuteFunc(volume == 0.f);
- }
- if (mSetVolumeFunc)
- {
- mSetVolumeFunc(mVolume);
- }
- }
+ // set both left/right to same volume
+ // TODO: use pan value to set independently
+ DWORD left_channel = (DWORD)(mVolume * 65535.0f);
+ DWORD right_channel = (DWORD)(mVolume * 65535.0f);
+ DWORD hw_volume = left_channel << 16 | right_channel;
+ ::waveOutSetVolume(NULL, hw_volume);
}
void VolumeCatcherImpl::setPan(F32 pan)