Nicky 2016-08-01 16:15:47 +02:00
commit b547aeef03
25 changed files with 611 additions and 453 deletions

View File

@ -1712,7 +1712,7 @@
</map>
</map>
<key>version</key>
<string>1.5.3.315268</string>
<string>1.5.3.317959</string>
</map>
<key>llphysicsextensions_source</key>
<map>
@ -2350,18 +2350,6 @@
<string>vlc-bin</string>
<key>platforms</key>
<map>
<key>windows</key>
<map>
<key>archive</key>
<map>
<key>hash</key>
<string>3bdbb86adc2119a0b7bb17a54372dcd2</string>
<key>url</key>
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-vlc-bin/rev/315283/arch/CYGWIN/installer/vlc_bin-2.2.3.315283-windows-315283.tar.bz2</string>
</map>
<key>name</key>
<string>windows</string>
</map>
<key>linux</key>
<map>
<key>archive</key>
@ -2374,9 +2362,21 @@
<key>name</key>
<string>linux</string>
</map>
<key>windows</key>
<map>
<key>archive</key>
<map>
<key>hash</key>
<string>04cff37070a5f65f3652b4ddcec7183f</string>
<key>url</key>
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-vlc-bin/rev/317935/arch/CYGWIN/installer/vlc_bin-2.2.4.317935-windows-317935.tar.bz2</string>
</map>
<key>name</key>
<string>windows</string>
</map>
</map>
<key>version</key>
<string>2.2.3.315283</string>
<string>2.2.4.317935</string>
</map>
<key>xmlrpc-epi</key>
<map>

View File

@ -1,3 +1,4 @@
2014-02-25 10:34

View File

@ -1277,28 +1277,6 @@ void LLGLSLShader::uniformMatrix4fv(U32 index, U32 count, GLboolean transpose, c
}
}
void LLGLSLShader::uniform1b(U32 index, GLboolean x)
{
if (mProgramObject > 0)
{
if (mUniform.size() <= index)
{
UNIFORM_ERRS << "Uniform index out of bounds." << LL_ENDL;
return;
}
if (mUniform[index] >= 0)
{
std::map<GLint, LLVector4>::iterator iter = mValue.find(mUniform[index]);
if (iter == mValue.end() || iter->second.mV[0] != x)
{
glUniform1iARB(mUniform[index], x);
mValue[mUniform[index]] = LLVector4(x, 0.f, 0.f, 0.f);
}
}
}
}
GLint LLGLSLShader::getUniformLocation(const LLStaticHashedString& uniform)
{
GLint ret = -1;

View File

@ -125,7 +125,6 @@ public:
void uniform3fv(const LLStaticHashedString& uniform, U32 count, const GLfloat* v);
void uniform4fv(const LLStaticHashedString& uniform, U32 count, const GLfloat* v);
void uniformMatrix4fv(const LLStaticHashedString& uniform, U32 count, GLboolean transpose, const GLfloat *v);
void uniform1b(U32 index, GLboolean b);
void setMinimumAlpha(F32 minimum);

View File

@ -1487,14 +1487,6 @@ U32 LLRender::getMatrixMode()
return mMatrixMode;
}
void LLRender::setInverseTexCoordByY(bool v)
{
LLGLSLShader* shader = LLGLSLShader::sCurBoundShaderPtr;
if (shader)
{
shader->uniform1b(LLShaderMgr::INVERSE_TEX_Y, v);
}
}
void LLRender::loadIdentity()
{

View File

@ -355,7 +355,6 @@ public:
void multMatrix(const GLfloat* m);
void matrixMode(U32 mode);
U32 getMatrixMode();
void setInverseTexCoordByY(bool v);
const glh::matrix4f& getModelviewMatrix();
const glh::matrix4f& getProjectionMatrix();

View File

@ -1201,7 +1201,6 @@ void LLShaderMgr::initAttribsAndUniforms()
mReservedUniforms.push_back("origin");
mReservedUniforms.push_back("display_gamma");
mReservedUniforms.push_back("invert_tex_y");
llassert(mReservedUniforms.size() == END_RESERVED_UNIFORMS);
std::set<std::string> dupe_check;

View File

@ -219,8 +219,7 @@ public:
TERRAIN_ALPHARAMP,
SHINY_ORIGIN,
DISPLAY_GAMMA,
INVERSE_TEX_Y,
DISPLAY_GAMMA,
END_RESERVED_UNIFORMS
} eGLSLReservedUniforms;

View File

@ -196,7 +196,7 @@ void MediaPluginCEF::onPageChangedCallback(unsigned char* pixels, int x, int y,
mPopupH = height;
mPopupW = width;
mPopupX = x;
mPopupY = y;
mPopupY = mHeight - y - height;
}
}
else
@ -533,7 +533,7 @@ void MediaPluginCEF::receiveMessage(const char* message_string)
message.setValueU32("internalformat", GL_RGB);
message.setValueU32("format", GL_BGRA);
message.setValueU32("type", GL_UNSIGNED_BYTE);
message.setValueBoolean("coords_opengl", false);
message.setValueBoolean("coords_opengl", true);
sendMessage(message);
}
else if (message_name == "set_user_data_path")

View File

