summaryrefslogtreecommitdiff
path: root/indra/media_plugins/quicktime/media_plugin_quicktime.cpp
diff options
context:
space:
mode:
authorKent Quirk <q@lindenlab.com>2010-03-24 01:26:23 -0400
committerKent Quirk <q@lindenlab.com>2010-03-24 01:26:23 -0400
commitbd95e64d3da1b90b37e88e31979cc8f227d5cc58 (patch)
treefff84f4075cb34a3fdd589bf399e47bebb8bc17d /indra/media_plugins/quicktime/media_plugin_quicktime.cpp
parent3ad56f22158dd2665204745af2171689f208cd7e (diff)
parent00a97a4f95f644b1807d72cebce6dd6a7a1cf31e (diff)
Set hotfix build params for Release.
Diffstat (limited to 'indra/media_plugins/quicktime/media_plugin_quicktime.cpp')
-rw-r--r--indra/media_plugins/quicktime/media_plugin_quicktime.cpp66
1 files changed, 35 insertions, 31 deletions
diff --git a/indra/media_plugins/quicktime/media_plugin_quicktime.cpp b/indra/media_plugins/quicktime/media_plugin_quicktime.cpp
index e230fcc280..1f88301ca7 100644
--- a/indra/media_plugins/quicktime/media_plugin_quicktime.cpp
+++ b/indra/media_plugins/quicktime/media_plugin_quicktime.cpp
@@ -859,36 +859,6 @@ void MediaPluginQuickTime::receiveMessage(const char *message_string)
plugin_version += codec.str();
message.setValue("plugin_version", plugin_version);
sendMessage(message);
-
- // Plugin gets to decide the texture parameters to use.
- message.setMessage(LLPLUGIN_MESSAGE_CLASS_MEDIA, "texture_params");
- #if defined(LL_WINDOWS)
- // Values for Windows
- mDepth = 3;
- message.setValueU32("format", GL_RGB);
- message.setValueU32("type", GL_UNSIGNED_BYTE);
-
- // We really want to pad the texture width to a multiple of 32 bytes, but since we're using 3-byte pixels, it doesn't come out even.
- // Padding to a multiple of 3*32 guarantees it'll divide out properly.
- message.setValueU32("padding", 32 * 3);
- #else
- // Values for Mac
- mDepth = 4;
- message.setValueU32("format", GL_BGRA_EXT);
- #ifdef __BIG_ENDIAN__
- message.setValueU32("type", GL_UNSIGNED_INT_8_8_8_8_REV );
- #else
- message.setValueU32("type", GL_UNSIGNED_INT_8_8_8_8);
- #endif
-
- // Pad texture width to a multiple of 32 bytes, to line up with cache lines.
- message.setValueU32("padding", 32);
- #endif
- message.setValueS32("depth", mDepth);
- message.setValueU32("internalformat", GL_RGB);
- message.setValueBoolean("coords_opengl", true); // true == use OpenGL-style coordinates, false == (0,0) is upper left.
- message.setValueBoolean("allow_downsample", true);
- sendMessage(message);
}
else if(message_name == "idle")
{
@@ -953,7 +923,41 @@ void MediaPluginQuickTime::receiveMessage(const char *message_string)
}
else if(message_class == LLPLUGIN_MESSAGE_CLASS_MEDIA)
{
- if(message_name == "size_change")
+ if(message_name == "init")
+ {
+ // This is the media init message -- all necessary data for initialization should have been received.
+
+ // Plugin gets to decide the texture parameters to use.
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "texture_params");
+ #if defined(LL_WINDOWS)
+ // Values for Windows
+ mDepth = 3;
+ message.setValueU32("format", GL_RGB);
+ message.setValueU32("type", GL_UNSIGNED_BYTE);
+
+ // We really want to pad the texture width to a multiple of 32 bytes, but since we're using 3-byte pixels, it doesn't come out even.
+ // Padding to a multiple of 3*32 guarantees it'll divide out properly.
+ message.setValueU32("padding", 32 * 3);
+ #else
+ // Values for Mac
+ mDepth = 4;
+ message.setValueU32("format", GL_BGRA_EXT);
+ #ifdef __BIG_ENDIAN__
+ message.setValueU32("type", GL_UNSIGNED_INT_8_8_8_8_REV );
+ #else
+ message.setValueU32("type", GL_UNSIGNED_INT_8_8_8_8);
+ #endif
+
+ // Pad texture width to a multiple of 32 bytes, to line up with cache lines.
+ message.setValueU32("padding", 32);
+ #endif
+ message.setValueS32("depth", mDepth);
+ message.setValueU32("internalformat", GL_RGB);
+ message.setValueBoolean("coords_opengl", true); // true == use OpenGL-style coordinates, false == (0,0) is upper left.
+ message.setValueBoolean("allow_downsample", true);
+ sendMessage(message);
+ }
+ else if(message_name == "size_change")
{
std::string name = message_in.getValue("name");
S32 width = message_in.getValueS32("width");