diff options
author | James Cook <james@lindenlab.com> | 2009-12-29 11:55:20 -0800 |
---|---|---|
committer | James Cook <james@lindenlab.com> | 2009-12-29 11:55:20 -0800 |
commit | c2915a889987e64484c9794d55740e7f6ac8f9bd (patch) | |
tree | e09a6050829fbc4b1f8fdae03f6c12742ba903ed /indra/media_plugins/gstreamer010/media_plugin_gstreamer010.cpp | |
parent | 1e9a5c21e5493ad3dabec4d032bc0a627e2f725f (diff) | |
parent | 3519435bbfeec4c838d5ffbe008d0ac7bbc085a8 (diff) |
Merge viewer-2-0 into gooey
Diffstat (limited to 'indra/media_plugins/gstreamer010/media_plugin_gstreamer010.cpp')
-rw-r--r-- | indra/media_plugins/gstreamer010/media_plugin_gstreamer010.cpp | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/indra/media_plugins/gstreamer010/media_plugin_gstreamer010.cpp b/indra/media_plugins/gstreamer010/media_plugin_gstreamer010.cpp index 8e850ed7ff..26173314a7 100644 --- a/indra/media_plugins/gstreamer010/media_plugin_gstreamer010.cpp +++ b/indra/media_plugins/gstreamer010/media_plugin_gstreamer010.cpp @@ -105,7 +105,7 @@ private: void mouseUp( int x, int y ); void mouseMove( int x, int y ); - bool sizeChanged(); + void sizeChanged(); static bool mDoneInit; @@ -477,9 +477,8 @@ MediaPluginGStreamer010::update(int milliseconds) mCurrentWidth <= mWidth && !mTextureSegmentName.empty()) { - // we're gonna totally consume this frame - reset 'ready' flag - mVideoSink->retained_frame_ready = FALSE; + mVideoSink->retained_frame_ready = FALSE; int destination_rowbytes = mWidth * mDepth; for (int row=0; row<mCurrentHeight; ++row) { @@ -840,7 +839,7 @@ MediaPluginGStreamer010::startup() } -bool +void MediaPluginGStreamer010::sizeChanged() { // the shared writing space has possibly changed size/location/whatever @@ -855,8 +854,9 @@ MediaPluginGStreamer010::sizeChanged() mNaturalWidth, mNaturalHeight); } + // if the size has changed then the shm has changed and the app needs telling if (mCurrentWidth != mPreviousWidth || - mCurrentHeight != mPreviousHeight) // if the size has changed then the shm has changed and the app needs telling + mCurrentHeight != mPreviousHeight) { mPreviousWidth = mCurrentWidth; mPreviousHeight = mCurrentHeight; @@ -865,11 +865,9 @@ MediaPluginGStreamer010::sizeChanged() message.setValue("name", mTextureSegmentName); message.setValueS32("width", mNaturalWidth); message.setValueS32("height", mNaturalHeight); - DEBUGMSG("<--- Sending size change request to application with name: '%s' - size is %d x %d", mTextureSegmentName.c_str(), mNaturalWidth, mNaturalHeight); + DEBUGMSG("<--- Sending size change request to application with name: '%s' - natural size is %d x %d", mTextureSegmentName.c_str(), mNaturalWidth, mNaturalHeight); sendMessage(message); } - - return true; } @@ -1000,7 +998,6 @@ void MediaPluginGStreamer010::receiveMessage(const char *message_string) INFOMSG("MediaPluginGStreamer010::receiveMessage: shared memory added, name: %s, size: %d, address: %p", name.c_str(), int(info.mSize), info.mAddress); mSharedSegments.insert(SharedSegmentMap::value_type(name, info)); - } else if(message_name == "shm_remove") { @@ -1079,7 +1076,7 @@ void MediaPluginGStreamer010::receiveMessage(const char *message_string) INFOMSG("**** = REAL RESIZE REQUEST FROM APP"); GST_OBJECT_LOCK(mVideoSink); - mVideoSink->resize_forced = true; + mVideoSink->resize_forced_always = true; mVideoSink->resize_try_width = texture_width; mVideoSink->resize_try_height = texture_height; GST_OBJECT_UNLOCK(mVideoSink); |