summaryrefslogtreecommitdiff
path: root/indra/media_plugins/gstreamer010
diff options
context:
space:
mode:
authorMonroe Linden <monroe@lindenlab.com>2010-03-16 16:42:31 -0700
committerMonroe Linden <monroe@lindenlab.com>2010-03-16 16:42:31 -0700
commitce242821dcf83bde15b49895c24019347b266d97 (patch)
treed45de7f5a67a3e9e54f9d9d00470112d50c52070 /indra/media_plugins/gstreamer010
parentec0a2b984976d6b5c0df56624120cddca77c77a9 (diff)
Added an "init" message in LLPLUGIN_MESSAGE_CLASS_MEDIA, and made LLPluginClassMedia queue it up before initializing its LLPluginProcessParent.
Made all existing plugins send their texture_params message from this init message instead of the LLPLUGIN_MESSAGE_CLASS_BASE "init" message. (This ensures that they won't start to receive 'size_change' messages until after the init has happened.) Added "set_user_data_path" and "set_language_code" messages to LLPluginClassMedia. Made webkit plugin deal with the new messages, when they're sent before it receives the media "init". Removed the user_data_path and language_code arguments from the init function calls throughout the hierarchy. Made LLViewerMediaImpl queue up the language code and user data path messages before initializing the media. Reviewed by Callum at http://codereview.lindenlab.com/687006 .
Diffstat (limited to 'indra/media_plugins/gstreamer010')
-rw-r--r--indra/media_plugins/gstreamer010/media_plugin_gstreamer010.cpp58
1 files changed, 30 insertions, 28 deletions
diff --git a/indra/media_plugins/gstreamer010/media_plugin_gstreamer010.cpp b/indra/media_plugins/gstreamer010/media_plugin_gstreamer010.cpp
index 26173314a7..a69da3ff5a 100644
--- a/indra/media_plugins/gstreamer010/media_plugin_gstreamer010.cpp
+++ b/indra/media_plugins/gstreamer010/media_plugin_gstreamer010.cpp
@@ -946,33 +946,6 @@ void MediaPluginGStreamer010::receiveMessage(const char *message_string)
message.setValue("plugin_version", getVersion());
sendMessage(message);
-
- // Plugin gets to decide the texture parameters to use.
- message.setMessage(LLPLUGIN_MESSAGE_CLASS_MEDIA, "texture_params");
- // lame to have to decide this now, it depends on the movie. Oh well.
- mDepth = 4;
-
- mCurrentWidth = 1;
- mCurrentHeight = 1;
- mPreviousWidth = 1;
- mPreviousHeight = 1;
- mNaturalWidth = 1;
- mNaturalHeight = 1;
- mWidth = 1;
- mHeight = 1;
- mTextureWidth = 1;
- mTextureHeight = 1;
-
- message.setValueU32("format", GL_RGBA);
- message.setValueU32("type", GL_UNSIGNED_INT_8_8_8_8_REV);
-
- message.setValueS32("depth", mDepth);
- message.setValueS32("default_width", mWidth);
- message.setValueS32("default_height", mHeight);
- message.setValueU32("internalformat", GL_RGBA8);
- message.setValueBoolean("coords_opengl", true); // true == use OpenGL-style coordinates, false == (0,0) is upper left.
- message.setValueBoolean("allow_downsample", true); // we respond with grace and performance if asked to downscale
- sendMessage(message);
}
else if(message_name == "idle")
{
@@ -1037,7 +1010,36 @@ void MediaPluginGStreamer010::receiveMessage(const char *message_string)
}
else if(message_class == LLPLUGIN_MESSAGE_CLASS_MEDIA)
{
- if(message_name == "size_change")
+ if(message_name == "init")
+ {
+ // Plugin gets to decide the texture parameters to use.
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "texture_params");
+ // lame to have to decide this now, it depends on the movie. Oh well.
+ mDepth = 4;
+
+ mCurrentWidth = 1;
+ mCurrentHeight = 1;
+ mPreviousWidth = 1;
+ mPreviousHeight = 1;
+ mNaturalWidth = 1;
+ mNaturalHeight = 1;
+ mWidth = 1;
+ mHeight = 1;
+ mTextureWidth = 1;
+ mTextureHeight = 1;
+
+ message.setValueU32("format", GL_RGBA);
+ message.setValueU32("type", GL_UNSIGNED_INT_8_8_8_8_REV);
+
+ message.setValueS32("depth", mDepth);
+ message.setValueS32("default_width", mWidth);
+ message.setValueS32("default_height", mHeight);
+ message.setValueU32("internalformat", GL_RGBA8);
+ message.setValueBoolean("coords_opengl", true); // true == use OpenGL-style coordinates, false == (0,0) is upper left.
+ message.setValueBoolean("allow_downsample", true); // we respond with grace and performance if asked to downscale
+ sendMessage(message);
+ }
+ else if(message_name == "size_change")
{
std::string name = message_in.getValue("name");
S32 width = message_in.getValueS32("width");