summaryrefslogtreecommitdiff
path: root/slideshow
diff options
context:
space:
mode:
authorRadek Doulik <rodo@novell.com>2010-09-16 15:30:14 +0200
committerRadek Doulik <rodo@novell.com>2010-09-16 15:30:14 +0200
commit6bee4baf37f7758e088156f893f181a00cbcab7d (patch)
tree68a59225ffffc680446b947197f648509b0376ef /slideshow
parentba3f54db1c0751d836c5a4f876fd08d5bf6320d5 (diff)
patches/gstreamer/gstreamer-slideshow.diff: gstreamer
- use SystemChildWindow instead of JavaChildWindow when building with gstreamer
Diffstat (limited to 'slideshow')
-rw-r--r--slideshow/source/engine/shapes/viewmediashape.cxx33
-rw-r--r--slideshow/source/engine/shapes/viewmediashape.hxx5
2 files changed, 35 insertions, 3 deletions
diff --git a/slideshow/source/engine/shapes/viewmediashape.cxx b/slideshow/source/engine/shapes/viewmediashape.cxx
index 1c0b6f9b71a1..dc282a19c365 100644
--- a/slideshow/source/engine/shapes/viewmediashape.cxx
+++ b/slideshow/source/engine/shapes/viewmediashape.cxx
@@ -41,6 +41,9 @@
#include <vcl/window.hxx>
#include <vcl/javachild.hxx>
#include <vcl/salbtype.hxx>
+#ifdef GSTREAMER
+#include <vcl/sysdata.hxx>
+#endif
#include <basegfx/tools/canvastools.hxx>
#include <basegfx/numeric/ftools.hxx>
@@ -153,7 +156,11 @@ namespace slideshow
mxPlayerWindow.clear();
}
+#ifdef GSTREAMER
+ mpMediaWindow = ::std::auto_ptr< SystemChildWindow >();
+#else
mpMediaWindow = ::std::auto_ptr< JavaChildWindow >();
+#endif
// shutdown player
if( mxPlayer.is() )
@@ -304,7 +311,8 @@ namespace slideshow
aDeviceParams[ 0 ] >>= aImplName;
if( aImplName.endsWithIgnoreAsciiCaseAsciiL(
- RTL_CONSTASCII_STRINGPARAM("VCL") ))
+ RTL_CONSTASCII_STRINGPARAM("VCL") ) || aImplName.endsWithIgnoreAsciiCaseAsciiL(
+ RTL_CONSTASCII_STRINGPARAM("Cairo") ) )
{
implInitializeVCLBasedPlayerWindow( rBounds, aDeviceParams );
}
@@ -410,6 +418,7 @@ namespace slideshow
bool ViewMediaShape::implInitializeVCLBasedPlayerWindow( const ::basegfx::B2DRectangle& rBounds,
const uno::Sequence< uno::Any >& rVCLDeviceParams)
{
+ OSL_TRACE( "ViewMediaShape::implInitializeVCLBasedPlayerWindow" );
if( !mpMediaWindow.get() && !rBounds.isEmpty() )
{
try
@@ -431,28 +440,46 @@ 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() );
+#ifdef GSTREAMER
+ OSL_TRACE( "created sys child window for viewmediashape" );
+ mpMediaWindow = ::std::auto_ptr< SystemChildWindow >( new SystemChildWindow( pWindow, WB_CLIPCHILDREN ) );
+#else
mpMediaWindow = ::std::auto_ptr< JavaChildWindow >( new JavaChildWindow( pWindow, WB_CLIPCHILDREN ) );
+#endif
mpMediaWindow->SetBackground( Color( COL_BLACK ) );
mpMediaWindow->SetPosSizePixel( Point( aAWTRect.X,
aAWTRect.Y ),
Size( aAWTRect.Width,
aAWTRect.Height ));
+ mpMediaWindow->SetParentClipMode( PARENTCLIPMODE_NOCLIP );
+ mpMediaWindow->EnableEraseBackground( FALSE );
+ mpMediaWindow->EnablePaint( FALSE );
+ mpMediaWindow->SetForwardKey( TRUE );
+ mpMediaWindow->SetMouseTransparent( TRUE );
mpMediaWindow->Show();
if( mxPlayer.is() )
{
+#ifndef GSTREAMER
aArgs[ 0 ] = uno::makeAny(
sal::static_int_cast<sal_IntPtr>(
mpMediaWindow->getParentWindowHandleForJava()) );
-
+#else
+ aArgs[ 0 ] = uno::makeAny ( (sal_Int32) 0 );
+#endif
aAWTRect.X = aAWTRect.Y = 0;
aArgs[ 1 ] = uno::makeAny( aAWTRect );
+#ifdef GSTREAMER
+ const SystemEnvData *pSystemData = mpMediaWindow->GetSystemData();
+ OSL_TRACE( "xwindow id: %ld", pSystemData->aWindow );
+ aArgs[ 2 ] = uno::makeAny( pSystemData->aWindow );
+#endif
mxPlayerWindow.set( mxPlayer->createPlayerWindow( aArgs ) );
diff --git a/slideshow/source/engine/shapes/viewmediashape.hxx b/slideshow/source/engine/shapes/viewmediashape.hxx
index 5e2568bbd98e..a16fa33573a6 100644
--- a/slideshow/source/engine/shapes/viewmediashape.hxx
+++ b/slideshow/source/engine/shapes/viewmediashape.hxx
@@ -37,6 +37,7 @@
#include "viewlayer.hxx"
class JavaChildWindow;
+class SystemChildWindow;
namespace com { namespace sun { namespace star { namespace drawing {
class XShape;
@@ -155,7 +156,11 @@ namespace slideshow
const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& rDXDeviceParams );
ViewLayerSharedPtr mpViewLayer;
+#ifdef GSTREAMER
+ ::std::auto_ptr< SystemChildWindow > mpMediaWindow;
+#else
::std::auto_ptr< JavaChildWindow > mpMediaWindow;
+#endif
mutable ::com::sun::star::awt::Point maWindowOffset;
mutable ::basegfx::B2DRectangle maBounds;