@ -1,30 +1,30 @@
/**
* @file media_plugin_libvlc.cpp
* @brief LibVLC plugin for LLMedia API plugin system
*
* @cond
* $LicenseInfo:firstyear=2008&license=viewerlgpl$
* Second Life Viewer Source Code
* Copyright (C) 2010, Linden Research, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation;
* version 2.1 of the License only.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
* @endcond
*/
* @file media_plugin_libvlc.cpp
* @brief LibVLC plugin for LLMedia API plugin system
*
* @cond
* $LicenseInfo:firstyear=2008&license=viewerlgpl$
* Second Life Viewer Source Code
* Copyright (C) 2010, Linden Research, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation;
* version 2.1 of the License only.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
* @endcond
*/
#include "linden_common.h"
@ -40,57 +40,78 @@
////////////////////////////////////////////////////////////////////////////////
//
class MediaPluginLibVLC :
public MediaPluginBase
public MediaPluginBase
{
public:
MediaPluginLibVLC( LLPluginInstance::sendMessageFunction host_send_func, void *host_user_data );
~MediaPluginLibVLC();
public:
MediaPluginLibVLC(LLPluginInstance::sendMessageFunction host_send_func, void *host_user_data);
~MediaPluginLibVLC();
/*virtual*/ void receiveMessage( const char* message_string );
/*virtual*/ void receiveMessage(const char* message_string);
private:
bool init();
private:
bool init();
void initVLC();
void playMedia();
void resetVLC();
void initVLC();
void playMedia();
void resetVLC();
void setVolume(const F64 volume);
void updateTitle(const char* title);
static void* lock(void* data, void** p_pixels);
static void unlock(void* data, void* id, void* const* raw_pixels);
static void display(void* data, void* id);
static void* lock(void* data, void** p_pixels);
static void unlock(void* data, void* id, void* const* raw_pixels);
static void display(void* data, void* id);
libvlc_instance_t* gLibVLC;
libvlc_media_t* gLibVLCMedia;
libvlc_media_player_t* gLibVLCMediaPlayer;
/*virtual*/ void setDirty(int left, int top, int right, int bottom) override;
struct gVLCContext
{
unsigned char* texture_pixels;
libvlc_media_player_t* mp;
MediaPluginLibVLC* parent;
};
struct gVLCContext gVLCCallbackContext;
static void eventCallbacks(const libvlc_event_t* event, void* ptr);
std::string mURL;
libvlc_instance_t* mLibVLC;
libvlc_media_t* mLibVLCMedia;
libvlc_media_player_t* mLibVLCMediaPlayer;
struct mLibVLCContext
{
unsigned char* texture_pixels;
libvlc_media_player_t* mp;
MediaPluginLibVLC* parent;
};
struct mLibVLCContext mLibVLCCallbackContext;
std::string mURL;
F64 mCurVolume;
bool mIsLooping;
float mCurTime;
float mDuration;
};
////////////////////////////////////////////////////////////////////////////////
//
MediaPluginLibVLC::MediaPluginLibVLC( LLPluginInstance::sendMessageFunction host_send_func, void *host_user_data ) :
MediaPluginBase( host_send_func, host_user_data )
MediaPluginLibVLC::MediaPluginLibVLC(LLPluginInstance::sendMessageFunction host_send_func, void *host_user_data) :
MediaPluginBase(host_send_func, host_user_data)
{
mTextureWidth = 0;
mTextureHeight = 0;
mWidth = 0;
mHeight = 0;
mDepth = 4;
mPixels = 0;
mWidth = 0;
mHeight = 0;
mDepth = 4;
mPixels = 0;
gLibVLC = 0;
gLibVLCMedia = 0;
gLibVLCMediaPlayer = 0;
mLibVLC = 0;
mLibVLCMedia = 0;
mLibVLCMediaPlayer = 0;
mCurVolume = 0.0;
mIsLooping = false;
mCurTime = 0.0;
mDuration = 0.0;
mURL = std::string();
setStatus(STATUS_NONE);
}
////////////////////////////////////////////////////////////////////////////////
@ -103,7 +124,7 @@ MediaPluginLibVLC::~MediaPluginLibVLC()
//
void* MediaPluginLibVLC::lock(void* data, void** p_pixels)
{
struct gVLCContext* context = (gVLCContext*)data;
struct mLibVLCContext* context = (mLibVLCContext*)data;
*p_pixels = context->texture_pixels;
@ -114,15 +135,16 @@ void* MediaPluginLibVLC::lock(void* data, void** p_pixels)
//
void MediaPluginLibVLC::unlock(void* data, void* id, void* const* raw_pixels)
{
// nothing to do here for the moment.
// we can modify the raw_pixels here if we want to.
// nothing to do here for the moment
// we *could* modify pixels here to, for example, Y flip, but this is done with
// a VLC video filter transform.
}
////////////////////////////////////////////////////////////////////////////////
//
void MediaPluginLibVLC::display(void* data, void* id)
{
struct gVLCContext* context = (gVLCContext*)data;
struct mLibVLCContext* context = (mLibVLCContext*)data;
context->parent->setDirty(0, 0, context->parent->mWidth, context->parent->mHeight);
}
@ -134,12 +156,13 @@ void MediaPluginLibVLC::initVLC()
char const* vlc_argv[] =
{
"--no-xlib",
"--video-filter=transform{type=vflip}", // MAINT-6578 Y flip textures in plugin vs client
};
int vlc_argc = sizeof(vlc_argv) / sizeof(*vlc_argv);
gLibVLC = libvlc_new(vlc_argc, vlc_argv);
mLibVLC = libvlc_new(vlc_argc, vlc_argv);
if (!gLibVLC)
if (!mLibVLC)
{
// for the moment, if this fails, the plugin will fail and
// the media sub-system will tell the viewer something went wrong.
@ -150,9 +173,87 @@ void MediaPluginLibVLC::initVLC()
//
void MediaPluginLibVLC::resetVLC()
{
libvlc_media_player_stop(gLibVLCMediaPlayer);
libvlc_media_player_release(gLibVLCMediaPlayer);
libvlc_release(gLibVLC);
libvlc_media_player_stop(mLibVLCMediaPlayer);
libvlc_media_player_release(mLibVLCMediaPlayer);
libvlc_release(mLibVLC);
}
////////////////////////////////////////////////////////////////////////////////
// *virtual*
void MediaPluginLibVLC::setDirty(int left, int top, int right, int bottom)
{
LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "updated");
message.setValueS32("left", left);
message.setValueS32("top", top);
message.setValueS32("right", right);
message.setValueS32("bottom", bottom);
message.setValueReal("current_time", mCurTime);
message.setValueReal("duration", mDuration);
message.setValueReal("current_rate", 1.0f);
sendMessage(message);
}
////////////////////////////////////////////////////////////////////////////////
//
void MediaPluginLibVLC::eventCallbacks(const libvlc_event_t* event, void* ptr)
{
MediaPluginLibVLC* parent = (MediaPluginLibVLC*)ptr;
if (parent == 0)
{
return;
}
switch (event->type)
{
case libvlc_MediaPlayerOpening:
parent->setStatus(STATUS_LOADING);
break;
case libvlc_MediaPlayerPlaying:
parent->mDuration = (float)(libvlc_media_get_duration(parent->mLibVLCMedia)) / 1000.0f;
parent->setStatus(STATUS_PLAYING);
break;
case libvlc_MediaPlayerPaused:
parent->setStatus(STATUS_PAUSED);
break;
case libvlc_MediaPlayerStopped:
parent->setStatus(STATUS_DONE);
break;
case libvlc_MediaPlayerEndReached:
parent->setStatus(STATUS_DONE);
break;
case libvlc_MediaPlayerEncounteredError:
parent->setStatus(STATUS_ERROR);
break;
case libvlc_MediaPlayerTimeChanged:
parent->mCurTime = (float)libvlc_media_player_get_time(parent->mLibVLCMediaPlayer) / 1000.0f;
break;
case libvlc_MediaPlayerPositionChanged:
break;
case libvlc_MediaPlayerLengthChanged:
parent->mDuration = (float)libvlc_media_get_duration(parent->mLibVLCMedia) / 1000.0f;
break;
case libvlc_MediaPlayerTitleChanged:
{
char* title = libvlc_media_get_meta(parent->mLibVLCMedia, libvlc_meta_Title);
if (title)
{
parent->updateTitle(title);
}
}
break;
}
}
////////////////////////////////////////////////////////////////////////////////
@ -164,58 +265,173 @@ void MediaPluginLibVLC::playMedia()
return;
}
if (gLibVLCMediaPlayer)
if (mLibVLCMediaPlayer)
{
libvlc_media_player_stop(gLibVLCMediaPlayer);
libvlc_media_player_release(gLibVLCMediaPlayer);
// stop listening to events while we reset things
libvlc_event_manager_t* em = libvlc_media_player_event_manager(mLibVLCMediaPlayer);
if (em)
{
libvlc_event_detach(em, libvlc_MediaPlayerOpening, eventCallbacks, NULL);
libvlc_event_detach(em, libvlc_MediaPlayerPlaying, eventCallbacks, NULL);
libvlc_event_detach(em, libvlc_MediaPlayerPaused, eventCallbacks, NULL);
libvlc_event_detach(em, libvlc_MediaPlayerStopped, eventCallbacks, NULL);
libvlc_event_detach(em, libvlc_MediaPlayerEndReached, eventCallbacks, NULL);
libvlc_event_detach(em, libvlc_MediaPlayerEncounteredError, eventCallbacks, NULL);
libvlc_event_detach(em, libvlc_MediaPlayerTimeChanged, eventCallbacks, NULL);
libvlc_event_detach(em, libvlc_MediaPlayerPositionChanged, eventCallbacks, NULL);
libvlc_event_detach(em, libvlc_MediaPlayerLengthChanged, eventCallbacks, NULL);
libvlc_event_detach(em, libvlc_MediaPlayerTitleChanged, eventCallbacks, NULL);
};
libvlc_media_player_stop(mLibVLCMediaPlayer);
libvlc_media_player_release(mLibVLCMediaPlayer);
mLibVLCMediaPlayer = 0;
}
gLibVLCMedia = libvlc_media_new_location(gLibVLC, mURL.c_str());
if (!gLibVLCMedia)
if (mLibVLCMedia)
{
gLibVLCMediaPlayer = 0;
libvlc_media_release(mLibVLCMedia);
mLibVLCMedia = 0;
}
mLibVLCMedia = libvlc_media_new_location(mLibVLC, mURL.c_str());
if (!mLibVLCMedia)
{
mLibVLCMediaPlayer = 0;
setStatus(STATUS_ERROR);
return;
}
gLibVLCMediaPlayer = libvlc_media_player_new_from_media(gLibVLCMedia);
if (!gLibVLCMediaPlayer)
mLibVLCMediaPlayer = libvlc_media_player_new_from_media(mLibVLCMedia);
if (!mLibVLCMediaPlayer)
{
setStatus(STATUS_ERROR);
return;
}
libvlc_media_release(gLibVLCMedia);
// listen to events
libvlc_event_manager_t* em = libvlc_media_player_event_manager(mLibVLCMediaPlayer);
if (em)
{
libvlc_event_attach(em, libvlc_MediaPlayerOpening, eventCallbacks, this);
libvlc_event_attach(em, libvlc_MediaPlayerPlaying, eventCallbacks, this);
libvlc_event_attach(em, libvlc_MediaPlayerPaused, eventCallbacks, this);
libvlc_event_attach(em, libvlc_MediaPlayerStopped, eventCallbacks, this);
libvlc_event_attach(em, libvlc_MediaPlayerEndReached, eventCallbacks, this);
libvlc_event_attach(em, libvlc_MediaPlayerEncounteredError, eventCallbacks, this);
libvlc_event_attach(em, libvlc_MediaPlayerTimeChanged, eventCallbacks, this);
libvlc_event_attach(em, libvlc_MediaPlayerPositionChanged, eventCallbacks, this);
libvlc_event_attach(em, libvlc_MediaPlayerLengthChanged, eventCallbacks, this);
libvlc_event_attach(em, libvlc_MediaPlayerTitleChanged, eventCallbacks, this);
}
gVLCCallbackContext.parent = this;
gVLCCallbackContext.texture_pixels = mPixels;
gVLCCallbackContext.mp = gLibVLCMediaPlayer;
mLibVLCCallbackContext.parent = this;
mLibVLCCallbackContext.texture_pixels = mPixels;
mLibVLCCallbackContext.mp = mLibVLCMediaPlayer;
libvlc_video_set_callbacks(gLibVLCMediaPlayer, lock, unlock, display, &gVLCCallbackContext);
libvlc_video_set_format(gLibVLCMediaPlayer, "RV32", mWidth, mHeight, mWidth * mDepth);
libvlc_media_player_play(gLibVLCMediaPlayer);
// Send a "navigate begin" event.
// This is really a browser message but the QuickTime plugin did it and
// the media system relies on this message to update internal state so we must send it too
// Note: see "navigate_complete" message below too
// https://jira.secondlife.com/browse/MAINT-6528
LLPluginMessage message_begin(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "navigate_begin");
message_begin.setValue("uri", mURL);
message_begin.setValueBoolean("history_back_available", false);
message_begin.setValueBoolean("history_forward_available", false);
sendMessage(message_begin);
// volume level gets set before VLC is initialized (thanks media system) so we have to record
// it in mCurVolume and set it again here so that volume levels are correctly initialized
setVolume(mCurVolume);
setStatus(STATUS_LOADED);
libvlc_video_set_callbacks(mLibVLCMediaPlayer, lock, unlock, display, &mLibVLCCallbackContext);
libvlc_video_set_format(mLibVLCMediaPlayer, "RV32", mWidth, mHeight, mWidth * mDepth);
// note this relies on the "set_loop" message arriving before the "start" (play) one
// but that appears to always be the case
if (mIsLooping)
{
libvlc_media_add_option(mLibVLCMedia, "input-repeat=-1");
}
libvlc_media_player_play(mLibVLCMediaPlayer);
// send a "location_changed" message - this informs the media system
// that a new URL is the 'current' one and is used extensively.
// Again, this is really a browser message but we will use it here.
LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "location_changed");
message.setValue("uri", mURL);
sendMessage(message);
// Send a "navigate complete" event.
// This is really a browser message but the QuickTime plugin did it and
// the media system relies on this message to update internal state so we must send it too
// Note: see "navigate_begin" message above too
// https://jira.secondlife.com/browse/MAINT-6528
LLPluginMessage message_complete(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "navigate_complete");
message_complete.setValue("uri", mURL);
message_complete.setValueS32("result_code", 200);
message_complete.setValue("result_string", "OK");
sendMessage(message_complete);
}
////////////////////////////////////////////////////////////////////////////////
//
void MediaPluginLibVLC::receiveMessage( const char* message_string )
void MediaPluginLibVLC::updateTitle(const char* title)
{
LLPluginMessage message_in;
LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "name_text");
message.setValue("name", title);
sendMessage(message);
}
if(message_in.parse(message_string) >= 0)
{
std::string message_class = message_in.getClass();
std::string message_name = message_in.getName();
if(message_class == LLPLUGIN_MESSAGE_CLASS_BASE)
{
if(message_name == "init")
{
////////////////////////////////////////////////////////////////////////////////
//
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
}
}
////////////////////////////////////////////////////////////////////////////////
//
void MediaPluginLibVLC::receiveMessage(const char* message_string)
{
LLPluginMessage message_in;
if (message_in.parse(message_string) >= 0)
{
std::string message_class = message_in.getClass();
std::string message_name = message_in.getName();
if (message_class == LLPLUGIN_MESSAGE_CLASS_BASE)
{
if (message_name == "init")
{
initVLC();
LLPluginMessage message("base", "init_response");
LLSD versions = LLSD::emptyMap();
versions[LLPLUGIN_MESSAGE_CLASS_BASE] = LLPLUGIN_MESSAGE_CLASS_BASE_VERSION;
versions[LLPLUGIN_MESSAGE_CLASS_MEDIA] = LLPLUGIN_MESSAGE_CLASS_MEDIA_VERSION;
versions[LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER] = LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER_VERSION;
message.setValueLLSD("versions", versions);
LLPluginMessage message("base", "init_response");
LLSD versions = LLSD::emptyMap();
versions[LLPLUGIN_MESSAGE_CLASS_BASE] = LLPLUGIN_MESSAGE_CLASS_BASE_VERSION;
versions[LLPLUGIN_MESSAGE_CLASS_MEDIA] = LLPLUGIN_MESSAGE_CLASS_MEDIA_VERSION;
versions[LLPLUGIN_MESSAGE_CLASS_MEDIA_TIME] = LLPLUGIN_MESSAGE_CLASS_MEDIA_TIME_VERSION;
message.setValueLLSD("versions", versions);
std::ostringstream s;
s << "LibVLC plugin ";
@ -225,96 +441,96 @@ void MediaPluginLibVLC::receiveMessage( const char* message_string )
s << ".";
s << LIBVLC_VERSION_REVISION;
message.setValue("plugin_version", s.str());
sendMessage(message);
}
else if(message_name == "idle")
{
}
else if(message_name == "cleanup")
{
message.setValue("plugin_version", s.str());
sendMessage(message);
}
else if (message_name == "idle")
{
}
else if (message_name == "cleanup")
{
resetVLC();
}
else if(message_name == "shm_added")
{
SharedSegmentInfo info;
info.mAddress = message_in.getValuePointer("address");
info.mSize = (size_t)message_in.getValueS32("size");
std::string name = message_in.getValue("name");
}
else if (message_name == "shm_added")
{
SharedSegmentInfo info;
info.mAddress = message_in.getValuePointer("address");
info.mSize = (size_t)message_in.getValueS32("size");
std::string name = message_in.getValue("name");
mSharedSegments.insert(SharedSegmentMap::value_type(name, info));
mSharedSegments.insert(SharedSegmentMap::value_type(name, info));
}
else if(message_name == "shm_remove")
{
std::string name = message_in.getValue("name");
}
else if (message_name == "shm_remove")
{
std::string name = message_in.getValue("name");
SharedSegmentMap::iterator iter = mSharedSegments.find(name);
if(iter != mSharedSegments.end())
{
if(mPixels == iter->second.mAddress)
{
libvlc_media_player_stop(gLibVLCMediaPlayer);
libvlc_media_player_release(gLibVLCMediaPlayer);
gLibVLCMediaPlayer = 0;
SharedSegmentMap::iterator iter = mSharedSegments.find(name);
if (iter != mSharedSegments.end())
{
if (mPixels == iter->second.mAddress)
{
libvlc_media_player_stop(mLibVLCMediaPlayer);
libvlc_media_player_release(mLibVLCMediaPlayer);
mLibVLCMediaPlayer = 0;
mPixels = NULL;
mTextureSegmentName.clear();
}
mSharedSegments.erase(iter);
}
else
{
mPixels = NULL;
mTextureSegmentName.clear();
}
mSharedSegments.erase(iter);
}
else
{
//std::cerr << "MediaPluginWebKit::receiveMessage: unknown shared memory region!" << std::endl;
}
}
// Send the response so it can be cleaned up.
LLPluginMessage message("base", "shm_remove_response");
message.setValue("name", name);
sendMessage(message);
}
else
{
// Send the response so it can be cleaned up.
LLPluginMessage message("base", "shm_remove_response");
message.setValue("name", name);
sendMessage(message);
}
else
{
//std::cerr << "MediaPluginWebKit::receiveMessage: unknown base message: " << message_name << std::endl;
}
}
else if(message_class == LLPLUGIN_MESSAGE_CLASS_MEDIA)
{
if(message_name == "init")
{
LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "texture_params");
message.setValueS32("default_width", 1024);
message.setValueS32("default_height", 1024);
message.setValueS32("depth", mDepth);
}
}
else if (message_class == LLPLUGIN_MESSAGE_CLASS_MEDIA)
{
if (message_name == "init")
{
LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "texture_params");
message.setValueS32("default_width", 1024);
message.setValueS32("default_height", 1024);
message.setValueS32("depth", mDepth);
message.setValueU32("internalformat", GL_RGB);
message.setValueU32("format", GL_BGRA_EXT);
message.setValueU32("type", GL_UNSIGNED_BYTE);
message.setValueBoolean("coords_opengl", false);
sendMessage(message);
}
else if(message_name == "size_change")
{
std::string name = message_in.getValue("name");
S32 width = message_in.getValueS32("width");
S32 height = message_in.getValueS32("height");
S32 texture_width = message_in.getValueS32("texture_width");
S32 texture_height = message_in.getValueS32("texture_height");
message.setValueU32("format", GL_BGRA_EXT);
message.setValueU32("type", GL_UNSIGNED_BYTE);
message.setValueBoolean("coords_opengl", true);
sendMessage(message);
}
else if (message_name == "size_change")
{
std::string name = message_in.getValue("name");
S32 width = message_in.getValueS32("width");
S32 height = message_in.getValueS32("height");
S32 texture_width = message_in.getValueS32("texture_width");
S32 texture_height = message_in.getValueS32("texture_height");
if(!name.empty())
{
// Find the shared memory region with this name
SharedSegmentMap::iterator iter = mSharedSegments.find(name);
if(iter != mSharedSegments.end())
{
mPixels = (unsigned char*)iter->second.mAddress;
mWidth = width;
mHeight = height;
mTextureWidth = texture_width;
mTextureHeight = texture_height;
if (!name.empty())
{
// Find the shared memory region with this name
SharedSegmentMap::iterator iter = mSharedSegments.find(name);
if (iter != mSharedSegments.end())
{
mPixels = (unsigned char*)iter->second.mAddress;
mWidth = width;
mHeight = height;
mTextureWidth = texture_width;
mTextureHeight = texture_height;
playMedia();
};
};
};
LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "size_change_response");
message.setValue("name", name);
@ -323,76 +539,80 @@ void MediaPluginLibVLC::receiveMessage( const char* message_string )
message.setValueS32("texture_width", texture_width);
message.setValueS32("texture_height", texture_height);
sendMessage(message);
}
else if(message_name == "load_uri")
{
}
else if (message_name == "load_uri")
{
mURL = message_in.getValue("uri");
playMedia();
}
}
else
if (message_class == LLPLUGIN_MESSAGE_CLASS_MEDIA_TIME)
{
if (message_name == "stop")
{
if (gLibVLCMediaPlayer)
{
libvlc_media_player_stop(gLibVLCMediaPlayer);
}
}
else if (message_name == "start")
{
if (gLibVLCMediaPlayer)
{
libvlc_media_player_play(gLibVLCMediaPlayer);
}
}
else if (message_name == "pause")
{
if (gLibVLCMediaPlayer)
{
libvlc_media_player_pause(gLibVLCMediaPlayer);
}
}
else if (message_name == "seek")
{
}
else if (message_name == "set_loop")
{
}
else if (message_name == "set_volume")
{
if (gLibVLCMediaPlayer)
{
F64 volume = message_in.getValueReal("volume");
libvlc_audio_set_volume(gLibVLCMediaPlayer, (int)(volume * 100));
}
}
}
}
else
if (message_class == LLPLUGIN_MESSAGE_CLASS_MEDIA_TIME)
{
if (message_name == "stop")
{
if (mLibVLCMediaPlayer)
{
libvlc_media_player_stop(mLibVLCMediaPlayer);
}
}
else if (message_name == "start")
{
if (mLibVLCMediaPlayer)
{
libvlc_media_player_play(mLibVLCMediaPlayer);
}
}
else if (message_name == "pause")
{
if (mLibVLCMediaPlayer)
{
libvlc_media_player_pause(mLibVLCMediaPlayer);
}
}
else if (message_name == "seek")
{
if (mDuration > 0)
{
F64 normalized_offset = message_in.getValueReal("time") / mDuration;
libvlc_media_player_set_position(mLibVLCMediaPlayer, normalized_offset);
}
}
else if (message_name == "set_loop")
{
mIsLooping = true;
}
else if (message_name == "set_volume")
{
// volume comes in 0 -> 1.0
F64 volume = message_in.getValueReal("volume");
setVolume(volume);
}
}
}
}
////////////////////////////////////////////////////////////////////////////////
//
bool MediaPluginLibVLC::init()
{
LLPluginMessage message( LLPLUGIN_MESSAGE_CLASS_MEDIA, "name_text" );
message.setValue( "name", "LibVLC Plugin" );
sendMessage( message );
LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "name_text");
message.setValue("name", "LibVLC Plugin");
sendMessage(message);
return true;
return true;
};
////////////////////////////////////////////////////////////////////////////////
//
int init_media_plugin( LLPluginInstance::sendMessageFunction host_send_func,
void* host_user_data,
LLPluginInstance::sendMessageFunction *plugin_send_func,
void **plugin_user_data )
int init_media_plugin(LLPluginInstance::sendMessageFunction host_send_func,
void* host_user_data,
LLPluginInstance::sendMessageFunction *plugin_send_func,
void **plugin_user_data)
{
MediaPluginLibVLC* self = new MediaPluginLibVLC( host_send_func, host_user_data );
*plugin_send_func = MediaPluginLibVLC::staticReceiveMessage;
*plugin_user_data = ( void* )self;
MediaPluginLibVLC* self = new MediaPluginLibVLC(host_send_func, host_user_data);
*plugin_send_func = MediaPluginLibVLC::staticReceiveMessage;
*plugin_user_data = (void*)self;
return 0;
return 0;
}

