Merge LL viewer release 5.1.0
commit
0a9d2037f3
1
.hgtags
1
.hgtags
|
|
@ -568,3 +568,4 @@ b4d76b5590fdf8bab72c64442353753a527cbc44 5.0.5-release
|
|||
abcab37e1b29414ab8c03af9ca2ab489d809788a 5.0.7-release
|
||||
505a492f30bd925bb48e2e093ae77c3c2b4c740f 5.0.8-release
|
||||
40ca7118765be85a043b31b011e4ee6bd9e33c95 5.0.9-release
|
||||
ad0e15543836d64d6399d28b32852510435e344a 5.1.0-release
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ build_docs = true
|
|||
build_Linux_Doxygen = true
|
||||
|
||||
# Need viewer-build-variables as well as other shared repositories
|
||||
buildscripts_shared_more_NAMEs="build_variables"
|
||||
buildscripts_shared_more_NAMEs="build_secrets build_variables"
|
||||
|
||||
################################################################
|
||||
#### Examples of how to set the viewer_channel ####
|
||||
|
|
|
|||
|
|
@ -3598,9 +3598,9 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
|
|||
<key>archive</key>
|
||||
<map>
|
||||
<key>hash</key>
|
||||
<string>a8071b247d78e5555340f83e3491e7df</string>
|
||||
<string>c4d56d3e942169661a598035a9fbd533</string>
|
||||
<key>url</key>
|
||||
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/12055/70540/viewer_manager-1.0.511658-darwin64-511658.tar.bz2</string>
|
||||
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/12112/71187/viewer_manager-1.0.511688-darwin64-511688.tar.bz2</string>
|
||||
</map>
|
||||
<key>name</key>
|
||||
<string>darwin64</string>
|
||||
|
|
@ -3622,9 +3622,9 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
|
|||
<key>archive</key>
|
||||
<map>
|
||||
<key>hash</key>
|
||||
<string>a9597ba92618b2616e058dee8f56c80c</string>
|
||||
<string>61f324d880eaa303669b99e28e6cf64c</string>
|
||||
<key>url</key>
|
||||
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/12056/70546/viewer_manager-1.0.511658-windows-511658.tar.bz2</string>
|
||||
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/12113/71193/viewer_manager-1.0.511688-windows-511688.tar.bz2</string>
|
||||
</map>
|
||||
<key>name</key>
|
||||
<string>windows</string>
|
||||
|
|
@ -3635,7 +3635,7 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
|
|||
<key>source_type</key>
|
||||
<string>hg</string>
|
||||
<key>version</key>
|
||||
<string>1.0.511658</string>
|
||||
<string>1.0.511688</string>
|
||||
</map>
|
||||
<key>vlc-bin</key>
|
||||
<map>
|
||||
|
|
|
|||
|
|
@ -37,6 +37,11 @@
|
|||
#include "vlc/vlc.h"
|
||||
#include "vlc/libvlc_version.h"
|
||||
|
||||
#if LL_WINDOWS
|
||||
// needed for waveOut call - see below for description
|
||||
#include <mmsystem.h>
|
||||
#endif
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
class MediaPluginLibVLC :
|
||||
|
|
@ -55,6 +60,7 @@ private:
|
|||
void playMedia();
|
||||
void resetVLC();
|
||||
void setVolume(const F64 volume);
|
||||
void setVolumeVLC();
|
||||
void updateTitle(const char* title);
|
||||
|
||||
static void* lock(void* data, void** p_pixels);
|
||||
|
|
@ -221,6 +227,7 @@ void MediaPluginLibVLC::eventCallbacks(const libvlc_event_t* event, void* ptr)
|
|||
case libvlc_MediaPlayerPlaying:
|
||||
parent->mDuration = (float)(libvlc_media_get_duration(parent->mLibVLCMedia)) / 1000.0f;
|
||||
parent->mVlcStatus = STATUS_PLAYING;
|
||||
parent->setVolumeVLC();
|
||||
break;
|
||||
|
||||
case libvlc_MediaPlayerPaused:
|
||||
|
|
@ -394,26 +401,56 @@ void MediaPluginLibVLC::updateTitle(const char* title)
|
|||
sendMessage(message);
|
||||
}
|
||||
|
||||
void MediaPluginLibVLC::setVolumeVLC()
|
||||
{
|
||||
if (mLibVLCMediaPlayer)
|
||||
{
|
||||
int vlc_vol = (int)(mCurVolume * 100);
|
||||
|
||||
int result = libvlc_audio_set_volume(mLibVLCMediaPlayer, vlc_vol);
|
||||
if (result == 0)
|
||||
{
|
||||
// volume change was accepted by LibVLC
|
||||
}
|
||||
else
|
||||
{
|
||||
// volume change was NOT accepted by LibVLC and not actioned
|
||||
}
|
||||
|
||||
#if LL_WINDOWS
|
||||
// https ://jira.secondlife.com/browse/MAINT-8119
|
||||
// CEF media plugin uses code in media_plugins/cef/windows_volume_catcher.cpp to
|
||||
// set the actual output volume of the plugin process since there is no API in
|
||||
// CEF to otherwise do this.
|
||||
// There are explicit calls to change the volume in LibVLC but sometimes they
|
||||
// are ignored SLPlugin.exe process volume is set to 0 so you never heard audio
|
||||
// from the VLC media stream.
|
||||
// The right way to solve this is to move the volume catcher stuff out of
|
||||
// the CEF plugin and into it's own folder under media_plugins and have it referenced
|
||||
// by both CEF and VLC. That's for later. The code there boils down to this so for
|
||||
// now, as we approach a release, the less risky option is to do it directly vs
|
||||
// calls to volume catcher code.
|
||||
DWORD left_channel = (DWORD)(mCurVolume * 65535.0f);
|
||||
DWORD right_channel = (DWORD)(mCurVolume * 65535.0f);
|
||||
DWORD hw_volume = left_channel << 16 | right_channel;
|
||||
waveOutSetVolume(NULL, hw_volume);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
// volume change was requested but VLC wasn't ready.
|
||||
// that's okay though because we saved the value in mCurVolume and
|
||||
// the next volume change after the VLC system is initilzied will set it
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
void MediaPluginLibVLC::setVolume(const F64 volume)
|
||||
{
|
||||
mCurVolume = volume;
|
||||
|
||||
if (mLibVLCMediaPlayer)
|
||||
{
|
||||
int result = libvlc_audio_set_volume(mLibVLCMediaPlayer, (int)(volume * 100));
|
||||
if (result != 0)
|
||||
{
|
||||
// volume wasn't set but not much to be done here
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// volume change was requested but VLC wasn't ready.
|
||||
// that's okay thought because we saved the value in mCurVolume and
|
||||
// the next volume change after the VLC system is initilzied will set it
|
||||
}
|
||||
setVolumeVLC();
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
5.0.12
|
||||
5.1.1
|
||||
|
|
|
|||
Loading…
Reference in New Issue