diff options
author | Oz Linden <oz@lindenlab.com> | 2013-11-19 17:59:55 -0500 |
---|---|---|
committer | Oz Linden <oz@lindenlab.com> | 2013-11-19 17:59:55 -0500 |
commit | 0031e9a97be1bf6e9fe773c23506494d09ce91ae (patch) | |
tree | 220f195c82174b7cc8e94dceb2553e59fe5837a5 /indra/media_plugins | |
parent | b7edc965bc77ab21e9a1e3f6b424299a50053529 (diff) | |
parent | ebc9bcbf69f7a519677a6522979a6bf6cbb04bb8 (diff) |
merge up to 3.6.10-release; some of the storm-68 changes lost
Diffstat (limited to 'indra/media_plugins')
33 files changed, 78 insertions, 60 deletions
diff --git a/indra/media_plugins/CMakeLists.txt b/indra/media_plugins/CMakeLists.txt index 85318aea3b..85318aea3b 100644..100755 --- a/indra/media_plugins/CMakeLists.txt +++ b/indra/media_plugins/CMakeLists.txt diff --git a/indra/media_plugins/base/CMakeLists.txt b/indra/media_plugins/base/CMakeLists.txt index 3ad94b0c64..7367b9e5e6 100644..100755 --- a/indra/media_plugins/base/CMakeLists.txt +++ b/indra/media_plugins/base/CMakeLists.txt @@ -11,7 +11,7 @@ include(LLRender) include(LLWindow) include(Linking) include(PluginAPI) -include(FindOpenGL) +include(OpenGL) include_directories( ${LLPLUGIN_INCLUDE_DIRS} @@ -21,6 +21,9 @@ include_directories( ${LLRENDER_INCLUDE_DIRS} ${LLWINDOW_INCLUDE_DIRS} ) +include_directories(SYSTEM + ${LLCOMMON_SYSTEM_INCLUDE_DIRS} + ) ### media_plugin_base diff --git a/indra/media_plugins/base/media_plugin_base.cpp b/indra/media_plugins/base/media_plugin_base.cpp index 37c498664a..37c498664a 100644..100755 --- a/indra/media_plugins/base/media_plugin_base.cpp +++ b/indra/media_plugins/base/media_plugin_base.cpp diff --git a/indra/media_plugins/base/media_plugin_base.exp b/indra/media_plugins/base/media_plugin_base.exp index d8c7bb712a..d8c7bb712a 100644..100755 --- a/indra/media_plugins/base/media_plugin_base.exp +++ b/indra/media_plugins/base/media_plugin_base.exp diff --git a/indra/media_plugins/base/media_plugin_base.h b/indra/media_plugins/base/media_plugin_base.h index 38b8226bb3..38b8226bb3 100644..100755 --- a/indra/media_plugins/base/media_plugin_base.h +++ b/indra/media_plugins/base/media_plugin_base.h diff --git a/indra/media_plugins/example/CMakeLists.txt b/indra/media_plugins/example/CMakeLists.txt index 54dc5de1ea..171645ef04 100644..100755 --- a/indra/media_plugins/example/CMakeLists.txt +++ b/indra/media_plugins/example/CMakeLists.txt @@ -12,7 +12,7 @@ include(LLWindow) include(Linking) include(PluginAPI) include(MediaPluginBase) -include(FindOpenGL) +include(OpenGL) include(ExamplePlugin) @@ -25,6 +25,9 @@ include_directories( ${LLRENDER_INCLUDE_DIRS} ${LLWINDOW_INCLUDE_DIRS} ) +include_directories(SYSTEM + ${LLCOMMON_SYSTEM_INCLUDE_DIRS} + ) ### media_plugin_example diff --git a/indra/media_plugins/example/media_plugin_example.cpp b/indra/media_plugins/example/media_plugin_example.cpp index da7de01799..da7de01799 100644..100755 --- a/indra/media_plugins/example/media_plugin_example.cpp +++ b/indra/media_plugins/example/media_plugin_example.cpp diff --git a/indra/media_plugins/gstreamer010/CMakeLists.txt b/indra/media_plugins/gstreamer010/CMakeLists.txt index 5786bd1e25..447f6e0689 100644..100755 --- a/indra/media_plugins/gstreamer010/CMakeLists.txt +++ b/indra/media_plugins/gstreamer010/CMakeLists.txt @@ -12,7 +12,7 @@ include(LLWindow) include(Linking) include(PluginAPI) include(MediaPluginBase) -include(FindOpenGL) +include(OpenGL) include(GStreamer010Plugin) @@ -27,6 +27,9 @@ include_directories( ${GSTREAMER010_INCLUDE_DIRS} ${GSTREAMER010_PLUGINS_BASE_INCLUDE_DIRS} ) +include_directories(SYSTEM + ${LLCOMMON_SYSTEM_INCLUDE_DIRS} + ) ### media_plugin_gstreamer010 diff --git a/indra/media_plugins/gstreamer010/llmediaimplgstreamer.h b/indra/media_plugins/gstreamer010/llmediaimplgstreamer.h index 6bc272c009..6bc272c009 100644..100755 --- a/indra/media_plugins/gstreamer010/llmediaimplgstreamer.h +++ b/indra/media_plugins/gstreamer010/llmediaimplgstreamer.h diff --git a/indra/media_plugins/gstreamer010/llmediaimplgstreamer_syms.cpp b/indra/media_plugins/gstreamer010/llmediaimplgstreamer_syms.cpp index 2e4baaa9eb..2e4baaa9eb 100644..100755 --- a/indra/media_plugins/gstreamer010/llmediaimplgstreamer_syms.cpp +++ b/indra/media_plugins/gstreamer010/llmediaimplgstreamer_syms.cpp diff --git a/indra/media_plugins/gstreamer010/llmediaimplgstreamer_syms.h b/indra/media_plugins/gstreamer010/llmediaimplgstreamer_syms.h index d1559089c8..d1559089c8 100644..100755 --- a/indra/media_plugins/gstreamer010/llmediaimplgstreamer_syms.h +++ b/indra/media_plugins/gstreamer010/llmediaimplgstreamer_syms.h diff --git a/indra/media_plugins/gstreamer010/llmediaimplgstreamer_syms_raw.inc b/indra/media_plugins/gstreamer010/llmediaimplgstreamer_syms_raw.inc index b33e59363d..b33e59363d 100644..100755 --- a/indra/media_plugins/gstreamer010/llmediaimplgstreamer_syms_raw.inc +++ b/indra/media_plugins/gstreamer010/llmediaimplgstreamer_syms_raw.inc diff --git a/indra/media_plugins/gstreamer010/llmediaimplgstreamer_syms_rawv.inc b/indra/media_plugins/gstreamer010/llmediaimplgstreamer_syms_rawv.inc index 14fbcb48b9..14fbcb48b9 100644..100755 --- a/indra/media_plugins/gstreamer010/llmediaimplgstreamer_syms_rawv.inc +++ b/indra/media_plugins/gstreamer010/llmediaimplgstreamer_syms_rawv.inc diff --git a/indra/media_plugins/gstreamer010/llmediaimplgstreamertriviallogging.h b/indra/media_plugins/gstreamer010/llmediaimplgstreamertriviallogging.h index e7b31bec94..e7b31bec94 100644..100755 --- a/indra/media_plugins/gstreamer010/llmediaimplgstreamertriviallogging.h +++ b/indra/media_plugins/gstreamer010/llmediaimplgstreamertriviallogging.h diff --git a/indra/media_plugins/gstreamer010/llmediaimplgstreamervidplug.cpp b/indra/media_plugins/gstreamer010/llmediaimplgstreamervidplug.cpp index cdb7f4faeb..932aaffa1b 100644..100755 --- a/indra/media_plugins/gstreamer010/llmediaimplgstreamervidplug.cpp +++ b/indra/media_plugins/gstreamer010/llmediaimplgstreamervidplug.cpp @@ -278,10 +278,9 @@ gst_slvideo_set_caps (GstBaseSink * bsink, GstCaps * caps) static gboolean gst_slvideo_start (GstBaseSink * bsink) { - GstSLVideo *slvideo; gboolean ret = TRUE; - slvideo = GST_SLVIDEO(bsink); + GST_SLVIDEO(bsink); return ret; } diff --git a/indra/media_plugins/gstreamer010/llmediaimplgstreamervidplug.h b/indra/media_plugins/gstreamer010/llmediaimplgstreamervidplug.h index 29d65fa4e9..29d65fa4e9 100644..100755 --- a/indra/media_plugins/gstreamer010/llmediaimplgstreamervidplug.h +++ b/indra/media_plugins/gstreamer010/llmediaimplgstreamervidplug.h diff --git a/indra/media_plugins/gstreamer010/media_plugin_gstreamer010.cpp b/indra/media_plugins/gstreamer010/media_plugin_gstreamer010.cpp index 352b63583e..352b63583e 100644..100755 --- a/indra/media_plugins/gstreamer010/media_plugin_gstreamer010.cpp +++ b/indra/media_plugins/gstreamer010/media_plugin_gstreamer010.cpp diff --git a/indra/media_plugins/quicktime/CMakeLists.txt b/indra/media_plugins/quicktime/CMakeLists.txt index f0b8f0d167..58391007ff 100644..100755 --- a/indra/media_plugins/quicktime/CMakeLists.txt +++ b/indra/media_plugins/quicktime/CMakeLists.txt @@ -12,7 +12,7 @@ include(LLWindow) include(Linking) include(PluginAPI) include(MediaPluginBase) -include(FindOpenGL) +include(OpenGL) include(QuickTimePlugin) include_directories( @@ -24,6 +24,9 @@ include_directories( ${LLRENDER_INCLUDE_DIRS} ${LLWINDOW_INCLUDE_DIRS} ) +include_directories(SYSTEM + ${LLCOMMON_SYSTEM_INCLUDE_DIRS} + ) if (DARWIN) include(CMakeFindFrameworks) diff --git a/indra/media_plugins/quicktime/media_plugin_quicktime.cpp b/indra/media_plugins/quicktime/media_plugin_quicktime.cpp index 24328202cb..2dd97a9ba7 100644..100755 --- a/indra/media_plugins/quicktime/media_plugin_quicktime.cpp +++ b/indra/media_plugins/quicktime/media_plugin_quicktime.cpp @@ -232,12 +232,8 @@ private: mMovieHandle = NULL; }; - if ( mGWorldHandle ) - { - DisposeGWorld( mGWorldHandle ); - mGWorldHandle = NULL; - }; - + mGWorldHandle = NULL; + setStatus(STATUS_NONE); return true; @@ -273,6 +269,7 @@ private: //std::cerr << "<--- Sending size change request to application with name: " << mTextureSegmentName << " - size is " << width << " x " << height << std::endl; } } + // sanitize destination size Rect dest_rect = rectFromSize(mWidth, mHeight); @@ -281,12 +278,10 @@ private: int depth_bits = mDepth * 8; long rowbytes = mDepth * mTextureWidth; - GWorldPtr old_gworld_handle = mGWorldHandle; - if(mPixels != NULL) { // We have pixels. Set up a GWorld pointing at the texture. - OSErr result = NewGWorldFromPtr( &mGWorldHandle, depth_bits, &dest_rect, NULL, NULL, 0, (Ptr)mPixels, rowbytes); + OSErr result = QTNewGWorldFromPtr( &mGWorldHandle, depth_bits, &dest_rect, NULL, NULL, 0, (Ptr)mPixels, rowbytes); if ( noErr != result ) { // TODO: unrecoverable?? throw exception? return something? @@ -297,7 +292,7 @@ private: { // We don't have pixels. Create a fake GWorld we can point the movie at when it's not safe to render normally. Rect tempRect = rectFromSize(1, 1); - OSErr result = NewGWorld( &mGWorldHandle, depth_bits, &tempRect, NULL, NULL, 0); + OSErr result = QTNewGWorld( &mGWorldHandle, depth_bits, &tempRect, NULL, NULL, 0); if ( noErr != result ) { // TODO: unrecoverable?? throw exception? return something? @@ -305,14 +300,8 @@ private: } } - SetMovieGWorld( mMovieHandle, mGWorldHandle, GetGWorldDevice( mGWorldHandle ) ); - - // If the GWorld was already set up, delete it. - if(old_gworld_handle != NULL) - { - DisposeGWorld( old_gworld_handle ); - } - + SetMovieGWorld( mMovieHandle, mGWorldHandle, NULL ); + // Set up the movie display matrix { // scale movie to fit rect and invert vertically to match opengl image format @@ -579,28 +568,7 @@ private: } }; - - int getDataWidth() const - { - if ( mGWorldHandle ) - { - int depth = mDepth; - - if (depth < 1) - depth = 1; - - // ALWAYS use the row bytes from the PixMap if we have a GWorld because - // sometimes it's not the same as mMediaDepth * mMediaWidth ! - PixMapHandle pix_map_handle = GetGWorldPixMap( mGWorldHandle ); - return QTGetPixMapHandleRowBytes( pix_map_handle ) / depth; - } - else - { - // TODO : return LLMediaImplCommon::getaDataWidth(); - return 0; - } - }; - + void seek( F64 time ) { if ( mMovieController ) diff --git a/indra/media_plugins/webkit/CMakeLists.txt b/indra/media_plugins/webkit/CMakeLists.txt index b36291f0e8..0c1c3d800e 100644..100755 --- a/indra/media_plugins/webkit/CMakeLists.txt +++ b/indra/media_plugins/webkit/CMakeLists.txt @@ -13,7 +13,7 @@ include(UI) include(Linking) include(PluginAPI) include(MediaPluginBase) -include(FindOpenGL) +include(OpenGL) include(PulseAudio) include(WebKitLibPlugin) @@ -29,6 +29,9 @@ include_directories( ${LLWINDOW_INCLUDE_DIRS} ${LLQTWEBKIT_INCLUDE_DIR} ) +include_directories(SYSTEM + ${LLCOMMON_SYSTEM_INCLUDE_DIRS} + ) ### media_plugin_webkit diff --git a/indra/media_plugins/webkit/dummy_volume_catcher.cpp b/indra/media_plugins/webkit/dummy_volume_catcher.cpp index d54b31b2ae..d54b31b2ae 100644..100755 --- a/indra/media_plugins/webkit/dummy_volume_catcher.cpp +++ b/indra/media_plugins/webkit/dummy_volume_catcher.cpp diff --git a/indra/media_plugins/webkit/linux_volume_catcher.cpp b/indra/media_plugins/webkit/linux_volume_catcher.cpp index 91be3a89e9..91be3a89e9 100644..100755 --- a/indra/media_plugins/webkit/linux_volume_catcher.cpp +++ b/indra/media_plugins/webkit/linux_volume_catcher.cpp diff --git a/indra/media_plugins/webkit/linux_volume_catcher_pa_syms.inc b/indra/media_plugins/webkit/linux_volume_catcher_pa_syms.inc index d806b48428..d806b48428 100644..100755 --- a/indra/media_plugins/webkit/linux_volume_catcher_pa_syms.inc +++ b/indra/media_plugins/webkit/linux_volume_catcher_pa_syms.inc diff --git a/indra/media_plugins/webkit/linux_volume_catcher_paglib_syms.inc b/indra/media_plugins/webkit/linux_volume_catcher_paglib_syms.inc index abf628c96c..abf628c96c 100644..100755 --- a/indra/media_plugins/webkit/linux_volume_catcher_paglib_syms.inc +++ b/indra/media_plugins/webkit/linux_volume_catcher_paglib_syms.inc diff --git a/indra/media_plugins/webkit/mac_volume_catcher.cpp b/indra/media_plugins/webkit/mac_volume_catcher.cpp index 8a06bb8487..cc94556413 100644..100755 --- a/indra/media_plugins/webkit/mac_volume_catcher.cpp +++ b/indra/media_plugins/webkit/mac_volume_catcher.cpp @@ -35,10 +35,13 @@ #include "volume_catcher.h" -#include <Carbon/Carbon.h> #include <QuickTime/QuickTime.h> #include <AudioUnit/AudioUnit.h> +#if LL_DARWIN +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" +#endif + struct VolumeCatcherStorage; class VolumeCatcherImpl @@ -266,3 +269,6 @@ void VolumeCatcher::pump() // No periodic tasks are necessary for this implementation. } +#if LL_DARWIN +#pragma GCC diagnostic warning "-Wdeprecated-declarations" +#endif diff --git a/indra/media_plugins/webkit/media_plugin_webkit.cpp b/indra/media_plugins/webkit/media_plugin_webkit.cpp index 1812abd7d5..1812abd7d5 100644..100755 --- a/indra/media_plugins/webkit/media_plugin_webkit.cpp +++ b/indra/media_plugins/webkit/media_plugin_webkit.cpp diff --git a/indra/media_plugins/webkit/volume_catcher.h b/indra/media_plugins/webkit/volume_catcher.h index 337f2913d3..337f2913d3 100644..100755 --- a/indra/media_plugins/webkit/volume_catcher.h +++ b/indra/media_plugins/webkit/volume_catcher.h diff --git a/indra/media_plugins/webkit/windows_volume_catcher.cpp b/indra/media_plugins/webkit/windows_volume_catcher.cpp index 5fb84756ee..0cfb810906 100644..100755 --- a/indra/media_plugins/webkit/windows_volume_catcher.cpp +++ b/indra/media_plugins/webkit/windows_volume_catcher.cpp @@ -48,18 +48,37 @@ private: 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 +: mVolume(1.0f), // default volume is max + mPan(0.f) // default pan is centered { - HMODULE handle = ::LoadLibrary(L"winmm.dll"); - if(handle) + mSystemIsVistaOrHigher = isWindowsVistaOrHigher(); + + if ( ! mSystemIsVistaOrHigher ) { - mSetVolumeFunc = (set_volume_func_t)::GetProcAddress(handle, "setPluginVolume"); - mSetMuteFunc = (set_mute_func_t)::GetProcAddress(handle, "setPluginMute"); + HMODULE handle = ::LoadLibrary(L"winmm.dll"); + if(handle) + { + mSetVolumeFunc = (set_volume_func_t)::GetProcAddress(handle, "setPluginVolume"); + mSetMuteFunc = (set_mute_func_t)::GetProcAddress(handle, "setPluginMute"); + } } } @@ -67,18 +86,29 @@ VolumeCatcherImpl::~VolumeCatcherImpl() { } - void VolumeCatcherImpl::setVolume(F32 volume) { mVolume = volume; - if (mSetMuteFunc) + if ( mSystemIsVistaOrHigher ) { - mSetMuteFunc(volume == 0.f); + // 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); } - if (mSetVolumeFunc) + else { - mSetVolumeFunc(mVolume); + if (mSetMuteFunc) + { + mSetMuteFunc(volume == 0.f); + } + if (mSetVolumeFunc) + { + mSetVolumeFunc(mVolume); + } } } diff --git a/indra/media_plugins/winmmshim/CMakeLists.txt b/indra/media_plugins/winmmshim/CMakeLists.txt index bf74f81809..bf74f81809 100644..100755 --- a/indra/media_plugins/winmmshim/CMakeLists.txt +++ b/indra/media_plugins/winmmshim/CMakeLists.txt diff --git a/indra/media_plugins/winmmshim/forwarding_api.cpp b/indra/media_plugins/winmmshim/forwarding_api.cpp index 495e08942b..495e08942b 100644..100755 --- a/indra/media_plugins/winmmshim/forwarding_api.cpp +++ b/indra/media_plugins/winmmshim/forwarding_api.cpp diff --git a/indra/media_plugins/winmmshim/forwarding_api.h b/indra/media_plugins/winmmshim/forwarding_api.h index 076a08f769..076a08f769 100644..100755 --- a/indra/media_plugins/winmmshim/forwarding_api.h +++ b/indra/media_plugins/winmmshim/forwarding_api.h diff --git a/indra/media_plugins/winmmshim/winmm.def b/indra/media_plugins/winmmshim/winmm.def index c55a2845f8..c55a2845f8 100644..100755 --- a/indra/media_plugins/winmmshim/winmm.def +++ b/indra/media_plugins/winmmshim/winmm.def diff --git a/indra/media_plugins/winmmshim/winmm_shim.cpp b/indra/media_plugins/winmmshim/winmm_shim.cpp index 47a1e5c018..aac349bf57 100644..100755 --- a/indra/media_plugins/winmmshim/winmm_shim.cpp +++ b/indra/media_plugins/winmmshim/winmm_shim.cpp @@ -56,7 +56,7 @@ void ll_winmm_shim_initialize(){ // grab winmm.dll from system path, where it should live wsprintf(dll_path, "%s\\winmm.dll", system_path); HMODULE winmm_handle = ::LoadLibrary(dll_path); - + if (winmm_handle != NULL) { // we have a dll, let's get out pointers! initialized = true; |