View File

@ -311,9 +311,7 @@ private:
MatrixRecord transform;
SetIdentityMatrix( &transform ); // transforms are additive so start from identify matrix
double scaleX = (double) mWidth / mNaturalWidth;
// 2016-05-31 CP remove local flip (via -1.0) since texture coods for media on a prim are now flipped for VLC/CEF
double scaleY = 1.0 * (double) mHeight / mNaturalHeight;
double scaleY = -1.0 * (double) mHeight / mNaturalHeight;
double centerX = mWidth / 2.0;
double centerY = mHeight / 2.0;
ScaleMatrix( &transform, X2Fix( scaleX ), X2Fix( scaleY ), X2Fix( centerX ), X2Fix( centerY ) );

View File

@ -26,13 +26,6 @@
uniform mat3 normal_matrix;
uniform mat4 texture_matrix0;
uniform mat4 modelview_projection_matrix;
uniform bool invert_tex_y = false;
const mat4 invTexM = mat4(
1, 0, 0, 0,
0,-1, 0, 0,
0, 0, 1, 0,
0, 0, 0, 1
);
ATTRIBUTE vec3 position;
ATTRIBUTE vec4 diffuse_color;
@ -51,10 +44,6 @@ void main()
//transform vertex
gl_Position = modelview_projection_matrix * vec4(position.xyz, 1.0);
vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy;
if(invert_tex_y)
{
vary_texcoord0 = vec2(invTexM * vec4(vary_texcoord0,0,1)).xy;
}
passTextureIndex();
vary_normal = normalize(normal_matrix * normal);

