update dev300-m57
[ooovba.git] / applied_patches / 0480-gstreamer-avmedia.diff
blobdbb1d999ec5cdbf4ef9cfcfa959c3e8a87f95339
1 diff -rup avmedia-orig/prj/build.lst avmedia/prj/build.lst
2 --- avmedia-orig/prj/build.lst 2006-08-17 16:04:56.000000000 +0200
3 +++ avmedia/prj/build.lst 2006-08-17 16:05:01.000000000 +0200
4 @@ -7,4 +7,5 @@ av avmedia\source\framework nmake - all
5 av avmedia\source\java nmake - all av_java NULL
6 av avmedia\source\xine nmake - all av_xine NULL
7 av avmedia\source\quicktime nmake - all av_quicktime NULL
8 -av avmedia\util nmake - all av_util av_viewer av_framework av_win av_java av_quicktime av_xine NULL
9 +av avmedia\source\gstreamer nmake - all av_gstreamer NULL
10 +av avmedia\util nmake - all av_util av_viewer av_framework av_win av_java av_quicktime av_xine av_gstreamer NULL
11 diff -rup avmedia-orig/source/inc/mediamisc.hxx avmedia/source/inc/mediamisc.hxx
12 --- avmedia-orig/source/inc/mediamisc.hxx 2006-08-17 16:04:56.000000000 +0200
13 +++ avmedia/source/inc/mediamisc.hxx 2006-08-17 16:06:41.000000000 +0200
14 @@ -37,13 +37,17 @@ class ResMgr;
16 #define AVMEDIA_RESID( nId ) ResId( nId, * ::avmedia::GetResMgr() )
18 +#ifdef GSTREAMER
19 +#define AVMEDIA_MANAGER_SERVICE_NAME "com.sun.star.media.Manager_GStreamer"
20 +#else
21 #ifdef WNT
22 #define AVMEDIA_MANAGER_SERVICE_NAME "com.sun.star.media.Manager_DirectX"
23 #else
24 #ifdef QUARTZ
25 #define AVMEDIA_MANAGER_SERVICE_NAME "com.sun.star.comp.avmedia.Manager_QuickTime"
26 #else
27 #define AVMEDIA_MANAGER_SERVICE_NAME "com.sun.star.media.Manager_Java"
28 +#endif
29 #endif
30 #endif
32 Index: mediawindow_impl.cxx
33 ===================================================================
34 RCS file: /cvs/graphics/avmedia/source/viewer/mediawindow_impl.cxx,v
35 retrieving revision 1.7
36 diff -u -u -r1.7 mediawindow_impl.cxx
37 --- avmedia/source/viewer/mediawindow_impl.cxx 19 Jun 2006 13:59:09 -0000 1.7
38 +++ avmedia/source/viewer/mediawindow_impl.cxx 24 Aug 2006 14:17:41 -0000
39 @@ -44,6 +44,11 @@
40 #include <osl/mutex.hxx>
41 #include <tools/time.hxx>
42 #include <vcl/svapp.hxx>
43 +#ifdef UNX
44 +#ifndef _SV_SYSDATA_HXX
45 +#include <vcl/sysdata.hxx>
46 +#endif
47 +#endif
49 #ifndef _COM_SUN_STAR_AWT_SYSTEMPOINTER_HDL_
50 #include <com/sun/star/awt/SystemPointer.hdl>
51 @@ -102,7 +108,11 @@
52 // --------------------
54 MediaChildWindow::MediaChildWindow( Window* pParent ) :
55 +#ifdef GSTREAMER
56 + SystemChildWindow( pParent, WB_CLIPCHILDREN )
57 +#else
58 JavaChildWindow( pParent, WB_CLIPCHILDREN )
59 +#endif
63 @@ -119,7 +129,11 @@
64 const MouseEvent aTransformedEvent( GetParent()->ScreenToOutputPixel( OutputToScreenPixel( rMEvt.GetPosPixel() ) ),
65 rMEvt.GetClicks(), rMEvt.GetMode(), rMEvt.GetButtons(), rMEvt.GetModifier() );
67 +#ifdef GSTREAMER
68 + SystemChildWindow::MouseMove( rMEvt );
69 +#else
70 JavaChildWindow::MouseMove( rMEvt );
71 +#endif
72 GetParent()->MouseMove( aTransformedEvent );
75 @@ -130,7 +144,11 @@
76 const MouseEvent aTransformedEvent( GetParent()->ScreenToOutputPixel( OutputToScreenPixel( rMEvt.GetPosPixel() ) ),
77 rMEvt.GetClicks(), rMEvt.GetMode(), rMEvt.GetButtons(), rMEvt.GetModifier() );
79 +#ifdef GSTREAMER
80 + SystemChildWindow::MouseButtonDown( rMEvt );
81 +#else
82 JavaChildWindow::MouseButtonDown( rMEvt );
83 +#endif
84 GetParent()->MouseButtonDown( aTransformedEvent );
87 @@ -140,8 +158,12 @@
89 const MouseEvent aTransformedEvent( GetParent()->ScreenToOutputPixel( OutputToScreenPixel( rMEvt.GetPosPixel() ) ),
90 rMEvt.GetClicks(), rMEvt.GetMode(), rMEvt.GetButtons(), rMEvt.GetModifier() );
93 +#ifdef GSTREAMER
94 + SystemChildWindow::MouseButtonUp( rMEvt );
95 +#else
96 JavaChildWindow::MouseButtonUp( rMEvt );
97 +#endif
98 GetParent()->MouseButtonUp( aTransformedEvent );
101 @@ -149,7 +171,11 @@
103 void MediaChildWindow::KeyInput( const KeyEvent& rKEvt )
105 +#ifdef GSTREAMER
106 + SystemChildWindow::KeyInput( rKEvt );
107 +#else
108 JavaChildWindow::KeyInput( rKEvt );
109 +#endif
110 GetParent()->KeyInput( rKEvt );
113 @@ -157,7 +183,11 @@
115 void MediaChildWindow::KeyUp( const KeyEvent& rKEvt )
117 +#ifdef GSTREAMER
118 + SystemChildWindow::KeyUp( rKEvt );
119 +#else
120 JavaChildWindow::KeyUp( rKEvt );
121 +#endif
122 GetParent()->KeyUp( rKEvt );
125 @@ -168,7 +198,11 @@
126 const CommandEvent aTransformedEvent( GetParent()->ScreenToOutputPixel( OutputToScreenPixel( rCEvt.GetMousePosPixel() ) ),
127 rCEvt.GetCommand(), rCEvt.IsMouseEvent(), rCEvt.GetData() );
129 +#ifdef GSTREAMER
130 + SystemChildWindow::Command( rCEvt );
131 +#else
132 JavaChildWindow::Command( rCEvt );
133 +#endif
134 GetParent()->Command( aTransformedEvent );
137 @@ -237,18 +270,31 @@ void MediaWindowImpl::onURLChanged()
139 if( getPlayer().is() )
141 - uno::Sequence< uno::Any > aArgs( 2 );
142 + uno::Sequence< uno::Any > aArgs( 3 );
143 uno::Reference< media::XPlayerWindow > xPlayerWindow;
144 const Point aPoint;
145 const Size aSize( maChildWindow.GetSizePixel() );
146 +#ifndef GSTREAMER
147 const sal_IntPtr nWndHandle = static_cast< sal_IntPtr >( maChildWindow.getParentWindowHandleForJava() );
148 +#else
149 + const sal_Int32 nWndHandle = 0;
150 +#endif
152 aArgs[ 0 ] = uno::makeAny( nWndHandle );
153 aArgs[ 1 ] = uno::makeAny( awt::Rectangle( aPoint.X(), aPoint.Y(), aSize.Width(), aSize.Height() ) );
154 +#ifdef GSTREAMER
155 + const SystemEnvData *pSystemData = maChildWindow.GetSystemData();
156 + OSL_TRACE( "MediaWindowImpl::onURLChanged xwindow id: %ld", pSystemData->aWindow );
157 + aArgs[ 2 ] = uno::makeAny( pSystemData->aWindow );
158 +#endif
162 +#ifdef GSTREAMER
163 + if( pSystemData->aWindow != 0 )
164 +#else
165 if( nWndHandle != 0 )
166 +#endif
167 xPlayerWindow = getPlayer()->createPlayerWindow( aArgs );
169 catch( uno::RuntimeException )
170 Index: mediawindow_impl.hxx
171 ===================================================================
172 RCS file: /cvs/graphics/avmedia/source/viewer/mediawindow_impl.hxx,v
173 retrieving revision 1.2
174 diff -u -u -r1.2 mediawindow_impl.hxx
175 --- avmedia/source/viewer/mediawindow_impl.hxx 7 Sep 2005 19:43:57 -0000 1.2
176 +++ avmedia/source/viewer/mediawindow_impl.hxx 24 Aug 2006 14:17:41 -0000
177 @@ -37,7 +37,11 @@
178 #define _AVMEDIA_MEDIAWINDOW_IMPL_HXX
180 #include <svtools/transfer.hxx>
181 +#ifdef GSTREAMER
182 +#include <vcl/syschild.hxx>
183 +#else
184 #include <vcl/javachild.hxx>
185 +#endif
187 #include "mediawindowbase_impl.hxx"
188 #include "mediacontrol.hxx"
189 @@ -69,7 +73,11 @@
190 // - MediaChildWindow -
191 // --------------------
193 +#ifdef GSTREAMER
194 + class MediaChildWindow : public SystemChildWindow
195 +#else
196 class MediaChildWindow : public JavaChildWindow
197 +#endif
199 public: