summaryrefslogtreecommitdiff
path: root/indra/media_plugins
diff options
context:
space:
mode:
authorGraham Linden <graham@lindenlab.com>2013-09-09 12:43:10 -0700
committerGraham Linden <graham@lindenlab.com>2013-09-09 12:43:10 -0700
commit2df58f775fdd1c846ec125a9736d6dd39dab2811 (patch)
treecbf35ab02a6b22bf76fcf436d75243df906acbcc /indra/media_plugins
parent38b1975b09c642682bfeb8d6d575ccfbf47ce7e4 (diff)
parent55ae6a7962cdc9a9d7d087fbc529d30db9c37013 (diff)
Merge viewer-release 3.6.6
Diffstat (limited to 'indra/media_plugins')
-rwxr-xr-xindra/media_plugins/quicktime/media_plugin_quicktime.cpp48
-rwxr-xr-xindra/media_plugins/webkit/mac_volume_catcher.cpp8
2 files changed, 15 insertions, 41 deletions
diff --git a/indra/media_plugins/quicktime/media_plugin_quicktime.cpp b/indra/media_plugins/quicktime/media_plugin_quicktime.cpp
index 24328202cb..2dd97a9ba7 100755
--- a/indra/media_plugins/quicktime/media_plugin_quicktime.cpp
+++ b/indra/media_plugins/quicktime/media_plugin_quicktime.cpp
@@ -232,12 +232,8 @@ private:
mMovieHandle = NULL;
};
- if ( mGWorldHandle )
- {
- DisposeGWorld( mGWorldHandle );
- mGWorldHandle = NULL;
- };
-
+ mGWorldHandle = NULL;
+
setStatus(STATUS_NONE);
return true;
@@ -273,6 +269,7 @@ private:
//std::cerr << "<--- Sending size change request to application with name: " << mTextureSegmentName << " - size is " << width << " x " << height << std::endl;
}
}
+
// sanitize destination size
Rect dest_rect = rectFromSize(mWidth, mHeight);
@@ -281,12 +278,10 @@ private:
int depth_bits = mDepth * 8;
long rowbytes = mDepth * mTextureWidth;
- GWorldPtr old_gworld_handle = mGWorldHandle;
-
if(mPixels != NULL)
{
// We have pixels. Set up a GWorld pointing at the texture.
- OSErr result = NewGWorldFromPtr( &mGWorldHandle, depth_bits, &dest_rect, NULL, NULL, 0, (Ptr)mPixels, rowbytes);
+ OSErr result = QTNewGWorldFromPtr( &mGWorldHandle, depth_bits, &dest_rect, NULL, NULL, 0, (Ptr)mPixels, rowbytes);
if ( noErr != result )
{
// TODO: unrecoverable?? throw exception? return something?
@@ -297,7 +292,7 @@ private:
{
// We don't have pixels. Create a fake GWorld we can point the movie at when it's not safe to render normally.
Rect tempRect = rectFromSize(1, 1);
- OSErr result = NewGWorld( &mGWorldHandle, depth_bits, &tempRect, NULL, NULL, 0);
+ OSErr result = QTNewGWorld( &mGWorldHandle, depth_bits, &tempRect, NULL, NULL, 0);
if ( noErr != result )
{
// TODO: unrecoverable?? throw exception? return something?
@@ -305,14 +300,8 @@ private:
}
}
- SetMovieGWorld( mMovieHandle, mGWorldHandle, GetGWorldDevice( mGWorldHandle ) );
-
- // If the GWorld was already set up, delete it.
- if(old_gworld_handle != NULL)
- {
- DisposeGWorld( old_gworld_handle );
- }
-
+ SetMovieGWorld( mMovieHandle, mGWorldHandle, NULL );
+
// Set up the movie display matrix
{
// scale movie to fit rect and invert vertically to match opengl image format
@@ -579,28 +568,7 @@ private:
}
};
-
- int getDataWidth() const
- {
- if ( mGWorldHandle )
- {
- int depth = mDepth;
-
- if (depth < 1)
- depth = 1;
-
- // ALWAYS use the row bytes from the PixMap if we have a GWorld because
- // sometimes it's not the same as mMediaDepth * mMediaWidth !
- PixMapHandle pix_map_handle = GetGWorldPixMap( mGWorldHandle );
- return QTGetPixMapHandleRowBytes( pix_map_handle ) / depth;
- }
- else
- {
- // TODO : return LLMediaImplCommon::getaDataWidth();
- return 0;
- }
- };
-
+
void seek( F64 time )
{
if ( mMovieController )
diff --git a/indra/media_plugins/webkit/mac_volume_catcher.cpp b/indra/media_plugins/webkit/mac_volume_catcher.cpp
index 8a06bb8487..cc94556413 100755
--- a/indra/media_plugins/webkit/mac_volume_catcher.cpp
+++ b/indra/media_plugins/webkit/mac_volume_catcher.cpp
@@ -35,10 +35,13 @@
#include "volume_catcher.h"
-#include <Carbon/Carbon.h>
#include <QuickTime/QuickTime.h>
#include <AudioUnit/AudioUnit.h>
+#if LL_DARWIN
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+#endif
+
struct VolumeCatcherStorage;
class VolumeCatcherImpl
@@ -266,3 +269,6 @@ void VolumeCatcher::pump()
// No periodic tasks are necessary for this implementation.
}
+#if LL_DARWIN
+#pragma GCC diagnostic warning "-Wdeprecated-declarations"
+#endif