View File

@ -26,13 +26,6 @@
uniform mat4 texture_matrix0;
uniform mat4 modelview_matrix;
uniform mat4 modelview_projection_matrix;
uniform bool invert_tex_y = false;
const mat4 invTexM = mat4(
1, 0, 0, 0,
0,-1, 0, 0,
0, 0, 1, 0,
0, 0, 0, 1
);
ATTRIBUTE vec3 position;
@ -69,10 +62,6 @@ void main()
#endif
vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy;
if(invert_tex_y)
{
vary_texcoord0 = vec2(invTexM * vec4(vary_texcoord0,0,1)).xy;
}
calcAtmospherics(pos.xyz);

View File

@ -26,14 +26,6 @@
uniform mat4 texture_matrix0;
uniform mat4 modelview_matrix;
uniform mat4 modelview_projection_matrix;
uniform bool invert_tex_y = false;
const mat4 invTexM = mat4(
1, 0, 0, 0,
0,-1, 0, 0,
0, 0, 1, 0,
0, 0, 0, 1
);
ATTRIBUTE vec3 position;
void passTextureIndex();
@ -57,11 +49,6 @@ void main()
vec4 pos = (modelview_matrix * vert);
gl_Position = modelview_projection_matrix*vec4(position.xyz, 1.0);
vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy;
if(invert_tex_y)
{
vary_texcoord0 = vec2(invTexM * vec4(vary_texcoord0,0,1)).xy;
}
calcAtmospherics(pos.xyz);

