[Libreoffice-commits] .: avmedia/source

David Tardon dtardon at kemper.freedesktop.org
Wed May 11 05:05:03 PDT 2011


 avmedia/source/gstreamer/gstplayer.cxx |    9 ++++-----
 avmedia/source/gstreamer/gstplayer.hxx |    4 ++--
 2 files changed, 6 insertions(+), 7 deletions(-)

New commits:
commit 5775487357d3bfd0e308df91da2b598dfee3ce74
Author: David Tardon <dtardon at redhat.com>
Date:   Wed May 11 12:47:55 2011 +0200

    prefer C++ wrapper to avoid leak

diff --git a/avmedia/source/gstreamer/gstplayer.cxx b/avmedia/source/gstreamer/gstplayer.cxx
index 1e2d0b7..b7a6857 100644
--- a/avmedia/source/gstreamer/gstplayer.cxx
+++ b/avmedia/source/gstreamer/gstplayer.cxx
@@ -70,8 +70,7 @@ Player::Player( const uno::Reference< lang::XMultiServiceFactory >& rxMgr ) :
     mpXOverlay( NULL ),
     mnDuration( 0 ),
     mnWidth( 0 ),
-    mnHeight( 0 ),
-    maSizeCondition( osl_createCondition() )
+    mnHeight( 0 )
 {
     // Initialize GStreamer library
     int argc = 1;
@@ -234,7 +233,7 @@ GstBusSyncReply Player::processSyncMessage( GstMessage *message )
 #if OSL_DEBUG_LEVEL > 2
                     sal_Bool aSuccess =
 #endif
-                                          osl_setCondition( maSizeCondition );
+                                          maSizeCondition.set();
                     DBG( "%p set condition result: %d", this, aSuccess );
                 }
             }
@@ -245,7 +244,7 @@ GstBusSyncReply Player::processSyncMessage( GstMessage *message )
 #if OSL_DEBUG_LEVEL > 2
             sal_Bool aSuccess =
 #endif
-                                osl_setCondition( maSizeCondition );
+                                maSizeCondition.set();
             DBG( "%p set condition result: %d", this, aSuccess );
         }
     }
@@ -540,7 +539,7 @@ awt::Size SAL_CALL Player::getPreferredPlayerWindowSize(  )
 #if OSL_DEBUG_LEVEL > 2
     oslConditionResult aResult =
 #endif
-                                 osl_waitCondition( maSizeCondition, &aTimeout );
+                                 maSizeCondition.wait( &aTimeout );
 
     if( mbFakeVideo ) {
         mbFakeVideo = sal_False;
diff --git a/avmedia/source/gstreamer/gstplayer.hxx b/avmedia/source/gstreamer/gstplayer.hxx
index 02839dc..0e04d67 100644
--- a/avmedia/source/gstreamer/gstplayer.hxx
+++ b/avmedia/source/gstreamer/gstplayer.hxx
@@ -29,7 +29,7 @@
 #ifndef _PLAYER_HXX
 #define _PLAYER_HXX
 
-#include <osl/conditn.h>
+#include <osl/conditn.hxx>
 #include "gstcommon.hxx"
 
 #include "com/sun/star/media/XPlayer.hdl"
@@ -103,7 +103,7 @@ private:
     int                     mnWidth;
     int                     mnHeight;
 
-    oslCondition            maSizeCondition;
+    osl::Condition          maSizeCondition;
 };
 
 } // namespace gstreamer


More information about the Libreoffice-commits mailing list