From 640529678149704e00c029cf03da2891eb3c4fbf Mon Sep 17 00:00:00 2001 From: ka Date: Wed, 9 Jun 2010 07:07:59 +0200 Subject: avmedia101: added GStreamer backend for Unix --- slideshow/source/engine/shapes/viewmediashape.cxx | 24 +++++++++++------------ slideshow/source/engine/shapes/viewmediashape.hxx | 4 ++-- 2 files changed, 13 insertions(+), 15 deletions(-) diff --git a/slideshow/source/engine/shapes/viewmediashape.cxx b/slideshow/source/engine/shapes/viewmediashape.cxx index 1c0b6f9b71a1..ee076d7e394d 100644 --- a/slideshow/source/engine/shapes/viewmediashape.cxx +++ b/slideshow/source/engine/shapes/viewmediashape.cxx @@ -39,7 +39,7 @@ #include #include -#include +#include #include #include @@ -153,7 +153,7 @@ namespace slideshow mxPlayerWindow.clear(); } - mpMediaWindow = ::std::auto_ptr< JavaChildWindow >(); + mpMediaWindow = ::std::auto_ptr< SystemChildWindow >(); // shutdown player if( mxPlayer.is() ) @@ -431,29 +431,29 @@ namespace slideshow if( !rRangePix.isEmpty() ) { - uno::Sequence< uno::Any > aArgs( 2 ); + uno::Sequence< uno::Any > aArgs( 3 ); awt::Rectangle aAWTRect( rRangePix.getMinX(), rRangePix.getMinY(), rRangePix.getMaxX() - rRangePix.getMinX(), rRangePix.getMaxY() - rRangePix.getMinY() ); - mpMediaWindow = ::std::auto_ptr< JavaChildWindow >( new JavaChildWindow( pWindow, WB_CLIPCHILDREN ) ); + mpMediaWindow = ::std::auto_ptr< SystemChildWindow >( new + SystemChildWindow( pWindow, WB_CLIPCHILDREN ) ); mpMediaWindow->SetBackground( Color( COL_BLACK ) ); - mpMediaWindow->SetPosSizePixel( Point( aAWTRect.X, - aAWTRect.Y ), - Size( aAWTRect.Width, - aAWTRect.Height )); + mpMediaWindow->SetPosSizePixel( Point( aAWTRect.X, aAWTRect.Y ), + Size( aAWTRect.Width, aAWTRect.Height ) ); mpMediaWindow->Show(); if( mxPlayer.is() ) { aArgs[ 0 ] = uno::makeAny( - sal::static_int_cast( - mpMediaWindow->getParentWindowHandleForJava()) ); + sal::static_int_cast< sal_IntPtr >( mpMediaWindow->GetParentWindowHandle() ) ); aAWTRect.X = aAWTRect.Y = 0; aArgs[ 1 ] = uno::makeAny( aAWTRect ); + aArgs[ 2 ] = uno::makeAny( reinterpret_cast< sal_IntPtr >( mpMediaWindow.get() ) ); + mxPlayerWindow.set( mxPlayer->createPlayerWindow( aArgs ) ); if( mxPlayerWindow.is() ) @@ -515,9 +515,7 @@ namespace slideshow if( mxPlayer.is() ) { - aArgs[ 0 ] = uno::makeAny( - sal::static_int_cast( - aWNDVal) ); + aArgs[ 0 ] = uno::makeAny( sal::static_int_cast< sal_Int32 >( aWNDVal) ); aArgs[ 1 ] = uno::makeAny( aAWTRect ); mxPlayerWindow.set( mxPlayer->createPlayerWindow( aArgs ) ); diff --git a/slideshow/source/engine/shapes/viewmediashape.hxx b/slideshow/source/engine/shapes/viewmediashape.hxx index 5e2568bbd98e..8e024ae75bbe 100644 --- a/slideshow/source/engine/shapes/viewmediashape.hxx +++ b/slideshow/source/engine/shapes/viewmediashape.hxx @@ -36,7 +36,7 @@ #include "viewlayer.hxx" -class JavaChildWindow; +class SystemChildWindow; namespace com { namespace sun { namespace star { namespace drawing { class XShape; @@ -155,7 +155,7 @@ namespace slideshow const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& rDXDeviceParams ); ViewLayerSharedPtr mpViewLayer; - ::std::auto_ptr< JavaChildWindow > mpMediaWindow; + ::std::auto_ptr< SystemChildWindow > mpMediaWindow; mutable ::com::sun::star::awt::Point maWindowOffset; mutable ::basegfx::B2DRectangle maBounds; -- cgit v1.2.3