View File

@ -27,13 +27,6 @@ uniform mat3 normal_matrix;
uniform mat4 texture_matrix0;
uniform mat4 modelview_matrix;
uniform mat4 modelview_projection_matrix;
uniform bool invert_tex_y = false;
const mat4 invTexM = mat4(
1, 0, 0, 0,
0,-1, 0, 0,
0, 0, 1, 0,
0, 0, 0, 1
);
ATTRIBUTE vec3 position;
void passTextureIndex();
@ -58,10 +51,7 @@ void main()
gl_Position = modelview_projection_matrix*vec4(position.xyz, 1.0);
vary_texcoord0 = (texture_matrix0 * vec4(texcoord0, 0, 1)).xy;
if(invert_tex_y)
{
vary_texcoord0 = vec2(invTexM * vec4(vary_texcoord0,0,1)).xy;
}
vec3 norm = normalize(normal_matrix * normal);

View File

@ -473,10 +473,6 @@ void LLRenderPass::pushBatch(LLDrawInfo& params, U32 mask, BOOL texture, BOOL ba
if (params.mTextureList[i].notNull())
{
gGL.getTexUnit(i)->bind(params.mTextureList[i], TRUE);
if (LLViewerTexture::MEDIA_TEXTURE == params.mTextureList[i]->getType())
{
gGL.setInverseTexCoordByY(true);
}
}
}
}
@ -486,54 +482,13 @@ void LLRenderPass::pushBatch(LLDrawInfo& params, U32 mask, BOOL texture, BOOL ba
{
params.mTexture->addTextureStats(params.mVSize);
gGL.getTexUnit(0)->bind(params.mTexture, TRUE) ;
if (!gPipeline.mVertexShadersEnabled)
{
if (LLViewerTexture::MEDIA_TEXTURE == params.mTexture->getType() && !params.mTextureMatrix)
{
static const float fIdntInvY[] = {
1, 0, 0, 0,
0, -1, 0, 0,
0, 0, 1, 0,
0, 0, 0, 1
};
gGL.getTexUnit(0)->activate();
gGL.matrixMode(LLRender::MM_TEXTURE);
gGL.loadMatrix((GLfloat*)fIdntInvY);
gPipeline.mTextureMatrixOps++;
tex_setup = true;
}
}
else
{
gGL.setInverseTexCoordByY(LLViewerTexture::MEDIA_TEXTURE == params.mTexture->getType());
}
if (params.mTextureMatrix)
{
tex_setup = true;
gGL.getTexUnit(0)->activate();
gGL.matrixMode(LLRender::MM_TEXTURE);
gGL.loadMatrix((GLfloat*) params.mTextureMatrix->mMatrix);
if (LLViewerTexture::MEDIA_TEXTURE == params.mTexture->getType() && !gPipeline.mVertexShadersEnabled)
{
static const float fIdntInvY[] = {
1, 0, 0, 0,
0, -1, 0, 0,
0, 0, 1, 0,
0, 0, 0, 1
};
gGL.multMatrix(fIdntInvY);
gPipeline.mMatrixOpCount++;
}
gPipeline.mTextureMatrixOps++;
tex_setup = true;
}
}
else

View File

@ -82,7 +82,7 @@ LLFloaterWebContent::LLFloaterWebContent( const Params& params )
mCommitCallbackRegistrar.add( "WebContent.Stop", boost::bind( &LLFloaterWebContent::onClickStop, this ));
mCommitCallbackRegistrar.add( "WebContent.EnterAddress", boost::bind( &LLFloaterWebContent::onEnterAddress, this ));
mCommitCallbackRegistrar.add( "WebContent.PopExternal", boost::bind(&LLFloaterWebContent::onPopExternal, this));
mCommitCallbackRegistrar.add( "WebContent.TestVideo", boost::bind(&LLFloaterWebContent::onTestVideo, this, _2));
mCommitCallbackRegistrar.add( "WebContent.TestURL", boost::bind(&LLFloaterWebContent::onTestURL, this, _2));
}
BOOL LLFloaterWebContent::postBuild()
@ -117,6 +117,9 @@ BOOL LLFloaterWebContent::postBuild()
// initialize the URL history using the system URL History manager
initializeURLHistory();
// if "Develop" Menu open, sety a flag and change things to be more useful for devs
mDevelopMode = gSavedSettings.getBOOL("QAMode");
return TRUE;
}
@ -202,8 +205,6 @@ void LLFloaterWebContent::geometryChanged(S32 x, S32 y, S32 width, S32 height)
width + getRect().getWidth() - browser_rect.getWidth(),
height + getRect().getHeight() - browser_rect.getHeight());
LL_DEBUGS() << "geometry change: " << geom << LL_ENDL;
LLRect new_rect;
getParent()->screenRectToLocal(geom, &new_rect);
setShape(new_rect);
@ -212,8 +213,6 @@ void LLFloaterWebContent::geometryChanged(S32 x, S32 y, S32 width, S32 height)
// static
void LLFloaterWebContent::preCreate(LLFloaterWebContent::Params& p)
{
LL_DEBUGS() << "url = " << p.url() << ", target = " << p.target() << ", uuid = " << p.id() << LL_ENDL;
if (!p.id.isProvided())
{
p.id = LLUUID::generateNewID().asString();
@ -231,12 +230,6 @@ void LLFloaterWebContent::preCreate(LLFloaterWebContent::Params& p)
// and close the least recently opened one if this will put us over the limit.
LLFloaterReg::const_instance_list_t &instances = LLFloaterReg::getFloaterList(p.window_class);
LL_DEBUGS() << "total instance count is " << instances.size() << LL_ENDL;
for(LLFloaterReg::const_instance_list_t::const_iterator iter = instances.begin(); iter != instances.end(); iter++)
{
LL_DEBUGS() << " " << (*iter)->getKey()["target"] << LL_ENDL;
}
if(instances.size() >= (size_t)browser_window_limit)
{
@ -248,7 +241,6 @@ void LLFloaterWebContent::preCreate(LLFloaterWebContent::Params& p)
void LLFloaterWebContent::open_media(const Params& p)
{
// Specifying a mime type of text/html here causes the plugin system to skip the MIME type probe and just open a browser plugin.
LLViewerMedia::proxyWindowOpened(p.target(), p.id());
mWebBrowser->setHomePageUrl(p.url);
mWebBrowser->setTarget(p.target);
@ -258,6 +250,10 @@ void LLFloaterWebContent::open_media(const Params& p)
getChild<LLLayoutPanel>("status_bar")->setVisible(p.show_chrome);
getChild<LLLayoutPanel>("nav_controls")->setVisible(p.show_chrome);
// turn additional debug controls on but only for Develop mode (Develop menu open)
getChild<LLLayoutPanel>("debug_controls")->setVisible(mDevelopMode);
bool address_entry_enabled = p.allow_address_entry && !p.trusted_content;
mAllowNavigation = p.allow_back_forward_navigation;
getChildView("address")->setEnabled(address_entry_enabled);
@ -526,7 +522,7 @@ void LLFloaterWebContent::onPopExternal()
};
}
void LLFloaterWebContent::onTestVideo(std::string url)
void LLFloaterWebContent::onTestURL(std::string url)
{
LLStringUtil::trim(url);
if (url.length() > 0)

View File

@ -92,7 +92,7 @@ protected:
void onClickStop();
void onEnterAddress();
void onPopExternal();
void onTestVideo(std::string url);
void onTestURL(std::string url);
static void preCreate(Params& p);
void open_media(const Params& );
@ -115,6 +115,7 @@ protected:
std::string mUUID;
bool mShowPageTitle;
bool mAllowNavigation;
bool mDevelopMode;
};
#endif // LL_LLFLOATERWEBCONTENT_H

View File

@ -952,7 +952,7 @@ void LLMediaCtrl::convertInputCoords(S32& x, S32& y)
}
x = ll_round((F32)x * LLUI::getScaleFactor().mV[VX]);
if ( coords_opengl )
if ( ! coords_opengl )
{
y = ll_round((F32)(y) * LLUI::getScaleFactor().mV[VY]);
}

View File

@ -95,7 +95,8 @@ LLPanelPrimMediaControls::LLPanelPrimMediaControls() :
mVolumeSliderVisible(0),
mWindowShade(NULL),
mHideImmediately(false),
mSecureURL(false)
mSecureURL(false),
mMediaPlaySliderCtrlMouseDownValue(0.0)
{
mCommitCallbackRegistrar.add("MediaCtrl.Close", boost::bind(&LLPanelPrimMediaControls::onClickClose, this));
mCommitCallbackRegistrar.add("MediaCtrl.Back", boost::bind(&LLPanelPrimMediaControls::onClickBack, this));
@ -109,7 +110,8 @@ LLPanelPrimMediaControls::LLPanelPrimMediaControls() :
mCommitCallbackRegistrar.add("MediaCtrl.Open", boost::bind(&LLPanelPrimMediaControls::onClickOpen, this));
mCommitCallbackRegistrar.add("MediaCtrl.Zoom", boost::bind(&LLPanelPrimMediaControls::onClickZoom, this));
mCommitCallbackRegistrar.add("MediaCtrl.CommitURL", boost::bind(&LLPanelPrimMediaControls::onCommitURL, this));
mCommitCallbackRegistrar.add("MediaCtrl.JumpProgress", boost::bind(&LLPanelPrimMediaControls::onCommitSlider, this));
mCommitCallbackRegistrar.add("MediaCtrl.MouseDown", boost::bind(&LLPanelPrimMediaControls::onMediaPlaySliderCtrlMouseDown, this));
mCommitCallbackRegistrar.add("MediaCtrl.MouseUp", boost::bind(&LLPanelPrimMediaControls::onMediaPlaySliderCtrlMouseUp, this));
mCommitCallbackRegistrar.add("MediaCtrl.CommitVolumeUp", boost::bind(&LLPanelPrimMediaControls::onCommitVolumeUp, this));
mCommitCallbackRegistrar.add("MediaCtrl.CommitVolumeDown", boost::bind(&LLPanelPrimMediaControls::onCommitVolumeDown, this));
mCommitCallbackRegistrar.add("MediaCtrl.Volume", boost::bind(&LLPanelPrimMediaControls::onCommitVolumeSlider, this));
@ -1248,26 +1250,38 @@ void LLPanelPrimMediaControls::setCurrentURL()
#endif // USE_COMBO_BOX_FOR_MEDIA_URL
}
void LLPanelPrimMediaControls::onCommitSlider()
{
focusOnTarget();
LLViewerMediaImpl* media_impl = getTargetMediaImpl();
if (media_impl)
void LLPanelPrimMediaControls::onMediaPlaySliderCtrlMouseDown()
{
mMediaPlaySliderCtrlMouseDownValue = mMediaPlaySliderCtrl->getValue().asReal();
mUpdateSlider = false;
}
void LLPanelPrimMediaControls::onMediaPlaySliderCtrlMouseUp()
{
F64 cur_value = mMediaPlaySliderCtrl->getValue().asReal();
if (mMediaPlaySliderCtrlMouseDownValue != cur_value)
{
// get slider value
F64 slider_value = mMediaPlaySliderCtrl->getValue().asReal();
if(slider_value <= 0.0)
{
media_impl->stop();
}
else
focusOnTarget();
LLViewerMediaImpl* media_impl = getTargetMediaImpl();
if (media_impl)
{
media_impl->seek(slider_value*mMovieDuration);
//mUpdateSlider= false;
if (cur_value <= 0.0)
{
media_impl->stop();
}
else
{
media_impl->seek(cur_value * mMovieDuration);
}
}
mUpdateSlider = true;
}
}
}
void LLPanelPrimMediaControls::onCommitVolumeUp()
{

View File

@ -107,8 +107,10 @@ private:
void updateZoom();
void setCurrentURL();
void onCommitSlider();
void onMediaPlaySliderCtrlMouseDown();
void onMediaPlaySliderCtrlMouseUp();
void onCommitVolumeUp();
void onCommitVolumeDown();
void onCommitVolumeSlider();
@ -219,6 +221,8 @@ private:
S32 mVolumeSliderVisible;
LLNotificationPtr mActiveNotification;
F64 mMediaPlaySliderCtrlMouseDownValue;
};
#endif // LL_PANELPRIMMEDIACONTROLS_H

View File

@ -26,10 +26,10 @@
<layout_panel
auto_resize="false"
default_tab_group="1"
height="44"
height="22"
layout="topleft"
left="0"
min_height="40"
min_height="20"
name="nav_controls"
top="400"
width="770">
@ -153,90 +153,136 @@
<button.commit_callback
function="WebContent.PopExternal" />
</button>
</layout_panel>
<layout_panel
height="22"
layout="topleft"
left_delta="0"
name="debug_controls"
top_delta="0"
auto_resize="false"
width="585">
<button
image_overlay="Home_Off"
image_disabled="PushButton_Disabled"
image_disabled_selected="PushButton_Disabled"
image_selected="PushButton_Selected"
image_unselected="PushButton_Off"
chrome="true"
tool_tip="Web tests home page"
enabled="true"
follows="left|top"
height="22"
layout="topleft"
left="1"
name="web_test_home_page"
top="0"
width="22">
<button.commit_callback
function="WebContent.TestURL"
parameter="https://callum-linden.s3.amazonaws.com/ceftests.html"/>
</button>
<button
image_overlay="Video_URL_Off"
image_disabled="PushButton_Disabled"
image_disabled_selected="PushButton_Disabled"
image_selected="PushButton_Selected"
image_unselected="PushButton_Off"
image_disabled="PushButton_Disabled"
image_disabled_selected="PushButton_Disabled"
image_selected="PushButton_Selected"
image_unselected="PushButton_Off"
chrome="true"
tool_tip="MPEG4 Video Test"
enabled="true"
follows="left|top"
height="22"
layout="topleft"
left="1"
left="27"
name="VLC Plugin Test"
top="22"
top="0"
width="22">
<button.commit_callback
function="WebContent.TestVideo"
function="WebContent.TestURL"
parameter="https://callum-linden.s3.amazonaws.com/sample_media/ss.mp4"/>
</button>
<button
image_overlay="Video_URL_Off"
image_disabled="PushButton_Disabled"
image_disabled_selected="PushButton_Disabled"
image_selected="PushButton_Selected"
image_unselected="PushButton_Off"
image_disabled="PushButton_Disabled"
image_disabled_selected="PushButton_Disabled"
image_selected="PushButton_Selected"
image_unselected="PushButton_Off"
chrome="true"
tool_tip="MKV Video Test"
enabled="true"
follows="left|top"
height="22"
layout="topleft"
left="27"
left="51"
name="VLC Plugin Test"
top="22"
top="0"
width="22">
<button.commit_callback
function="WebContent.TestVideo"
function="WebContent.TestURL"
parameter="https://callum-linden.s3.amazonaws.com/sample_media/jellyfish.mkv"/>
</button>
<button
image_overlay="Video_URL_Off"
image_disabled="PushButton_Disabled"
image_disabled_selected="PushButton_Disabled"
image_selected="PushButton_Selected"
image_unselected="PushButton_Off"
image_disabled="PushButton_Disabled"
image_disabled_selected="PushButton_Disabled"
image_selected="PushButton_Selected"
image_unselected="PushButton_Off"
chrome="true"
tool_tip="WebM Video Test"
enabled="true"
follows="left|top"
height="22"
layout="topleft"
left="51"
left="75"
name="VLC Plugin Test"
top="22"
top="0"
width="22">
<button.commit_callback
function="WebContent.TestVideo"
parameter="https://callum-linden.s3.amazonaws.com/sample_media/kubo.webm"/>
function="WebContent.TestURL"
parameter="https://callum-linden.s3.amazonaws.com/sample_media/jumprope.webm"/>
</button>
<button
image_overlay="Video_URL_Off"
image_disabled="PushButton_Disabled"
image_disabled_selected="PushButton_Disabled"
image_selected="PushButton_Selected"
image_unselected="PushButton_Off"
image_disabled="PushButton_Disabled"
image_disabled_selected="PushButton_Disabled"
image_selected="PushButton_Selected"
image_unselected="PushButton_Off"
chrome="true"
tool_tip="MP3 audio Test"
enabled="true"
follows="left|top"
height="22"
layout="topleft"
left="75"
left="99"
name="VLC Plugin Test"
top="22"
top="0"
width="22">
function="WebContent.TestVideo"
parameter="https://callum-linden.s3.amazonaws.com/alegria.mp3"/>
<button.commit_callback
function="WebContent.TestURL"
parameter="https://callum-linden.s3.amazonaws.com/alegria.mp3"/>
</button>
<button
image_overlay="Video_URL_Off"
image_disabled="PushButton_Disabled"
image_disabled_selected="PushButton_Disabled"
image_selected="PushButton_Selected"
image_unselected="PushButton_Off"
chrome="true"
tool_tip="FLV Test"
enabled="true"
follows="left|top"
height="22"
layout="topleft"
left="123"
name="VLC Plugin Test"
top="0"
width="22">
<button.commit_callback
function="WebContent.TestURL"
parameter="https://callum-linden.s3.amazonaws.com/sample_media/vandal.flv"/>
</button>
</layout_panel>
<layout_panel
height="40"

View File

@ -262,11 +262,11 @@
parameter="message_critical" />
</menu_item_call>
<menu_item_call
label="Web Content Floater Debug Test"
name="Web Content Floater Debug Test">
label="Media Browser"
name="Media Browser">
<menu_item_call.on_click
function="Advanced.WebContentTest"
parameter="https://callum-linden.s3.amazonaws.com/ceftests.html"/>
parameter="http://google.com"/>
</menu_item_call>
<menu
create_jump_keys="true"

View File

@ -4198,7 +4198,7 @@
shortcut="control|shift|Z">
<menu_item_call.on_click
function="Advanced.WebContentTest"
parameter="https://callum-linden.s3.amazonaws.com/ceftests.html"/>
parameter="http://google.com"/>
</menu_item_call>
<menu_item_call
label="FB Connect Test"

View File

@ -374,9 +374,11 @@
layout="topleft"
tool_tip="Movie play progress"
width="200">
<slider_bar.commit_callback
function="MediaCtrl.JumpProgress" />
</slider_bar>
<slider_bar.mouse_down_callback
function="MediaCtrl.MouseDown" />
<slider_bar.mouse_up_callback
function="MediaCtrl.MouseUp" />
</slider_bar>
</layout_panel>
<layout_panel
name="skip_back"