Sophie

Sophie

distrib > Fedora > 13 > i386 > media > updates-src > by-pkgid > cd8ce32c919af60229fca1d7f792c60e > files > 12

openoffice.org-3.2.0-12.35.fc13.src.rpm

diff -rup avmedia-orig/prj/build.lst avmedia/prj/build.lst
--- avmedia-orig/prj/build.lst	2006-08-17 16:04:56.000000000 +0200
+++ avmedia/prj/build.lst	2006-08-17 16:05:01.000000000 +0200
@@ -8,4 +8,5 @@
 av	avmedia\source\java			nmake	-	all	av_java	            									NULL
 av	avmedia\source\xine			nmake	-	all	av_xine	            									NULL
 av	avmedia\source\quicktime	nmake	-	all	av_quicktime											NULL
-av	avmedia\util				nmake	-	all	av_util av_viewer av_framework av_win av_java av_quicktime av_xine	NULL
+av	avmedia\source\gstreamer	nmake	-	all	av_gstreamer											NULL
+av	avmedia\util				nmake	-	all	av_util av_viewer av_framework av_win av_java av_quicktime av_xine av_gstreamer	NULL
diff -rup avmedia-orig/source/inc/mediamisc.hxx avmedia/source/inc/mediamisc.hxx
--- avmedia-orig/source/inc/mediamisc.hxx	2006-08-17 16:04:56.000000000 +0200
+++ avmedia/source/inc/mediamisc.hxx	2006-08-17 16:06:41.000000000 +0200
@@ -37,6 +37,9 @@
 
 #define AVMEDIA_RESID( nId ) ResId( nId, * ::avmedia::GetResMgr() )
 
+#ifdef GSTREAMER
+#define AVMEDIA_MANAGER_SERVICE_NAME "com.sun.star.media.Manager_GStreamer"
+#else
 #ifdef WNT 
 #define AVMEDIA_MANAGER_SERVICE_NAME "com.sun.star.media.Manager_DirectX"
 #else
@@ -46,6 +49,7 @@
 #define AVMEDIA_MANAGER_SERVICE_NAME "com.sun.star.media.Manager_Java"
 #endif
 #endif
+#endif
  
 namespace avmedia
 {
Index: mediawindow_impl.cxx
===================================================================
RCS file: /cvs/graphics/avmedia/source/viewer/mediawindow_impl.cxx,v
retrieving revision 1.7
diff -u -u -r1.7 mediawindow_impl.cxx
--- avmedia/source/viewer/mediawindow_impl.cxx	19 Jun 2006 13:59:09 -0000	1.7
+++ avmedia/source/viewer/mediawindow_impl.cxx	24 Aug 2006 14:17:41 -0000
@@ -44,6 +44,11 @@
 #include <osl/mutex.hxx>
 #include <tools/time.hxx>
 #include <vcl/svapp.hxx>
+#ifdef UNX
+#ifndef _SV_SYSDATA_HXX
+#include <vcl/sysdata.hxx>
+#endif
+#endif
 
 #ifndef _COM_SUN_STAR_AWT_SYSTEMPOINTER_HDL_
 #include <com/sun/star/awt/SystemPointer.hdl>
@@ -102,7 +107,11 @@
 // --------------------
 
 MediaChildWindow::MediaChildWindow( Window* pParent ) :
+#ifdef GSTREAMER
+	SystemChildWindow( pParent, WB_CLIPCHILDREN )
+#else
 	JavaChildWindow( pParent, WB_CLIPCHILDREN )
+#endif
 {
 }
 
@@ -119,7 +128,11 @@
 	const MouseEvent aTransformedEvent( GetParent()->ScreenToOutputPixel( OutputToScreenPixel( rMEvt.GetPosPixel() ) ),
 								  		rMEvt.GetClicks(), rMEvt.GetMode(), rMEvt.GetButtons(), rMEvt.GetModifier() );
 	
+#ifdef GSTREAMER
+	SystemChildWindow::MouseMove( rMEvt );
+#else
 	JavaChildWindow::MouseMove( rMEvt );
+#endif
 	GetParent()->MouseMove( aTransformedEvent );
 }
 
@@ -130,7 +143,11 @@
 	const MouseEvent aTransformedEvent( GetParent()->ScreenToOutputPixel( OutputToScreenPixel( rMEvt.GetPosPixel() ) ),
 								  		rMEvt.GetClicks(), rMEvt.GetMode(), rMEvt.GetButtons(), rMEvt.GetModifier() );
 	
+#ifdef GSTREAMER
+	SystemChildWindow::MouseButtonDown( rMEvt );
+#else
 	JavaChildWindow::MouseButtonDown( rMEvt );
+#endif
 	GetParent()->MouseButtonDown( aTransformedEvent );
 }
 
@@ -140,8 +157,12 @@
 {
 	const MouseEvent aTransformedEvent( GetParent()->ScreenToOutputPixel( OutputToScreenPixel( rMEvt.GetPosPixel() ) ),
 								  		rMEvt.GetClicks(), rMEvt.GetMode(), rMEvt.GetButtons(), rMEvt.GetModifier() );
-	
+
+#ifdef GSTREAMER
+	SystemChildWindow::MouseButtonUp( rMEvt );
+#else
 	JavaChildWindow::MouseButtonUp( rMEvt );
+#endif
 	GetParent()->MouseButtonUp( aTransformedEvent );
 }
 
@@ -149,7 +170,11 @@
 
 void MediaChildWindow::KeyInput( const KeyEvent& rKEvt )
 {
+#ifdef GSTREAMER
+	SystemChildWindow::KeyInput( rKEvt );
+#else
 	JavaChildWindow::KeyInput( rKEvt );
+#endif
 	GetParent()->KeyInput( rKEvt );
 }
 
@@ -157,7 +182,11 @@
 
 void MediaChildWindow::KeyUp( const KeyEvent& rKEvt )
 {
+#ifdef GSTREAMER
+	SystemChildWindow::KeyUp( rKEvt );
+#else
 	JavaChildWindow::KeyUp( rKEvt );
+#endif
 	GetParent()->KeyUp( rKEvt );
 }
 
@@ -168,7 +197,11 @@
 	const CommandEvent aTransformedEvent( GetParent()->ScreenToOutputPixel( OutputToScreenPixel( rCEvt.GetMousePosPixel() ) ),
 								  		  rCEvt.GetCommand(), rCEvt.IsMouseEvent(), rCEvt.GetData() );
 	
+#ifdef GSTREAMER
+	SystemChildWindow::Command( rCEvt );
+#else
 	JavaChildWindow::Command( rCEvt );
+#endif
 	GetParent()->Command( aTransformedEvent );
 }
 
@@ -237,18 +270,31 @@
 {
     if( getPlayer().is() )
     {
-        uno::Sequence< uno::Any >              aArgs( 2 );
+        uno::Sequence< uno::Any >              aArgs( 3 );
         uno::Reference< media::XPlayerWindow > xPlayerWindow;
     	const Point                            aPoint;
 		const Size					           aSize( maChildWindow.GetSizePixel() );
+#ifndef GSTREAMER
         const sal_IntPtr                       nWndHandle = static_cast< sal_IntPtr >( maChildWindow.getParentWindowHandleForJava() );
+#else
+        const sal_IntPtr                       nWndHandle = 0;
+#endif
        
 		aArgs[ 0 ] = uno::makeAny( nWndHandle );
 		aArgs[ 1 ] = uno::makeAny( awt::Rectangle( aPoint.X(), aPoint.Y(), aSize.Width(), aSize.Height() ) );
+#ifdef GSTREAMER
+		const SystemEnvData *pSystemData = maChildWindow.GetSystemData();
+		OSL_TRACE( "MediaWindowImpl::onURLChanged xwindow id: %ld", pSystemData->aWindow );
+		aArgs[ 2 ] = uno::makeAny( pSystemData->aWindow );
+#endif
         
         try
         {
-            if( nWndHandle != 0 )
+#ifdef GSTREAMER
+			if( pSystemData->aWindow != 0 )
+#else
+			if( nWndHandle != 0 )
+#endif
                 xPlayerWindow = getPlayer()->createPlayerWindow( aArgs );
         }
         catch( uno::RuntimeException )
Index: mediawindow_impl.hxx
===================================================================
RCS file: /cvs/graphics/avmedia/source/viewer/mediawindow_impl.hxx,v
retrieving revision 1.2
diff -u -u -r1.2 mediawindow_impl.hxx
--- avmedia/source/viewer/mediawindow_impl.hxx	7 Sep 2005 19:43:57 -0000	1.2
+++ avmedia/source/viewer/mediawindow_impl.hxx	24 Aug 2006 14:17:41 -0000
@@ -37,7 +37,11 @@
 #define _AVMEDIA_MEDIAWINDOW_IMPL_HXX
 
 #include <svtools/transfer.hxx>
+#ifdef GSTREAMER
+#include <vcl/syschild.hxx>
+#else
 #include <vcl/javachild.hxx>
+#endif
 
 #include "mediawindowbase_impl.hxx"
 #include "mediacontrol.hxx"
@@ -69,7 +73,11 @@
 		// - MediaChildWindow -
 		// --------------------
 		
+#ifdef GSTREAMER
+		class MediaChildWindow : public SystemChildWindow
+#else
 		class MediaChildWindow : public JavaChildWindow
+#endif
 		{
 		public:
 		
diff -rup avmedia-orig/source/viewer/mediawindow.cxx avmedia/source/viewer/mediawindow.cxx
--- avmedia-orig/source/viewer/mediawindow.cxx	2006-09-21 12:10:28.000000000 +0200
+++ avmedia/source/viewer/mediawindow.cxx	2006-09-21 12:15:19.000000000 +0200
@@ -383,8 +383,11 @@
                                         "AU Audio", "au",
                                         "AVI", "avi",
                                         "CD Audio", "cda",
+                                        "FLAC Audio", "flac",
                                         "MIDI Audio", "mid;midi",
                                         "MPEG Audio", "mp2;mp3;mpa",
+                                        "OGG Audio/Video", "ogg",
+                                        "OGG Video", "ogv",
                                         "MPEG Video", "mpg;mpeg;mpv;mp4",
                                         "Ogg bitstream", "ogg",
                                         "Quicktime Video", "mov",
--- configure.in.orig	2006-08-17 10:43:11.000000000 +0200
+++ configure.in	2006-08-17 10:48:43.000000000 +0200
@@ -932,6 +932,7 @@
 	linux-gnu*)
 		test_gtk=yes
 		test_cairo=yes
+                build_gstreamer=yes
 		test_kde=yes
 		test_kde4=yes
 		test_cups=yes
@@ -5973,6 +5974,26 @@
 AC_SUBST(COMMONS_LOGGING_JAR)
 
 dnl ===================================================================
+dnl Check whether the GStreamer libraries are available.
+dnl ===================================================================
+
+ENABLE_GSTREAMER=""
+
+if test  "$build_gstreamer" = "yes"; then
+
+    AC_MSG_CHECKING([whether to enable the GStreamer avmedia backend])
+    if test "x$enable_gstreamer" != "xno" ; then
+        ENABLE_GSTREAMER="TRUE"
+	AC_MSG_RESULT([yes])
+	PKG_CHECK_MODULES( GSTREAMER, gstreamer-0.10 gstreamer-plugins-base-0.10 )
+    else
+	     AC_MSG_RESULT([no])
+    fi
+fi
+
+AC_SUBST(ENABLE_GSTREAMER)
+
+dnl ===================================================================
 dnl Check whether the Qt and KDE libraries are available.
 dnl ===================================================================
 
--- set_soenv.in.orig	2006-08-17 10:43:11.000000000 +0200
+++ set_soenv.in	2006-08-17 11:05:37.000000000 +0200
@@ -1748,6 +1748,7 @@
 ToFile( "SYSTEM_SERVLETAPI", "@SYSTEM_SERVLETAPI@", "e" );
 ToFile( "SERVLETAPI_JAR",    "@SERVLETAPI_JAR@",   "e" );
 ToFile( "ENABLE_DBUS",       "@ENABLE_DBUS@",      "e" );
+ToFile( "ENABLE_GSTREAMER",  "@ENABLE_GSTREAMER@", "e" );
 ToFile( "ENABLE_GCONF",      "@ENABLE_GCONF@",     "e" );
 ToFile( "ENABLE_GNOMEVFS",   "@ENABLE_GNOMEVFS@",  "e" );
 ToFile( "ENABLE_GIO",        "@ENABLE_GIO@",       "e" );
diff -rup scp2-orig/source/ooo/file_library_ooo.scp scp2/source/ooo/file_library_ooo.scp
--- scp2-orig/source/ooo/file_library_ooo.scp	2006-08-17 16:08:34.000000000 +0200
+++ scp2/source/ooo/file_library_ooo.scp	2006-08-17 16:11:26.000000000 +0200
@@ -1587,6 +1587,9 @@
 // AVMedia
 STD_UNO_LIB_FILE( gid_File_Lib_AVMedia, avmedia )
 
+#ifdef GSTREAMER
+SPECIAL_UNO_LIB_FILE_PATCH( gid_File_Lib_AVMediaGStreamer, avmediagst )
+#else
 #if defined UNX
 #ifdef SOLAR_JAVA
 UNO_JAR_FILE( gid_File_Jar_AVmedia, avmedia )
@@ -1596,6 +1599,7 @@
 SPECIAL_UNO_LIB_FILE( gid_File_Lib_AVMediaWin, avmediawin )
 #endif
 #endif
+#endif
 
 #ifndef WITHOUT_MOZILLA
 File gid_File_Lib_XSec_Framework
diff -rup scp2-orig/source/ooo/module_hidden_ooo.scp scp2/source/ooo/module_hidden_ooo.scp
--- scp2-orig/source/ooo/module_hidden_ooo.scp	2006-08-17 16:08:34.000000000 +0200
+++ scp2/source/ooo/module_hidden_ooo.scp	2006-08-17 16:08:49.000000000 +0200
@@ -238,6 +238,7 @@ Module gid_Module_Root_Files_4
 	gid_File_Lib_Svx,
 	gid_File_Lib_AVMedia,
 	gid_File_Lib_AVMediaWin,
+	gid_File_Lib_AVMediaGStreamer,
 	gid_File_Lib_BaseGfx,
 	gid_File_Lib_Sysdtrans,
 	gid_File_Lib_Sw,
diff -rup slideshow-orig/source/engine/viewmediashape.cxx slideshow/source/engine/viewmediashape.cxx
--- slideshow-orig/source/engine/shapes/viewmediashape.cxx	2006-08-17 16:15:39.000000000 +0200
+++ slideshow/source/engine/shapes/viewmediashape.cxx	2006-08-17 17:26:09.000000000 +0200
@@ -44,6 +44,7 @@
 #include <vcl/window.hxx>
 #include <vcl/javachild.hxx>
 #include <vcl/salbtype.hxx>
+#include <vcl/sysdata.hxx>
 
 #include <basegfx/tools/canvastools.hxx>
 #include <basegfx/numeric/ftools.hxx>
@@ -148,7 +149,11 @@
 				mxPlayerWindow.clear();
 			}
 
+#ifdef GSTREAMER
+            mpMediaWindow = ::std::auto_ptr< SystemChildWindow >();
+#else
             mpMediaWindow = ::std::auto_ptr< JavaChildWindow >();
+#endif
             			
 			// shutdown player
 			if( mxPlayer.is() )
@@ -282,8 +287,12 @@
 							
 							aDeviceParams[ 0 ] >>= aImplName;
 						
-							if( aImplName.endsWithIgnoreAsciiCaseAsciiL( 
-                                    RTL_CONSTASCII_STRINGPARAM("VCL") ))
+							if( 
+                                aImplName.endsWithIgnoreAsciiCaseAsciiL( 
+                                    RTL_CONSTASCII_STRINGPARAM("VCL")) ||
+                                aImplName.endsWithIgnoreAsciiCaseAsciiL( 
+                                    RTL_CONSTASCII_STRINGPARAM("Cairo"))
+                              )
                             {
 								implInitializeVCLBasedPlayerWindow( rBounds, aDeviceParams );
                             }
@@ -389,6 +398,7 @@
 		bool ViewMediaShape::implInitializeVCLBasedPlayerWindow( const ::basegfx::B2DRectangle&   rBounds,
 																 const uno::Sequence< uno::Any >& rVCLDeviceParams)
 		{
+                    OSL_TRACE( "ViewMediaShape::implInitializeVCLBasedPlayerWindow" );
 			if( !mpMediaWindow.get() && !rBounds.isEmpty() )
 			{
 				try
@@ -410,28 +420,50 @@
 																	
 						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_IntPtr) 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 -rup slideshow/source/inc-orig/viewmediashape.hxx slideshow/source/inc/viewmediashape.hxx
--- slideshow/source/engine/shapes/viewmediashape.hxx	2006-08-18 13:45:47.000000000 +0200
+++ slideshow/source/engine/shapes/viewmediashape.hxx	2006-08-18 13:48:13.000000000 +0200
@@ -45,6 +45,7 @@
 #include "viewlayer.hxx"
 
 class JavaChildWindow;
+class SystemChildWindow;
 
 namespace com { namespace sun { namespace star { namespace drawing {
     class XShape;
@@ -149,7 +150,11 @@
 													const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& rDXDeviceParams );
 			
 			ViewLayerSharedPtr					  mpViewLayer;
-			::std::auto_ptr< JavaChildWindow >    mpMediaWindow;
+#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;
         
diff -rup solenv-orig/inc/settings.mk solenv/inc/settings.mk
--- solenv-orig/inc/settings.mk	2006-08-17 16:01:59.000000000 +0200
+++ solenv/inc/settings.mk	2006-08-17 16:02:36.000000000 +0200
@@ -1147,6 +1147,10 @@
 LOCAL_EXCEPTIONS_FLAGS+=$(CFLAGSEXCEPTIONS)
 LOCAL_EXCEPTIONS_FLAGS+=-DEXCEPTIONS_ON
 
+.IF "$(ENABLE_GSTREAMER)" == "TRUE"
+CDEFS+=-DGSTREAMER
+.ENDIF
+
 .IF "$(ENABLE_LAYOUT)" == "TRUE"
 CDEFS+=-DENABLE_LAYOUT=1
 .ELSE # ENABLE_LAYOUT != TRUE
diff -rup svtools-orig/inc/inettype.hxx svtools/inc/inettype.hxx
--- svtools-orig/inc/svtools/inettype.hxx	2006-09-21 11:40:23.000000000 +0200
+++ svtools/inc/svtools/inettype.hxx	2006-09-21 11:44:50.000000000 +0200
@@ -105,6 +105,7 @@
 #define CONTENT_TYPE_STR_AUDIO_AIFF "audio/aiff"
 #define CONTENT_TYPE_STR_AUDIO_BASIC "audio/basic"
 #define CONTENT_TYPE_STR_AUDIO_MIDI "audio/midi"
+#define CONTENT_TYPE_STR_AUDIO_VORBIS "audio/vorbis"
 #define CONTENT_TYPE_STR_AUDIO_WAV "audio/wav"
 #define CONTENT_TYPE_STR_X_CNT_DOCUMENT ".chaos/document"
 #define CONTENT_TYPE_STR_X_CNT_FSYSBOX ".chaos/fsys-box"
@@ -170,6 +171,7 @@
 #define CONTENT_TYPE_STR_TEXT_URL "text/x-url"
 #define CONTENT_TYPE_STR_TEXT_VCALENDAR "text/x-vCalendar"
 #define CONTENT_TYPE_STR_TEXT_VCARD "text/x-vCard"
+#define CONTENT_TYPE_STR_VIDEO_THEORA "video/theora"
 #define CONTENT_TYPE_STR_VIDEO_VDO "video/vdo"
 #define CONTENT_TYPE_STR_VIDEO_MSVIDEO "video/x-msvideo"
 #define CONTENT_TYPE_STR_X_STARMAIL "x-starmail"
@@ -243,6 +245,7 @@ enum INetContentType
 	CONTENT_TYPE_AUDIO_AIFF,
 	CONTENT_TYPE_AUDIO_BASIC,
 	CONTENT_TYPE_AUDIO_MIDI,
+	CONTENT_TYPE_AUDIO_VORBIS,
 	CONTENT_TYPE_AUDIO_WAV,
 	CONTENT_TYPE_IMAGE_GIF,
 	CONTENT_TYPE_IMAGE_JPEG,
@@ -254,6 +257,7 @@ enum INetContentType
 	CONTENT_TYPE_TEXT_PLAIN,
 	CONTENT_TYPE_TEXT_URL,
 	CONTENT_TYPE_TEXT_VCARD,
+	CONTENT_TYPE_VIDEO_THEORA,
 	CONTENT_TYPE_VIDEO_VDO,
 	CONTENT_TYPE_VIDEO_MSVIDEO,
 	CONTENT_TYPE_X_CNT_MESSAGE,
diff -rup svtools-orig/inc/svtools.hrc svtools/inc/svtools.hrc
--- svtools-orig/inc/svtools/svtools.hrc	2006-09-21 11:40:25.000000000 +0200
+++ svtools/inc/svtools/svtools.hrc	2006-09-21 12:00:00.000000000 +0200
@@ -151,110 +151,112 @@
 #define STR_SVT_MIMETYPE_APP_ZIP			(STR_SVT_MIMETYPE_START+10)
 #define STR_SVT_MIMETYPE_AUDIO_AIFF 		(STR_SVT_MIMETYPE_START+11)
 #define STR_SVT_MIMETYPE_AUDIO_BASIC		(STR_SVT_MIMETYPE_START+12)
-#define STR_SVT_MIMETYPE_AUDIO_MIDI 		(STR_SVT_MIMETYPE_START+13)
-#define STR_SVT_MIMETYPE_AUDIO_WAV			(STR_SVT_MIMETYPE_START+14)
-#define STR_SVT_MIMETYPE_IMAGE_GIF			(STR_SVT_MIMETYPE_START+15)
-#define STR_SVT_MIMETYPE_IMAGE_JPEG 		(STR_SVT_MIMETYPE_START+16)
-#define STR_SVT_MIMETYPE_IMAGE_PCX			(STR_SVT_MIMETYPE_START+17)
-#define STR_SVT_MIMETYPE_IMAGE_BMP			(STR_SVT_MIMETYPE_START+18)
-#define STR_SVT_MIMETYPE_TEXT_HTML			(STR_SVT_MIMETYPE_START+19)
-#define STR_SVT_MIMETYPE_TEXT_PLAIN 		(STR_SVT_MIMETYPE_START+20)
-#define STR_SVT_MIMETYPE_TEXT_URL			(STR_SVT_MIMETYPE_START+21)
-#define STR_SVT_MIMETYPE_TEXT_VCARD 		(STR_SVT_MIMETYPE_START+22)
-#define STR_SVT_MIMETYPE_VIDEO_VDO			(STR_SVT_MIMETYPE_START+23)
-#define STR_SVT_MIMETYPE_VIDEO_MSVIDEO		(STR_SVT_MIMETYPE_START+24)
-#define STR_SVT_MIMETYPE_X_STARMAIL 		(STR_SVT_MIMETYPE_START+25)
-#define STR_SVT_MIMETYPE_X_VRML 			(STR_SVT_MIMETYPE_START+26)
-#define STR_SVT_MIMETYPE_APP_STARHELP		(STR_SVT_MIMETYPE_START+27)
-#define STR_SVT_MIMETYPE_APP_STARIMPRESS	(STR_SVT_MIMETYPE_START+28)
-#define STR_SVT_MIMETYPE_APP_SCHED_CMB		(STR_SVT_MIMETYPE_START+29)
-#define STR_SVT_MIMETYPE_APP_SCHED_EVT		(STR_SVT_MIMETYPE_START+30)
-#define STR_SVT_MIMETYPE_APP_SCHED_TASK 	(STR_SVT_MIMETYPE_START+31)
-#define STR_SVT_MIMETYPE_APP_SCHED_TVIEW	(STR_SVT_MIMETYPE_START+32)
-
-#define STR_SVT_MIMETYPE_CNT_MSG			(STR_SVT_MIMETYPE_START+33)
-#define STR_SVT_MIMETYPE_CNT_DOCUMENT		(STR_SVT_MIMETYPE_START+34)
-#define STR_SVT_MIMETYPE_CNT_POP3BOX		(STR_SVT_MIMETYPE_START+35)
-#define STR_SVT_MIMETYPE_CNT_IMAPBOX		(STR_SVT_MIMETYPE_START+36)
-#define STR_SVT_MIMETYPE_CNT_IMAPFLD		(STR_SVT_MIMETYPE_START+37)
-#define STR_SVT_MIMETYPE_CNT_VIMBOX 		(STR_SVT_MIMETYPE_START+38)
-#define STR_SVT_MIMETYPE_CNT_VIMINBOX		(STR_SVT_MIMETYPE_START+39)
-#define STR_SVT_MIMETYPE_CNT_BBBOX			(STR_SVT_MIMETYPE_START+40)
-#define STR_SVT_MIMETYPE_CNT_VIM_BB 		(STR_SVT_MIMETYPE_START+41)
-#define STR_SVT_MIMETYPE_CNT_NEWSBOX		(STR_SVT_MIMETYPE_START+42)
-#define STR_SVT_MIMETYPE_CNT_NEWSGRP		(STR_SVT_MIMETYPE_START+43)
-#define STR_SVT_MIMETYPE_CNT_OUTBOX 		(STR_SVT_MIMETYPE_START+44)
-#define STR_SVT_MIMETYPE_CNT_FTPBOX 		(STR_SVT_MIMETYPE_START+45)
-#define STR_SVT_MIMETYPE_CNT_FTPFLD 		(STR_SVT_MIMETYPE_START+46)
-#define STR_SVT_MIMETYPE_CNT_FTPFILE		(STR_SVT_MIMETYPE_START+47)
-#define STR_SVT_MIMETYPE_CNT_FTPLINK		(STR_SVT_MIMETYPE_START+48)
-#define STR_SVT_MIMETYPE_CNT_HTTPBOX		(STR_SVT_MIMETYPE_START+49)
-#define STR_SVT_MIMETYPE_CNT_FSYSBOX		(STR_SVT_MIMETYPE_START+50)
-#define STR_SVT_MIMETYPE_CNT_FSYSFLD		(STR_SVT_MIMETYPE_START+51)
-#define STR_SVT_MIMETYPE_CNT_FSYSFILE		(STR_SVT_MIMETYPE_START+52)
-#define STR_SVT_MIMETYPE_CNT_FSYSURLFILE	(STR_SVT_MIMETYPE_START+53)
-#define STR_SVT_MIMETYPE_CNT_PUBLBOX		(STR_SVT_MIMETYPE_START+54)
-#define STR_SVT_MIMETYPE_CNT_SRCHBOX		(STR_SVT_MIMETYPE_START+55)
-#define STR_SVT_MIMETYPE_CNT_SUBSCRBOX		(STR_SVT_MIMETYPE_START+56)
-#define STR_SVT_MIMETYPE_CNT_BOOKMARK		(STR_SVT_MIMETYPE_START+57)
-#define STR_SVT_MIMETYPE_CNT_CDF			(STR_SVT_MIMETYPE_START+58)
-#define STR_SVT_MIMETYPE_CNT_CDFSUB 		(STR_SVT_MIMETYPE_START+59)
-#define STR_SVT_MIMETYPE_CNT_CDFITEM		(STR_SVT_MIMETYPE_START+60)
-#define STR_SVT_MIMETYPE_CNT_STARCHANNEL	(STR_SVT_MIMETYPE_START+61)
-#define STR_SVT_MIMETYPE_CNT_TRASHBOX		(STR_SVT_MIMETYPE_START+62)
-#define STR_SVT_MIMETYPE_CNT_TRASH			(STR_SVT_MIMETYPE_START+63)
-#define STR_SVT_MIMETYPE_CNT_REMOV_VOL		(STR_SVT_MIMETYPE_START+64)
-#define STR_SVT_MIMETYPE_CNT_FIX_VOL		(STR_SVT_MIMETYPE_START+65)
-#define STR_SVT_MIMETYPE_CNT_REM_VOL		(STR_SVT_MIMETYPE_START+66)
-#define STR_SVT_MIMETYPE_CNT_RAM_VOL		(STR_SVT_MIMETYPE_START+67)
-#define STR_SVT_MIMETYPE_CNT_CDROM			(STR_SVT_MIMETYPE_START+68)
-#define STR_SVT_MIMETYPE_CNT_DISK_35		(STR_SVT_MIMETYPE_START+69)
-#define STR_SVT_MIMETYPE_CNT_DISK_525		(STR_SVT_MIMETYPE_START+70)
-#define STR_SVT_MIMETYPE_CNT_TAPEDRIVE		(STR_SVT_MIMETYPE_START+71)
-#define STR_SVT_MIMETYPE_APP_GAL			(STR_SVT_MIMETYPE_START+72)
-#define STR_SVT_MIMETYPE_APP_GAL_THEME		(STR_SVT_MIMETYPE_START+73)
-#define STR_SVT_MIMETYPE_CNT_SEPARATOR		(STR_SVT_MIMETYPE_START+74)
-#define STR_SVT_MIMETYPE_APP_STARW_GLOB 	(STR_SVT_MIMETYPE_START+75)
-#define STR_SVT_MIMETYPE_APP_SDM			(STR_SVT_MIMETYPE_START+76)
-#define STR_SVT_MIMETYPE_APP_SMD			(STR_SVT_MIMETYPE_START+77)
-#define STR_SVT_MIMETYPE_APP_STARW_WEB		(STR_SVT_MIMETYPE_START+78)
-#define STR_SVT_MIMETYPE_SCHEDULE			(STR_SVT_MIMETYPE_START+79)
-#define STR_SVT_MIMETYPE_SCHEDULE_EVT		(STR_SVT_MIMETYPE_START+80)
-#define STR_SVT_MIMETYPE_SCHEDULE_TASK		(STR_SVT_MIMETYPE_START+81)
-#define STR_SVT_MIMETYPE_SCHEDULE_FEVT		(STR_SVT_MIMETYPE_START+82)
-#define STR_SVT_MIMETYPE_SCHEDULE_FTASK 	(STR_SVT_MIMETYPE_START+83)
-#define STR_SVT_MIMETYPE_FRAMESET			(STR_SVT_MIMETYPE_START+84)
-#define STR_SVT_MIMETYPE_MACRO				(STR_SVT_MIMETYPE_START+85)
-#define STR_SVT_MIMETYPE_CNT_SFSYSFOLDER	(STR_SVT_MIMETYPE_START+86)
-#define STR_SVT_MIMETYPE_CNT_SFSYSFILE		(STR_SVT_MIMETYPE_START+87)
-#define STR_SVT_MIMETYPE_APP_TEMPLATE		(STR_SVT_MIMETYPE_START+88)
-#define STR_SVT_MIMETYPE_IMAGE_GENERIC		(STR_SVT_MIMETYPE_START+89)
-#define STR_SVT_MIMETYPE_APP_MSEXCEL		(STR_SVT_MIMETYPE_START+90)
-#define STR_SVT_MIMETYPE_APP_MSEXCEL_TEMPL	(STR_SVT_MIMETYPE_START+91)
-#define STR_SVT_MIMETYPE_APP_MSPPOINT		(STR_SVT_MIMETYPE_START+92)
-#define STR_SVT_MIMETYPE_TEXT_VCALENDAR 	(STR_SVT_MIMETYPE_START+93)
-#define STR_SVT_MIMETYPE_TEXT_ICALENDAR 	(STR_SVT_MIMETYPE_START+94)
-#define STR_SVT_MIMETYPE_TEXT_XMLICALENDAR 	(STR_SVT_MIMETYPE_START+95)
-#define STR_SVT_MIMETYPE_TEXT_CDE_CALENDAR_APP 	(STR_SVT_MIMETYPE_START+96)
-#define STR_SVT_MIMETYPE_INET_MSG_RFC822 		(STR_SVT_MIMETYPE_START+97)
-#define STR_SVT_MIMETYPE_INET_MULTI_ALTERNATIVE	(STR_SVT_MIMETYPE_START+98)
-#define STR_SVT_MIMETYPE_INET_MULTI_DIGEST 		(STR_SVT_MIMETYPE_START+99)
-#define STR_SVT_MIMETYPE_INET_MULTI_PARALLEL 	(STR_SVT_MIMETYPE_START+100)
-#define STR_SVT_MIMETYPE_INET_MULTI_RELATED		(STR_SVT_MIMETYPE_START+101)
-#define STR_SVT_MIMETYPE_INET_MULTI_MIXED 		(STR_SVT_MIMETYPE_START+102)
-#define STR_SVT_MIMETYPE_APP_IMPRESSPACKED		(STR_SVT_MIMETYPE_START+103)
-#define STR_SVT_MIMETYPE_APP_JAR				(STR_SVT_MIMETYPE_START+104)
-#define STR_SVT_MIMETYPE_IMAGE_PNG				(STR_SVT_MIMETYPE_START+105)
-#define STR_SVT_MIMETYPE_IMAGE_TIFF 			(STR_SVT_MIMETYPE_START+106)
-
-#define STR_SVT_MIMETYPE_APP_SXCALC			(STR_SVT_MIMETYPE_START+107)
-#define STR_SVT_MIMETYPE_APP_SXCHART		(STR_SVT_MIMETYPE_START+108)
-#define STR_SVT_MIMETYPE_APP_SXDRAW			(STR_SVT_MIMETYPE_START+109)
-#define STR_SVT_MIMETYPE_APP_SXMATH			(STR_SVT_MIMETYPE_START+110)
-#define STR_SVT_MIMETYPE_APP_SXWRITER		(STR_SVT_MIMETYPE_START+111)
-#define STR_SVT_MIMETYPE_APP_SXIMPRESS		(STR_SVT_MIMETYPE_START+112)
-#define STR_SVT_MIMETYPE_APP_SXGLOBAL		(STR_SVT_MIMETYPE_START+113)
-#define STR_SVT_MIMETYPE_APP_SXIPACKED		(STR_SVT_MIMETYPE_START+114)
+#define STR_SVT_MIMETYPE_AUDIO_VORBIS 		(STR_SVT_MIMETYPE_START+13)
+#define STR_SVT_MIMETYPE_AUDIO_MIDI 		(STR_SVT_MIMETYPE_START+14)
+#define STR_SVT_MIMETYPE_AUDIO_WAV			(STR_SVT_MIMETYPE_START+15)
+#define STR_SVT_MIMETYPE_IMAGE_GIF			(STR_SVT_MIMETYPE_START+16)
+#define STR_SVT_MIMETYPE_IMAGE_JPEG 		(STR_SVT_MIMETYPE_START+17)
+#define STR_SVT_MIMETYPE_IMAGE_PCX			(STR_SVT_MIMETYPE_START+18)
+#define STR_SVT_MIMETYPE_IMAGE_BMP			(STR_SVT_MIMETYPE_START+19)
+#define STR_SVT_MIMETYPE_TEXT_HTML			(STR_SVT_MIMETYPE_START+20)
+#define STR_SVT_MIMETYPE_TEXT_PLAIN 		(STR_SVT_MIMETYPE_START+21)
+#define STR_SVT_MIMETYPE_TEXT_URL			(STR_SVT_MIMETYPE_START+22)
+#define STR_SVT_MIMETYPE_TEXT_VCARD 		(STR_SVT_MIMETYPE_START+23)
+#define STR_SVT_MIMETYPE_VIDEO_THEORA			(STR_SVT_MIMETYPE_START+24)
+#define STR_SVT_MIMETYPE_VIDEO_VDO			(STR_SVT_MIMETYPE_START+25)
+#define STR_SVT_MIMETYPE_VIDEO_MSVIDEO		(STR_SVT_MIMETYPE_START+26)
+#define STR_SVT_MIMETYPE_X_STARMAIL 		(STR_SVT_MIMETYPE_START+27)
+#define STR_SVT_MIMETYPE_X_VRML 			(STR_SVT_MIMETYPE_START+28)
+#define STR_SVT_MIMETYPE_APP_STARHELP		(STR_SVT_MIMETYPE_START+29)
+#define STR_SVT_MIMETYPE_APP_STARIMPRESS	(STR_SVT_MIMETYPE_START+30)
+#define STR_SVT_MIMETYPE_APP_SCHED_CMB		(STR_SVT_MIMETYPE_START+31)
+#define STR_SVT_MIMETYPE_APP_SCHED_EVT		(STR_SVT_MIMETYPE_START+32)
+#define STR_SVT_MIMETYPE_APP_SCHED_TASK 	(STR_SVT_MIMETYPE_START+33)
+#define STR_SVT_MIMETYPE_APP_SCHED_TVIEW	(STR_SVT_MIMETYPE_START+34)
+
+#define STR_SVT_MIMETYPE_CNT_MSG			(STR_SVT_MIMETYPE_START+35)
+#define STR_SVT_MIMETYPE_CNT_DOCUMENT		(STR_SVT_MIMETYPE_START+36)
+#define STR_SVT_MIMETYPE_CNT_POP3BOX		(STR_SVT_MIMETYPE_START+37)
+#define STR_SVT_MIMETYPE_CNT_IMAPBOX		(STR_SVT_MIMETYPE_START+38)
+#define STR_SVT_MIMETYPE_CNT_IMAPFLD		(STR_SVT_MIMETYPE_START+39)
+#define STR_SVT_MIMETYPE_CNT_VIMBOX 		(STR_SVT_MIMETYPE_START+40)
+#define STR_SVT_MIMETYPE_CNT_VIMINBOX		(STR_SVT_MIMETYPE_START+41)
+#define STR_SVT_MIMETYPE_CNT_BBBOX			(STR_SVT_MIMETYPE_START+42)
+#define STR_SVT_MIMETYPE_CNT_VIM_BB 		(STR_SVT_MIMETYPE_START+43)
+#define STR_SVT_MIMETYPE_CNT_NEWSBOX		(STR_SVT_MIMETYPE_START+44)
+#define STR_SVT_MIMETYPE_CNT_NEWSGRP		(STR_SVT_MIMETYPE_START+45)
+#define STR_SVT_MIMETYPE_CNT_OUTBOX 		(STR_SVT_MIMETYPE_START+46)
+#define STR_SVT_MIMETYPE_CNT_FTPBOX 		(STR_SVT_MIMETYPE_START+47)
+#define STR_SVT_MIMETYPE_CNT_FTPFLD 		(STR_SVT_MIMETYPE_START+48)
+#define STR_SVT_MIMETYPE_CNT_FTPFILE		(STR_SVT_MIMETYPE_START+49)
+#define STR_SVT_MIMETYPE_CNT_FTPLINK		(STR_SVT_MIMETYPE_START+50)
+#define STR_SVT_MIMETYPE_CNT_HTTPBOX		(STR_SVT_MIMETYPE_START+51)
+#define STR_SVT_MIMETYPE_CNT_FSYSBOX		(STR_SVT_MIMETYPE_START+52)
+#define STR_SVT_MIMETYPE_CNT_FSYSFLD		(STR_SVT_MIMETYPE_START+53)
+#define STR_SVT_MIMETYPE_CNT_FSYSFILE		(STR_SVT_MIMETYPE_START+54)
+#define STR_SVT_MIMETYPE_CNT_FSYSURLFILE	(STR_SVT_MIMETYPE_START+55)
+#define STR_SVT_MIMETYPE_CNT_PUBLBOX		(STR_SVT_MIMETYPE_START+56)
+#define STR_SVT_MIMETYPE_CNT_SRCHBOX		(STR_SVT_MIMETYPE_START+57)
+#define STR_SVT_MIMETYPE_CNT_SUBSCRBOX		(STR_SVT_MIMETYPE_START+58)
+#define STR_SVT_MIMETYPE_CNT_BOOKMARK		(STR_SVT_MIMETYPE_START+59)
+#define STR_SVT_MIMETYPE_CNT_CDF			(STR_SVT_MIMETYPE_START+60)
+#define STR_SVT_MIMETYPE_CNT_CDFSUB 		(STR_SVT_MIMETYPE_START+61)
+#define STR_SVT_MIMETYPE_CNT_CDFITEM		(STR_SVT_MIMETYPE_START+62)
+#define STR_SVT_MIMETYPE_CNT_STARCHANNEL	(STR_SVT_MIMETYPE_START+63)
+#define STR_SVT_MIMETYPE_CNT_TRASHBOX		(STR_SVT_MIMETYPE_START+64)
+#define STR_SVT_MIMETYPE_CNT_TRASH			(STR_SVT_MIMETYPE_START+65)
+#define STR_SVT_MIMETYPE_CNT_REMOV_VOL		(STR_SVT_MIMETYPE_START+66)
+#define STR_SVT_MIMETYPE_CNT_FIX_VOL		(STR_SVT_MIMETYPE_START+67)
+#define STR_SVT_MIMETYPE_CNT_REM_VOL		(STR_SVT_MIMETYPE_START+68)
+#define STR_SVT_MIMETYPE_CNT_RAM_VOL		(STR_SVT_MIMETYPE_START+69)
+#define STR_SVT_MIMETYPE_CNT_CDROM			(STR_SVT_MIMETYPE_START+70)
+#define STR_SVT_MIMETYPE_CNT_DISK_35		(STR_SVT_MIMETYPE_START+71)
+#define STR_SVT_MIMETYPE_CNT_DISK_525		(STR_SVT_MIMETYPE_START+72)
+#define STR_SVT_MIMETYPE_CNT_TAPEDRIVE		(STR_SVT_MIMETYPE_START+73)
+#define STR_SVT_MIMETYPE_APP_GAL			(STR_SVT_MIMETYPE_START+74)
+#define STR_SVT_MIMETYPE_APP_GAL_THEME		(STR_SVT_MIMETYPE_START+75)
+#define STR_SVT_MIMETYPE_CNT_SEPARATOR		(STR_SVT_MIMETYPE_START+76)
+#define STR_SVT_MIMETYPE_APP_STARW_GLOB 	(STR_SVT_MIMETYPE_START+77)
+#define STR_SVT_MIMETYPE_APP_SDM			(STR_SVT_MIMETYPE_START+78)
+#define STR_SVT_MIMETYPE_APP_SMD			(STR_SVT_MIMETYPE_START+79)
+#define STR_SVT_MIMETYPE_APP_STARW_WEB		(STR_SVT_MIMETYPE_START+80)
+#define STR_SVT_MIMETYPE_SCHEDULE			(STR_SVT_MIMETYPE_START+81)
+#define STR_SVT_MIMETYPE_SCHEDULE_EVT		(STR_SVT_MIMETYPE_START+82)
+#define STR_SVT_MIMETYPE_SCHEDULE_TASK		(STR_SVT_MIMETYPE_START+83)
+#define STR_SVT_MIMETYPE_SCHEDULE_FEVT		(STR_SVT_MIMETYPE_START+84)
+#define STR_SVT_MIMETYPE_SCHEDULE_FTASK 	(STR_SVT_MIMETYPE_START+85)
+#define STR_SVT_MIMETYPE_FRAMESET			(STR_SVT_MIMETYPE_START+86)
+#define STR_SVT_MIMETYPE_MACRO				(STR_SVT_MIMETYPE_START+87)
+#define STR_SVT_MIMETYPE_CNT_SFSYSFOLDER	(STR_SVT_MIMETYPE_START+88)
+#define STR_SVT_MIMETYPE_CNT_SFSYSFILE		(STR_SVT_MIMETYPE_START+89)
+#define STR_SVT_MIMETYPE_APP_TEMPLATE		(STR_SVT_MIMETYPE_START+90)
+#define STR_SVT_MIMETYPE_IMAGE_GENERIC		(STR_SVT_MIMETYPE_START+91)
+#define STR_SVT_MIMETYPE_APP_MSEXCEL		(STR_SVT_MIMETYPE_START+92)
+#define STR_SVT_MIMETYPE_APP_MSEXCEL_TEMPL	(STR_SVT_MIMETYPE_START+93)
+#define STR_SVT_MIMETYPE_APP_MSPPOINT		(STR_SVT_MIMETYPE_START+94)
+#define STR_SVT_MIMETYPE_TEXT_VCALENDAR 	(STR_SVT_MIMETYPE_START+95)
+#define STR_SVT_MIMETYPE_TEXT_ICALENDAR 	(STR_SVT_MIMETYPE_START+96)
+#define STR_SVT_MIMETYPE_TEXT_XMLICALENDAR 	(STR_SVT_MIMETYPE_START+97)
+#define STR_SVT_MIMETYPE_TEXT_CDE_CALENDAR_APP 	(STR_SVT_MIMETYPE_START+98)
+#define STR_SVT_MIMETYPE_INET_MSG_RFC822 		(STR_SVT_MIMETYPE_START+99)
+#define STR_SVT_MIMETYPE_INET_MULTI_ALTERNATIVE	(STR_SVT_MIMETYPE_START+100)
+#define STR_SVT_MIMETYPE_INET_MULTI_DIGEST 		(STR_SVT_MIMETYPE_START+101)
+#define STR_SVT_MIMETYPE_INET_MULTI_PARALLEL 	(STR_SVT_MIMETYPE_START+102)
+#define STR_SVT_MIMETYPE_INET_MULTI_RELATED		(STR_SVT_MIMETYPE_START+103)
+#define STR_SVT_MIMETYPE_INET_MULTI_MIXED 		(STR_SVT_MIMETYPE_START+104)
+#define STR_SVT_MIMETYPE_APP_IMPRESSPACKED		(STR_SVT_MIMETYPE_START+105)
+#define STR_SVT_MIMETYPE_APP_JAR				(STR_SVT_MIMETYPE_START+106)
+#define STR_SVT_MIMETYPE_IMAGE_PNG				(STR_SVT_MIMETYPE_START+107)
+#define STR_SVT_MIMETYPE_IMAGE_TIFF 			(STR_SVT_MIMETYPE_START+108)
+
+#define STR_SVT_MIMETYPE_APP_SXCALC			(STR_SVT_MIMETYPE_START+109)
+#define STR_SVT_MIMETYPE_APP_SXCHART		(STR_SVT_MIMETYPE_START+110)
+#define STR_SVT_MIMETYPE_APP_SXDRAW			(STR_SVT_MIMETYPE_START+111)
+#define STR_SVT_MIMETYPE_APP_SXMATH			(STR_SVT_MIMETYPE_START+112)
+#define STR_SVT_MIMETYPE_APP_SXWRITER		(STR_SVT_MIMETYPE_START+113)
+#define STR_SVT_MIMETYPE_APP_SXIMPRESS		(STR_SVT_MIMETYPE_START+114)
+#define STR_SVT_MIMETYPE_APP_SXGLOBAL		(STR_SVT_MIMETYPE_START+115)
+#define STR_SVT_MIMETYPE_APP_SXIPACKED		(STR_SVT_MIMETYPE_START+116)
 #define STR_SVT_MIMETYPE_END				(STR_SVT_MIMETYPE_APP_SXIPACKED)
 
 #define STR_SVT_PRNDLG_START				(STR_SVT_MIMETYPE_END+1)
diff -rup svtools-orig/source/misc1/inettype.cxx svtools/source/misc1/inettype.cxx
--- svtools-orig/source/misc1/inettype.cxx	2006-09-21 11:40:26.000000000 +0200
+++ svtools/source/misc1/inettype.cxx	2006-09-21 11:48:11.000000000 +0200
@@ -315,6 +315,7 @@ MediaTypeEntry const aStaticTypeNameMap[
 		{ CONTENT_TYPE_STR_AUDIO_AIFF, CONTENT_TYPE_AUDIO_AIFF, "aif" },
 		{ CONTENT_TYPE_STR_AUDIO_BASIC, CONTENT_TYPE_AUDIO_BASIC, "au" },
 		{ CONTENT_TYPE_STR_AUDIO_MIDI, CONTENT_TYPE_AUDIO_MIDI, "mid" },
+		{ CONTENT_TYPE_STR_AUDIO_VORBIS, CONTENT_TYPE_AUDIO_VORBIS, "ogg" },
 		{ CONTENT_TYPE_STR_AUDIO_WAV, CONTENT_TYPE_AUDIO_WAV, "wav" },
 		{ CONTENT_TYPE_STR_IMAGE_GENERIC, CONTENT_TYPE_IMAGE_GENERIC, "tmp" },
 		{ CONTENT_TYPE_STR_IMAGE_GIF, CONTENT_TYPE_IMAGE_GIF, "gif" },
@@ -345,6 +346,7 @@ MediaTypeEntry const aStaticTypeNameMap[
 		{ CONTENT_TYPE_STR_TEXT_VCALENDAR, CONTENT_TYPE_TEXT_VCALENDAR,
 		  "vcs" },
 		{ CONTENT_TYPE_STR_TEXT_VCARD, CONTENT_TYPE_TEXT_VCARD, "vcf" },
+		{ CONTENT_TYPE_STR_VIDEO_THEORA, CONTENT_TYPE_VIDEO_THEORA, "ogg" },
 		{ CONTENT_TYPE_STR_VIDEO_VDO, CONTENT_TYPE_VIDEO_VDO, "vdo" },
 		{ CONTENT_TYPE_STR_VIDEO_MSVIDEO, CONTENT_TYPE_VIDEO_MSVIDEO, "avi" },
 		{ CONTENT_TYPE_STR_X_STARMAIL, CONTENT_TYPE_X_STARMAIL, "smd" },
@@ -373,6 +375,7 @@ USHORT const aStaticResourceIDMap[CONTEN
 		STR_SVT_MIMETYPE_AUDIO_AIFF, // CONTENT_TYPE_AUDIO_AIFF
 		STR_SVT_MIMETYPE_AUDIO_BASIC, // CONTENT_TYPE_AUDIO_BASIC
 		STR_SVT_MIMETYPE_AUDIO_MIDI, // CONTENT_TYPE_AUDIO_MIDI
+		STR_SVT_MIMETYPE_AUDIO_VORBIS, // CONTENT_TYPE_AUDIO_VORBIS
 		STR_SVT_MIMETYPE_AUDIO_WAV, // CONTENT_TYPE_AUDIO_WAV
 		STR_SVT_MIMETYPE_IMAGE_GIF, // CONTENT_TYPE_IMAGE_GIF
 		STR_SVT_MIMETYPE_IMAGE_JPEG, // CONTENT_TYPE_IMAGE_JPEG
@@ -384,6 +387,7 @@ USHORT const aStaticResourceIDMap[CONTEN
 		STR_SVT_MIMETYPE_TEXT_PLAIN, // CONTENT_TYPE_TEXT_PLAIN
 		STR_SVT_MIMETYPE_TEXT_URL, // CONTENT_TYPE_TEXT_URL
 		STR_SVT_MIMETYPE_TEXT_VCARD, // CONTENT_TYPE_TEXT_VCARD
+		STR_SVT_MIMETYPE_VIDEO_THEORA, // CONTENT_TYPE_VIDEO_THEORA
 		STR_SVT_MIMETYPE_VIDEO_VDO, // CONTENT_TYPE_VIDEO_VDO
 		STR_SVT_MIMETYPE_VIDEO_MSVIDEO, // CONTENT_TYPE_VIDEO_MSVIDEO
 		STR_SVT_MIMETYPE_CNT_MSG, // CONTENT_TYPE_X_CNT_MESSAGE
@@ -519,6 +523,7 @@ MediaTypeEntry const aStaticExtensionMap
 		{ "met", CONTENT_TYPE_IMAGE_GENERIC, "" },
 		{ "mid", CONTENT_TYPE_AUDIO_MIDI, "" },
 		{ "midi", CONTENT_TYPE_AUDIO_MIDI, "" },
+		{ "ogg", CONTENT_TYPE_AUDIO_VORBIS, "" },
 		{ "pbm", CONTENT_TYPE_IMAGE_GENERIC, "" },
 		{ "pcd", CONTENT_TYPE_IMAGE_GENERIC, "" },
 		{ "pct", CONTENT_TYPE_IMAGE_GENERIC, "" },
diff -rup svtools-orig/source/misc1/mediatyp.src svtools/source/misc1/mediatyp.src
--- svtools-orig/source/misc1/mediatyp.src	2006-09-21 11:40:26.000000000 +0200
+++ svtools/source/misc1/mediatyp.src	2006-09-21 11:45:57.000000000 +0200
@@ -113,6 +113,87 @@
 	Text [ en-US ] = "Audio file" ;
 };
 
+String STR_SVT_MIMETYPE_AUDIO_VORBIS
+{
+	Text [ de ] = "Audio-Datei" ;
+	Text [ en-US ] = "Audio file" ;
+	Text [ af ] = "Oudiolêer" ;
+	Text [ ar ] = "ملف صوتي" ;
+	Text [ as-IN ] = "অডিঅ' ফাইল" ;
+	Text [ be-BY ] = "Гукавы файл" ;
+	Text [ bg ] = "Аудиофайл" ;
+	Text [ br ] = "Restr klev" ;
+	Text [ bs ] = "Audio datoteka" ;
+	Text [ ca ] = "Fitxer d'àudio" ;
+	Text [ cs ] = "Zvukový soubor" ;
+	Text [ cy ] = "Ffeil sain" ;
+	Text [ da ] = "Lydfil" ;
+	Text [ el ] = "Αρχείο ήχου" ;
+	Text [ en-GB ] = "Audio file" ;
+	Text [ en-ZA ] = "Audio file" ;
+	Text [ eo ] = "Audio file" ;
+	Text [ es ] = "Archivo audio" ;
+	Text [ et ] = "Audiofail" ;
+	Text [ fa ] = "پرونده‌ی صوتی" ;
+	Text [ fi ] = "Äänitiedosto" ;
+	Text [ fr ] = "Fichier audio" ;
+	Text [ ga ] = "Comhad fuaime" ;
+	Text [ gu ] = "ઓડિયો ફાઈલ" ;
+	Text [ gu-IN ] = "ઓડિયો ફાઈલ" ;
+	Text [ he ] = "קובץ שמע" ;
+	Text [ hi-IN ] = "Audio file" ;
+	Text [ hr ] = "Zvučna datoteka" ;
+	Text [ hu ] = "Hangfájl" ;
+	Text [ it ] = "File audio" ;
+	Text [ ja ] = "オーディオ ファイル" ;
+	Text [ ka ] = "ხმოვანი ფაილი" ;
+	Text [ km ] = "ឯកសារ​សម្លេង" ;
+	Text [ ko ] = "오디오 파일" ;
+	Text [ ku ] = "Pelgeha deng" ;
+	Text [ lt ] = "Garso failas" ;
+	Text [ mk ] = "Аудиодатотека" ;
+	Text [ ml-IN ] = "ഓഡിയോ ഫയല്" ;
+	Text [ mr-IN ] = "श्राव्य धारिका" ;
+	Text [ nb ] = "Lydfil" ;
+	Text [ ne ] = "अडियो फाइल" ;
+	Text [ nl ] = "Audiobestand" ;
+	Text [ nn ] = "Lydfil" ;
+	Text [ nr ] = "Ifayili elilalelwako" ;
+	Text [ ns ] = "Faele ya odiyo" ;
+	Text [ or-IN ] = "ଅଡିଓ ଫାଇଲ" ;
+	Text [ pa-IN ] = "ਆਡੀਓ ਫਾਇਲ" ;
+	Text [ pl ] = "Plik dźwiękowy" ;
+	Text [ pt ] = "Ficheiro áudio" ;
+	Text [ pt-BR ] = "Arquivo de áudio" ;
+	Text [ ru ] = "Аудио файл" ;
+	Text [ rw ] = "Audio file" ;
+	Text [ sh-YU ] = "Zvučna datoteka" ;
+	Text [ sk ] = "Zvukový súbor" ;
+	Text [ sl ] = "Zvočna datoteka" ;
+	Text [ sr-CS ] = "Звучна датотека" ;
+	Text [ ss ] = "I-Odiyofayela" ;
+	Text [ st ] = "Audiyo faele" ;
+	Text [ sv ] = "Audio-fil" ;
+	Text [ sw-TZ ] = "Faili la kusikia" ;
+	Text [ ta ] = "Audio file" ;
+	Text [ ta-IN ] = "Audio file" ;
+	Text [ te-IN ] = "శ్రవణ దస్త్రం" ;
+	Text [ tg ] = "Аудио-дафтар" ;
+	Text [ th ] = "Audio file" ;
+	Text [ ti-ER ] = "ናይ ድምጺ ፋይል" ;
+	Text [ tr ] = "Ses dosyası" ;
+	Text [ ts ] = "Fayili ya Xitlanga-mpfumawulo" ;
+	Text [ uk ] = "Audio file" ;
+	Text [ ur-IN ] = "آڈیوفائل" ;
+	Text [ ve ] = "Faela ya odio" ;
+	Text [ vi ] = "Tập tin âm thanh" ;
+	Text [ xh ] = "Ifayili Yokumanyelwayo" ;
+	Text [ zh-CN ] = "声频文件" ;
+	Text [ zh-TW ] = "聲頻檔案" ;
+	Text [ zu ] = "Ifayela eliveza umsindo" ;
+	Text [ x-comment ] = " ";
+};
+
 String STR_SVT_MIMETYPE_AUDIO_WAV
 {
 	Text [ en-US ] = "Audio file" ;
@@ -158,6 +239,87 @@
 	Text [ en-US ] = "vCard file" ;
 };
 
+String STR_SVT_MIMETYPE_VIDEO_THEORA
+{
+	Text [ de ] = "Video-Datei" ;
+	Text [ en-US ] = "Video file" ;
+	Text [ af ] = "Videolêer" ;
+	Text [ ar ] = "ملف فيديو" ;
+	Text [ as-IN ] = "ভিডিঅ' ফাইল" ;
+	Text [ be-BY ] = "Файл відэа" ;
+	Text [ bg ] = "Видеофайл" ;
+	Text [ br ] = "Restr video" ;
+	Text [ bs ] = "Video datoteka" ;
+	Text [ ca ] = "Fitxer de vídeo" ;
+	Text [ cs ] = "Video soubor" ;
+	Text [ cy ] = "Ffeil fideo" ;
+	Text [ da ] = "Video-fil" ;
+	Text [ el ] = "Αρχείο Video" ;
+	Text [ en-GB ] = "Video file" ;
+	Text [ en-ZA ] = "Video file" ;
+	Text [ eo ] = "Video file" ;
+	Text [ es ] = "Archivo vídeo" ;
+	Text [ et ] = "Videofail" ;
+	Text [ fa ] = "پرونده‌ی ویدئویی" ;
+	Text [ fi ] = "Videotiedosto" ;
+	Text [ fr ] = "Fichier vidéo" ;
+	Text [ ga ] = "Físchomhad" ;
+	Text [ gu ] = "વીડિયો ફાઈલ" ;
+	Text [ gu-IN ] = "વીડિયો ફાઈલ" ;
+	Text [ he ] = "קובץ וידיאו" ;
+	Text [ hi-IN ] = "Video file" ;
+	Text [ hr ] = "Video datoteka" ;
+	Text [ hu ] = "Videofájl" ;
+	Text [ it ] = "File video" ;
+	Text [ ja ] = "ビデオ ファイル" ;
+	Text [ ka ] = "ვიდეო ფაილი" ;
+	Text [ km ] = "ឯកសារ​វីដេអូ" ;
+	Text [ ko ] = "비디오 파일" ;
+	Text [ ku ] = "Pelgeha vîdeo" ;
+	Text [ lt ] = "Vaizdo failas" ;
+	Text [ mk ] = "Видеодатотека" ;
+	Text [ ml-IN ] = "വീഡിയോ ഫയല്" ;
+	Text [ mr-IN ] = "चित्रमुद्रक धारिका" ;
+	Text [ nb ] = "Videofil" ;
+	Text [ ne ] = "भिडियो फाइल" ;
+	Text [ nl ] = "Videobestand" ;
+	Text [ nn ] = "Videofil" ;
+	Text [ nr ] = "Ifayili levidiyo" ;
+	Text [ ns ] = "Faele ya bidio" ;
+	Text [ or-IN ] = "ଭିଡିଓ ଫାଇଲ" ;
+	Text [ pa-IN ] = "ਵੀਡਿਓ ਫਾਇਲ" ;
+	Text [ pl ] = "Plik filmowy" ;
+	Text [ pt ] = "Ficheiro de vídeo" ;
+	Text [ pt-BR ] = "Arquivo de vídeo" ;
+	Text [ ru ] = "Файл видео" ;
+	Text [ rw ] = "Video file" ;
+	Text [ sh-YU ] = "Video datoteka" ;
+	Text [ sk ] = "Video súbor" ;
+	Text [ sl ] = "Video-datoteka" ;
+	Text [ sr-CS ] = "Видео датотека" ;
+	Text [ ss ] = "Ividiyofayela" ;
+	Text [ st ] = "Bideo faele" ;
+	Text [ sv ] = "Video-fil" ;
+	Text [ sw-TZ ] = "Faili la video" ;
+	Text [ ta ] = "Video file" ;
+	Text [ ta-IN ] = "Video file" ;
+	Text [ te-IN ] = "దృశ్య దస్త్రము" ;
+	Text [ tg ] = "Видео-дафтар" ;
+	Text [ th ] = "Video file" ;
+	Text [ ti-ER ] = "ናይ ቪድዮ ፋይል" ;
+	Text [ tr ] = "Görüntü dosyası" ;
+	Text [ ts ] = "Fayili ya Vhidiyo" ;
+	Text [ uk ] = "Video file" ;
+	Text [ ur-IN ] = "وڈیوفائل" ;
+	Text [ ve ] = "Faela ya vidio" ;
+	Text [ vi ] = "Tập tin ảnh động" ;
+	Text [ xh ] = "Ifayili yevidiyo" ;
+	Text [ zh-CN ] = "影视文件" ;
+	Text [ zh-TW ] = "視頻檔案" ;
+	Text [ zu ] = "Ifayela levidiyo" ;
+	Text [ x-comment ] = " ";
+};
+
 String STR_SVT_MIMETYPE_VIDEO_VDO
 {
 	Text [ en-US ] = "Video file" ;
Index: vcl/inc/salobj.hxx
===================================================================
RCS file: /cvs/gsl/vcl/inc/salobj.hxx,v
retrieving revision 1.5
diff -u -p -r1.5 salobj.hxx
--- vcl/inc/vcl/salobj.hxx  2 Nov 2005 13:28:47 -0000       1.5
+++ vcl/inc/vcl/salobj.hxx  5 Jan 2007 15:00:36 -0000
@@ -88,6 +88,8 @@
 	virtual void					SetBackground() = 0;
 	virtual void					SetBackground( SalColor nSalColor ) = 0;
 
+        virtual void                                    SetForwardKey( BOOL /*bEnable*/ ) {}
+
 	virtual const SystemEnvData*	GetSystemData() const = 0;
 
 	void					SetCallback( void* pInst, SALOBJECTPROC pProc )
Index: vcl/inc/syschild.hxx
===================================================================
RCS file: /cvs/gsl/vcl/inc/syschild.hxx,v
retrieving revision 1.5
diff -u -p -r1.5 syschild.hxx
--- vcl/inc/vcl/syschild.hxx        19 Jun 2006 19:10:32 -0000      1.5
+++ vcl/inc/vcl/syschild.hxx        5 Jan 2007 15:00:36 -0000
@@ -77,6 +77,7 @@ public:
     //  however, this might not always be required
     void                    EnableEraseBackground( BOOL bEnable = TRUE );
     BOOL                    IsEraseBackgroundEnabled();
+     void                    SetForwardKey( BOOL bEnable );
 };

 #endif // _SV_SYSCHILD_HXX
Index: vcl/source/window/syschild.cxx
===================================================================
RCS file: /cvs/gsl/vcl/source/window/syschild.cxx,v
retrieving revision 1.8
diff -u -p -r1.8 syschild.cxx
--- vcl/source/window/syschild.cxx      10 Jul 2006 16:36:07 -0000      1.8
+++ vcl/source/window/syschild.cxx      5 Jan 2007 15:00:49 -0000
@@ -207,3 +211,9 @@ BOOL SystemChildWindow::IsEraseBackgroun
     else
         return FALSE;
 }
+
+void SystemChildWindow::SetForwardKey( BOOL bEnable )
+{
+       if ( mpWindowImpl->mpSysObj )
+               mpWindowImpl->mpSysObj->SetForwardKey( bEnable );
+}
Index: vcl/unx/gtk/window/gtkobject.cxx
===================================================================
RCS file: /cvs/gsl/vcl/unx/gtk/window/gtkobject.cxx,v
retrieving revision 1.8.90.1
diff -u -p -r1.8.90.1 gtkobject.cxx
--- vcl/unx/gtk/window/gtkobject.cxx    10 Aug 2006 14:54:05 -0000      1.8.90.1
+++ vcl/unx/gtk/window/gtkobject.cxx    5 Jan 2007 15:00:54 -0000
@@ -211,3 +242,11 @@ void GtkSalObject::signalDestroy( GtkObj
         pThis->m_pSocket = NULL;
     }
 }
+
+void GtkSalObject::SetForwardKey( BOOL bEnable )
+{
+    if( bEnable )
+        gtk_widget_add_events( GTK_WIDGET( m_pSocket ), GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE );
+    else
+        gtk_widget_set_events( GTK_WIDGET( m_pSocket ), ~(GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE) & gtk_widget_get_events( GTK_WIDGET( m_pSocket ) ) );
+}
Index: vcl/unx/inc/plugins/gtk/gtkobject.hxx
===================================================================
RCS file: /cvs/gsl/vcl/unx/inc/plugins/gtk/gtkobject.hxx,v
retrieving revision 1.4
diff -u -p -r1.4 gtkobject.hxx
--- vcl/unx/inc/plugins/gtk/gtkobject.hxx       9 Sep 2005 12:52:22 -0000       1.4
+++ vcl/unx/inc/plugins/gtk/gtkobject.hxx       5 Jan 2007 15:00:54 -0000
@@ -78,6 +78,8 @@
 	virtual void					SetBackground();
 	virtual void					SetBackground( SalColor nSalColor );
 
+        virtual void                                    SetForwardKey( BOOL bEnable );
+
 	virtual const SystemEnvData*	GetSystemData() const;
    
 };
--- /dev/null	2006-09-07 16:53:33.000000000 +0200
+++ avmedia/source/gstreamer/ChangeLog	2006-09-22 14:46:33.000000000 +0200
@@ -0,0 +1,112 @@
+2006-09-22  Radek Doulik  <rodo@novell.com>
+
+	* gstplayer.cxx (processSyncMessage): remember GstXOverlay
+	(processMessage): explicit expose when we reach paused state -
+	this mean that now once stream is loaded/video inserted, the 1st
+	frame is rendered
+	(setMediaTime): if not playing set PAUSED state again, seems like
+	seek is changing state to PLAYING. this fixes problem when stop
+	seeked to begin and started playing again
+
+2006-09-21  Radek Doulik  <rodo@novell.com>
+
+	* gstplayer.cxx (processSyncMessage): when error occurs, set the
+	condition so that OOo does'n waste time waiting for us to finish
+	reaching PAUSED state
+
+2006-09-19  Radek Doulik  <rodo@novell.com>
+
+	* gstplayer.cxx (processSyncMessage): set condition even if we
+	weren't able to get video size - might be audio only stream
+	(getPreferredPlayerWindowSize): init size to 0, 0 - in case we
+	don't have video size, it will fallback to system media window
+	content (some icon)
+
+2006-08-31  Radek Doulik  <rodo@novell.com>
+
+	* gstplayer.cxx (processSyncMessage): when we get to paused state,
+	get stream-info from playbin and look for video size. set
+	condition when done
+	(Player): added width, height, size condition
+	(preparePlaybin): new helper method, extracted from create
+	method. use fake video sink in the beggining so that we don't get
+	xwindow-id message too early
+	(getPreferredPlayerWindowSize): wait for size condition to be sure
+	we know video size (if possible). reset video sink to default one
+	(NULL) and set state to READY and immediatelly to PAUSE so that
+	the default sink is relinked
+
+2006-08-16  Radek Doulik  <rodo@novell.com>
+
+	* gstplayer.cxx (create): set state to PAUSED so that we can query
+	duration ASAP
+	(processMessage): watch for state changed and query duration when
+	going to PAUSED state
+
+2006-08-15  Radek Doulik  <rodo@novell.com>
+
+	* makefile.mk: require gstreamer-plugins-base-0.10 and link with
+	gst interfaces library
+
+	* gstwindow.cxx: make it build
+
+	* gstplayer.cxx: removed WINNT ifdefs (relict from time when I
+	thought Cedric develops on win architecture)
+	(gst_pipeline_bus_callback): added sync handler for setting
+	xwindow id to to video sink
+	(processSyncMessage): new metrhod, process message from sync
+	handler
+	(create): set playbin state to READY so that playback start is
+	faster
+	(createPlayerWindow): implemented, we pass xwindow id in 3rd
+	argument
+
+2006-08-04  Radek Doulik  <rodo@novell.com>
+
+	* gstplayer.cxx (create): add bus watch, watch for EOS in
+	processMessage method (called from watch callback)
+
+2006-08-02  Radek Doulik  <rodo@novell.com>
+
+	* gstplayer.cxx: test for mpPlaybin != NULL before using it,
+	initialize it in constructor to NULL and also reset it to NULL
+	after unrefing
+	(getDuration): check for sucessful query and the right format
+	(getMediaTime): ditto, 
+	(setMediaTime): implemented
+
+2006-08-01  Radek Doulik  <rodo@novell.com>
+
+	* gstwindow.hxx: removed mpWndClass for now, so that the rest
+	compiles
+
+	* gstuno.cxx (component_getFactory): s/DirectX/GStreamer so that
+	component is loaded
+
+	* gstplayer.cxx (Player::Player): do not create gerror object, it
+	is noit needed, free the error object only if created during
+	initialization of gstremer
+	(Player::create, start, stop): use g_main_loop only on windows
+	(create): fixed ascURL declaration, added rtl namespace prefix
+	(setMute): set mbMuted
+	(setVolumeDB): convert avmedia volume to gstreamer volume, added
+	missing NULL to the end of g_object_set call
+	(getVolumeDB): convert gstreamer volume back to avmedia volume
+
+	* gstplayer.hxx: keep g_main_loop only on win platform. make
+	mnUnmutedVolume double, moved mbInitialized to the end to quiet
+	compiler warning
+
+	* gstcommon.hxx: removed wrong #include <rtl/ustring>
+
+	* renamed source files, prefixed the names with gst so that obj
+	file names do not clash with xine object files
+
+	* makefile.mk: changed PRJNAME and TARGET to reflect
+	gstreamer. enabled build on unix as well. removed win library
+	references. removed source files which are not yet ported from
+	SLOFILES list.
+
+2006-08-31  Radek Doulik  <rodo@novell.com>
+
+        * imported initial sources from Cedric Bosdonnat
\ No newline at end of file
--- /dev/null	2006-08-13 17:52:05.000000000 +0200
+++ avmedia/source/gstreamer/exports.dxp	2006-08-22 11:38:56.000000000 +0200
@@ -0,0 +1,4 @@
+component_getImplementationEnvironment
+component_writeInfo
+component_getFactory
+
--- /dev/null	2006-08-13 17:52:05.000000000 +0200
+++ avmedia/source/gstreamer/gstcommon.hxx	2006-08-22 11:38:56.000000000 +0200
@@ -0,0 +1,83 @@
+/*************************************************************************
+ *
+ *  OpenOffice.org - a multi-platform office productivity suite
+ *
+ *  $RCSfile$
+ *
+ *  $Revision: 7654 $
+ *
+ *  last change: $Author: rodo $ $Date: 2006-09-19 09:24:25 +0100 (Tue, 19 Sep 2006) $
+ *
+ *  The Contents of this file are made available subject to
+ *  the terms of GNU Lesser General Public License Version 2.1.
+ *
+ *
+ *    GNU Lesser General Public License Version 2.1
+ *    =============================================
+ *    Copyright 2005 by Sun Microsystems, Inc.
+ *    901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ *    This library is free software; you can redistribute it and/or
+ *    modify it under the terms of the GNU Lesser General Public
+ *    License version 2.1, as published by the Free Software Foundation.
+ *
+ *    This library is distributed in the hope that it will be useful,
+ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *    Lesser General Public License for more details.
+ *
+ *    You should have received a copy of the GNU Lesser General Public
+ *    License along with this library; if not, write to the Free Software
+ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ *    MA  02111-1307  USA
+ *
+ ************************************************************************/
+
+#ifndef _GSTCOMMON_HXX
+#define _GSTCOMMON_HXX
+
+#include <gst/gst.h>
+
+#ifndef _OSL_MUTEX_HXX_
+#include <osl/mutex.hxx>
+#endif
+#ifndef _DEBUG_HXX
+#include <tools/debug.hxx>
+#endif
+#ifndef _STREAM_HXX
+#include <tools/stream.hxx>
+#endif
+#ifndef _STRING_HXX
+#include <tools/string.hxx>
+#endif
+#ifndef _URLOBJ_HXX
+#include <tools/urlobj.hxx>
+#endif
+#ifndef _CPPUHELPER_IMPLBASE1_HXX_
+#include <cppuhelper/implbase1.hxx>
+#endif
+#ifndef _CPPUHELPER_IMPLBASE2_HXX_
+#include <cppuhelper/implbase2.hxx>
+#endif
+#ifndef _CPPUHELPER_WEAK_HXX_
+#include <cppuhelper/weak.hxx>
+#endif
+#ifndef _CPPUHELPER_FACTORY_HXX_
+#include <cppuhelper/factory.hxx>
+#endif
+
+#include <com/sun/star/uno/Reference.h>
+#include <com/sun/star/uno/RuntimeException.hpp>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/lang/XComponent.hpp>
+#include <com/sun/star/registry/XRegistryKey.hpp>
+#include <com/sun/star/lang/XComponent.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/awt/Rectangle.hpp>
+#include <com/sun/star/awt/KeyModifier.hpp>
+#include <com/sun/star/awt/MouseButton.hpp>
+#include <com/sun/star/media/XManager.hpp>
+
+#define WM_GRAPHNOTIFY (WM_USER + 567)
+
+#endif // _GSTCOMMOM_HXX
--- /dev/null	2006-08-13 17:52:05.000000000 +0200
+++ avmedia/source/gstreamer/gstframegrabber.cxx	2006-08-22 11:38:56.000000000 +0200
@@ -0,0 +1,244 @@
+/*************************************************************************
+ *
+ *  OpenOffice.org - a multi-platform office productivity suite
+ *
+ *  $RCSfile$
+ *
+ *  $Revision: 7654 $
+ *
+ *  last change: $Author: rodo $ $Date: 2006-09-19 09:24:25 +0100 (Tue, 19 Sep 2006) $
+ *
+ *  The Contents of this file are made available subject to
+ *  the terms of GNU Lesser General Public License Version 2.1.
+ *
+ *
+ *    GNU Lesser General Public License Version 2.1
+ *    =============================================
+ *    Copyright 2005 by Sun Microsystems, Inc.
+ *    901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ *    This library is free software; you can redistribute it and/or
+ *    modify it under the terms of the GNU Lesser General Public
+ *    License version 2.1, as published by the Free Software Foundation.
+ *
+ *    This library is distributed in the hope that it will be useful,
+ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *    Lesser General Public License for more details.
+ *
+ *    You should have received a copy of the GNU Lesser General Public
+ *    License along with this library; if not, write to the Free Software
+ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ *    MA  02111-1307  USA
+ *
+ ************************************************************************/
+
+#include <tools/prewin.h>
+#include <windows.h>
+#include <objbase.h>
+#include <strmif.h>
+#include <Amvideo.h>
+#include <Qedit.h>
+#include <uuids.h>
+#include <tools/postwin.h>
+
+#include "framegrabber.hxx"
+#include "player.hxx"
+
+#include <tools/stream.hxx>
+#include <vcl/graph.hxx>
+#include <unotools/localfilehelper.hxx>
+
+#define AVMEDIA_GST_FRAMEGRABBER_IMPLEMENTATIONNAME "com.sun.star.comp.avmedia.FrameGrabber_GStreamer"
+#define AVMEDIA_GST_FRAMEGRABBER_SERVICENAME "com.sun.star.media.FrameGrabber_GStreamer"
+
+using namespace ::com::sun::star;
+
+namespace avmedia { namespace gstreamer {
+
+// ----------------
+// - FrameGrabber -
+// ----------------
+
+FrameGrabber::FrameGrabber( const uno::Reference< lang::XMultiServiceFactory >& rxMgr ) :
+    mxMgr( rxMgr )
+{
+    ::CoInitialize( NULL );
+}
+
+// ------------------------------------------------------------------------------
+
+FrameGrabber::~FrameGrabber()
+{
+    ::CoUninitialize();
+}
+
+// ------------------------------------------------------------------------------
+
+IMediaDet* FrameGrabber::implCreateMediaDet( const ::rtl::OUString& rURL ) const
+{
+    IMediaDet* pDet = NULL;
+
+    if( SUCCEEDED( CoCreateInstance( CLSID_MediaDet, NULL, CLSCTX_INPROC_SERVER, IID_IMediaDet, (void**) &pDet ) ) )
+    {
+		String aLocalStr;
+		
+		if( ::utl::LocalFileHelper::ConvertURLToPhysicalName( rURL, aLocalStr ) && aLocalStr.Len() )
+		{
+            if( !SUCCEEDED( pDet->put_Filename( ::SysAllocString( aLocalStr.GetBuffer() ) ) ) )
+            {
+                pDet->Release();
+                pDet = NULL;
+            }
+        }
+    }
+    
+    return pDet;
+}
+
+// ------------------------------------------------------------------------------
+
+bool FrameGrabber::create( const ::rtl::OUString& rURL )
+{
+    // just check if a MediaDet interface can be created with the given URL
+    IMediaDet*  pDet = implCreateMediaDet( rURL );
+   
+    if( pDet )
+    {
+        maURL = rURL;
+        pDet->Release();
+        pDet = NULL;
+    }
+    else
+        maURL = ::rtl::OUString();
+
+    return( maURL.getLength() > 0 );
+}
+
+// ------------------------------------------------------------------------------
+
+uno::Reference< graphic::XGraphic > SAL_CALL FrameGrabber::grabFrame( double fMediaTime )
+    throw (uno::RuntimeException)
+{
+    uno::Reference< graphic::XGraphic > xRet;
+    IMediaDet*                          pDet = implCreateMediaDet( maURL );
+   
+    if( pDet )
+    {
+        double  fLength;
+        long    nStreamCount;
+        bool    bFound = false;
+    
+        if( SUCCEEDED( pDet->get_OutputStreams( &nStreamCount ) ) )
+        {
+            for( long n = 0; ( n < nStreamCount ) && !bFound; ++n )
+            {
+                GUID aMajorType;
+                
+                if( SUCCEEDED( pDet->put_CurrentStream( n ) )  &&
+                    SUCCEEDED( pDet->get_StreamType( &aMajorType ) ) &&
+                    ( aMajorType == MEDIATYPE_Video ) )
+                {
+                    bFound = true;
+                }
+            }
+        }
+        
+        if( bFound &&
+            ( S_OK == pDet->get_StreamLength( &fLength ) ) &&
+            ( fLength > 0.0 ) && ( fMediaTime >= 0.0 ) && ( fMediaTime <= fLength ) )
+        {
+            AM_MEDIA_TYPE   aMediaType;
+            long            nWidth = 0, nHeight = 0, nSize = 0; 
+            
+            if( SUCCEEDED( pDet->get_StreamMediaType( &aMediaType ) ) )
+            {
+                if( ( aMediaType.formattype == FORMAT_VideoInfo ) && 
+                    ( aMediaType.cbFormat >= sizeof( VIDEOINFOHEADER ) ) )
+                {
+                    VIDEOINFOHEADER* pVih = reinterpret_cast< VIDEOINFOHEADER* >( aMediaType.pbFormat );
+                    
+                    nWidth = pVih->bmiHeader.biWidth;
+                    nHeight = pVih->bmiHeader.biHeight;
+                
+                    if( nHeight < 0 )
+                        nHeight *= -1;
+                }
+
+                if( aMediaType.cbFormat != 0 )
+                {
+                    ::CoTaskMemFree( (PVOID) aMediaType.pbFormat );
+                    aMediaType.cbFormat = 0;
+                    aMediaType.pbFormat = NULL;
+                }
+                
+                if( aMediaType.pUnk != NULL )
+                {
+                    aMediaType.pUnk->Release();
+                    aMediaType.pUnk = NULL;
+                }            
+            }
+            
+            if( ( nWidth > 0 ) && ( nHeight > 0 ) &&
+                SUCCEEDED( pDet->GetBitmapBits( 0, &nSize, NULL, nWidth, nHeight ) ) &&
+                ( nSize > 0  ) )
+            {
+                char* pBuffer = new char[ nSize ];
+
+                try 
+                {
+                    if( SUCCEEDED( pDet->GetBitmapBits( fMediaTime, NULL, pBuffer, nWidth, nHeight ) ) )
+                    {
+                        SvMemoryStream  aMemStm( pBuffer, nSize, STREAM_READ | STREAM_WRITE );
+                        Bitmap          aBmp;
+                        
+                        if( aBmp.Read( aMemStm, false ) && !aBmp.IsEmpty() )
+                        {
+                            const Graphic aGraphic( aBmp );
+                            xRet = aGraphic.GetXGraphic();
+                        }
+                    }
+                }
+                catch( ... )
+                {
+                }
+
+                delete [] pBuffer;
+            }
+        }
+
+        pDet->Release();
+    }
+    
+    return xRet;
+}
+
+// ------------------------------------------------------------------------------
+
+::rtl::OUString SAL_CALL FrameGrabber::getImplementationName(  )
+    throw (uno::RuntimeException)
+{
+    return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( AVMEDIA_GST_FRAMEGRABBER_IMPLEMENTATIONNAME ) );
+}
+
+// ------------------------------------------------------------------------------
+
+sal_Bool SAL_CALL FrameGrabber::supportsService( const ::rtl::OUString& ServiceName )
+    throw (uno::RuntimeException)
+{
+    return ServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( AVMEDIA_GST_FRAMEGRABBER_SERVICENAME ) );
+}
+
+// ------------------------------------------------------------------------------
+
+uno::Sequence< ::rtl::OUString > SAL_CALL FrameGrabber::getSupportedServiceNames(  )
+    throw (uno::RuntimeException)
+{
+    uno::Sequence< ::rtl::OUString > aRet(1);
+    aRet[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( AVMEDIA_GST_FRAMEGRABBER_SERVICENAME ) );
+
+    return aRet;
+}
+
+} // namespace gstreamer
+} // namespace avmedia
--- /dev/null	2006-08-13 17:52:05.000000000 +0200
+++ avmedia/source/gstreamer/gstframegrabber.hxx	2006-08-22 11:38:56.000000000 +0200
@@ -0,0 +1,78 @@
+/*************************************************************************
+ *
+ *  OpenOffice.org - a multi-platform office productivity suite
+ *
+ *  $RCSfile$
+ *
+ *  $Revision: 7654 $
+ *
+ *  last change: $Author: rodo $ $Date: 2006-09-19 09:24:25 +0100 (Tue, 19 Sep 2006) $
+ *
+ *  The Contents of this file are made available subject to
+ *  the terms of GNU Lesser General Public License Version 2.1.
+ *
+ *
+ *    GNU Lesser General Public License Version 2.1
+ *    =============================================
+ *    Copyright 2005 by Sun Microsystems, Inc.
+ *    901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ *    This library is free software; you can redistribute it and/or
+ *    modify it under the terms of the GNU Lesser General Public
+ *    License version 2.1, as published by the Free Software Foundation.
+ *
+ *    This library is distributed in the hope that it will be useful,
+ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *    Lesser General Public License for more details.
+ *
+ *    You should have received a copy of the GNU Lesser General Public
+ *    License along with this library; if not, write to the Free Software
+ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ *    MA  02111-1307  USA
+ *
+ ************************************************************************/
+
+#ifndef _FRAMEGRABBER_HXX
+#define _FRAMEGRABBER_HXX
+
+#include "gstcommon.hxx"
+
+#ifndef _COM_SUN_STAR_MEDIA_XFRAMEGRABBER_HDL_
+#include "com/sun/star/media/XFrameGrabber.hdl"
+#endif
+
+namespace avmedia { namespace gstreamer {
+
+// ----------------
+// - FrameGrabber -
+// ----------------
+
+class FrameGrabber : public ::cppu::WeakImplHelper2 < ::com::sun::star::media::XFrameGrabber,
+                                                      ::com::sun::star::lang::XServiceInfo >
+{
+public:
+
+            FrameGrabber( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& rxMgr );
+            ~FrameGrabber();
+
+    bool    create( const ::rtl::OUString& rURL );
+
+    // XFrameGrabber
+    virtual ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic > SAL_CALL grabFrame( double fMediaTime ) throw (::com::sun::star::uno::RuntimeException);
+
+    // XServiceInfo
+    virtual ::rtl::OUString SAL_CALL getImplementationName(  ) throw (::com::sun::star::uno::RuntimeException);
+    virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException);
+    virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames(  ) throw (::com::sun::star::uno::RuntimeException);
+
+private:
+
+    ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >    mxMgr;
+    ::rtl::OUString                                                                     maURL;
+};
+
+} // namespace gstreamer
+} // namespace avmedia
+
+#endif // _FRAMEGRABBER_HXX
--- /dev/null	2006-09-07 16:53:33.000000000 +0200
+++ avmedia/source/gstreamer/gstmanager.cxx	2006-09-22 14:57:17.000000000 +0200
@@ -0,0 +1,114 @@
+/*************************************************************************
+ *
+ *  OpenOffice.org - a multi-platform office productivity suite
+ *
+ *  $RCSfile$
+ *
+ *  $Revision: 7691 $
+ *
+ *  last change: $Author: rodo $ $Date: 2006-09-22 14:01:46 +0100 (Fri, 22 Sep 2006) $
+ *
+ *  The Contents of this file are made available subject to
+ *  the terms of GNU Lesser General Public License Version 2.1.
+ *
+ *
+ *    GNU Lesser General Public License Version 2.1
+ *    =============================================
+ *    Copyright 2005 by Sun Microsystems, Inc.
+ *    901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ *    This library is free software; you can redistribute it and/or
+ *    modify it under the terms of the GNU Lesser General Public
+ *    License version 2.1, as published by the Free Software Foundation.
+ *
+ *    This library is distributed in the hope that it will be useful,
+ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *    Lesser General Public License for more details.
+ *
+ *    You should have received a copy of the GNU Lesser General Public
+ *    License along with this library; if not, write to the Free Software
+ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ *    MA  02111-1307  USA
+ *
+ ************************************************************************/
+
+#include "gstmanager.hxx"
+#include "gstplayer.hxx"
+
+#include <tools/urlobj.hxx>
+
+#define AVMEDIA_GST_MANAGER_IMPLEMENTATIONNAME "com.sun.star.comp.avmedia.Manager_GStreamer"
+#define AVMEDIA_GST_MANAGER_SERVICENAME "com.sun.star.media.Manager"
+
+#if DEBUG
+#define DBG OSL_TRACE
+#else
+#define DBG(...)
+#endif
+
+using namespace ::com::sun::star;
+
+namespace avmedia { namespace gstreamer {
+// ----------------
+// - Manager -
+// ----------------
+
+Manager::Manager( const uno::Reference< lang::XMultiServiceFactory >& rxMgr ) :
+    mxMgr( rxMgr )
+{
+    DBG( "avmediagst: Manager::Manager" );
+}
+
+// ------------------------------------------------------------------------------
+
+Manager::~Manager()
+{
+}
+
+// ------------------------------------------------------------------------------
+
+uno::Reference< media::XPlayer > SAL_CALL Manager::createPlayer( const ::rtl::OUString& rURL )
+    throw (uno::RuntimeException)
+{
+    Player*                             pPlayer( new Player( mxMgr ) );
+    uno::Reference< media::XPlayer >    xRet( pPlayer );
+    const INetURLObject                 aURL( rURL );
+
+    DBG( "avmediagst: Manager::createPlayer" );
+
+    if( !pPlayer->create( aURL.GetMainURL( INetURLObject::DECODE_UNAMBIGUOUS ) )  )
+        xRet = uno::Reference< media::XPlayer >();
+
+    return xRet;
+}
+
+// ------------------------------------------------------------------------------
+
+::rtl::OUString SAL_CALL Manager::getImplementationName(  )
+    throw (uno::RuntimeException)
+{
+    return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( AVMEDIA_GST_MANAGER_IMPLEMENTATIONNAME ) );
+}
+
+// ------------------------------------------------------------------------------
+
+sal_Bool SAL_CALL Manager::supportsService( const ::rtl::OUString& ServiceName )
+    throw (uno::RuntimeException)
+{
+    return ServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( AVMEDIA_GST_MANAGER_SERVICENAME ) );
+}
+
+// ------------------------------------------------------------------------------
+
+uno::Sequence< ::rtl::OUString > SAL_CALL Manager::getSupportedServiceNames(  )
+    throw (uno::RuntimeException)
+{
+    uno::Sequence< ::rtl::OUString > aRet(1);
+    aRet[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( AVMEDIA_GST_MANAGER_SERVICENAME ) );
+
+    return aRet;
+}
+
+} // namespace gstreamer
+} // namespace avmedia
--- /dev/null	2006-08-13 17:52:05.000000000 +0200
+++ avmedia/source/gstreamer/gstmanager.hxx	2006-08-22 11:38:56.000000000 +0200
@@ -0,0 +1,74 @@
+/*************************************************************************
+ *
+ *  OpenOffice.org - a multi-platform office productivity suite
+ *
+ *  $RCSfile$
+ *
+ *  $Revision: 7654 $
+ *
+ *  last change: $Author: rodo $ $Date: 2006-09-19 09:24:25 +0100 (Tue, 19 Sep 2006) $
+ *
+ *  The Contents of this file are made available subject to
+ *  the terms of GNU Lesser General Public License Version 2.1.
+ *
+ *
+ *    GNU Lesser General Public License Version 2.1
+ *    =============================================
+ *    Copyright 2005 by Sun Microsystems, Inc.
+ *    901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ *    This library is free software; you can redistribute it and/or
+ *    modify it under the terms of the GNU Lesser General Public
+ *    License version 2.1, as published by the Free Software Foundation.
+ *
+ *    This library is distributed in the hope that it will be useful,
+ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *    Lesser General Public License for more details.
+ *
+ *    You should have received a copy of the GNU Lesser General Public
+ *    License along with this library; if not, write to the Free Software
+ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ *    MA  02111-1307  USA
+ *
+ ************************************************************************/
+
+#ifndef _MANAGER_HXX
+#define _MANAGER_HXX
+
+#include "gstcommon.hxx"
+
+#ifndef _COM_SUN_STAR_MEDIA_XMANAGER_HDL_
+#include "com/sun/star/media/XManager.hdl"
+#endif
+
+// -----------
+// - Manager -
+// -----------
+
+namespace avmedia { namespace gstreamer {
+
+class Manager : public ::cppu::WeakImplHelper2 < ::com::sun::star::media::XManager,
+                                                 ::com::sun::star::lang::XServiceInfo >
+{
+public:
+
+    Manager( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& rxMgr );
+    ~Manager();
+
+    // XManager
+    virtual ::com::sun::star::uno::Reference< ::com::sun::star::media::XPlayer > SAL_CALL createPlayer( const ::rtl::OUString& aURL ) throw (::com::sun::star::uno::RuntimeException);
+
+    // XServiceInfo
+    virtual ::rtl::OUString SAL_CALL getImplementationName(  ) throw (::com::sun::star::uno::RuntimeException);
+    virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException);
+    virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames(  ) throw (::com::sun::star::uno::RuntimeException);
+private:
+
+    ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > mxMgr;
+};
+
+} // namespace gstreamer
+} // namespace avmedia
+
+#endif // _MANAGER_HXX
--- /dev/null	2006-09-07 16:53:33.000000000 +0200
+++ avmedia/source/gstreamer/gstplayer.cxx	2006-09-22 14:56:04.000000000 +0200
@@ -0,0 +1,628 @@
+/*************************************************************************
+ *
+ *  OpenOffice.org - a multi-platform office productivity suite
+ *
+ *  $RCSfile$
+ *
+ *  $Revision: 7691 $
+ *
+ *  last change: $Author: rodo $ $Date: 2006-09-22 14:01:46 +0100 (Fri, 22 Sep 2006) $
+ *
+ *  The Contents of this file are made available subject to
+ *  the terms of GNU Lesser General Public License Version 2.1.
+ *
+ *
+ *    GNU Lesser General Public License Version 2.1
+ *    =============================================
+ *    Copyright 2005 by Sun Microsystems, Inc.
+ *    901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ *    This library is free software; you can redistribute it and/or
+ *    modify it under the terms of the GNU Lesser General Public
+ *    License version 2.1, as published by the Free Software Foundation.
+ *
+ *    This library is distributed in the hope that it will be useful,
+ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *    Lesser General Public License for more details.
+ *
+ *    You should have received a copy of the GNU Lesser General Public
+ *    License along with this library; if not, write to the Free Software
+ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ *    MA  02111-1307  USA
+ *
+ ************************************************************************/
+
+#include <math.h>
+
+#ifndef __RTL_USTRING_
+#include <rtl/string.hxx>
+#endif
+
+#include "gstplayer.hxx"
+#include "gstframegrabber.hxx"
+#include "gstwindow.hxx"
+
+#include <gst/interfaces/xoverlay.h>
+
+#define AVMEDIA_GST_PLAYER_IMPLEMENTATIONNAME "com.sun.star.comp.avmedia.Player_GStreamer"
+#define AVMEDIA_GST_PLAYER_SERVICENAME "com.sun.star.media.Player_GStreamer"
+
+#if DEBUG
+#define DBG OSL_TRACE
+#else
+#define DBG(...)
+#endif
+
+using namespace ::com::sun::star;
+
+namespace avmedia { namespace gstreamer {
+
+// ----------------
+// - Player -
+// ----------------
+
+Player::Player( const uno::Reference< lang::XMultiServiceFactory >& rxMgr ) :
+    mxMgr( rxMgr ),
+    mpPlaybin( NULL ),
+    mbFakeVideo (sal_False ),
+    mnUnmutedVolume( 0 ),
+    mbMuted( false ),
+    mbLooping( false ),
+    mbInitialized( false ),
+    mnWindowID( 0 ),
+    mpXOverlay( NULL ),
+    mnDuration( 0 ),
+    mnWidth( 0 ),
+    mnHeight( 0 ),
+    maSizeCondition( osl_createCondition() )
+{
+    // Initialize GStreamer library
+    int argc = 1;
+    char *arguments[] = { "openoffice.org" };
+    char** argv = arguments;
+    GError* pError = NULL;
+
+    mbInitialized = gst_init_check( &argc, &argv, &pError );
+
+    if (pError != NULL)
+        // TODO: thow an exception?
+        g_error_free (pError);
+}
+
+// ------------------------------------------------------------------------------
+
+Player::~Player()
+{
+    // Release the elements and pipeline
+    if( mbInitialized )
+    {
+        if( mpPlaybin )
+        {
+            gst_element_set_state( mpPlaybin, GST_STATE_NULL );
+            gst_object_unref( GST_OBJECT( mpPlaybin ) );
+
+            mpPlaybin = NULL;
+        }
+
+        if( mpXOverlay ) {
+            g_object_unref( G_OBJECT ( mpXOverlay ) );
+            mpXOverlay = NULL;
+        }
+    }
+}
+
+// ------------------------------------------------------------------------------
+
+static gboolean gst_pipeline_bus_callback( GstBus *, GstMessage *message, gpointer data )
+{
+    Player* pPlayer = (Player *) data;
+
+    pPlayer->processMessage( message );
+
+    return TRUE;
+}
+
+static GstBusSyncReply gst_pipeline_bus_sync_handler( GstBus *, GstMessage * message, gpointer data )
+{
+    Player* pPlayer = (Player *) data;
+
+    return pPlayer->processSyncMessage( message );
+}
+
+void Player::processMessage( GstMessage *message )
+{
+    //DBG ( "gst message received: src name: %s structure type: %s",
+    //            gst_object_get_name (message->src),
+    //            message->structure ? gst_structure_get_name (message->structure) : "<none>");
+
+    switch( GST_MESSAGE_TYPE( message ) ) {
+    case GST_MESSAGE_EOS:
+        //DBG( "EOS, reset state to NULL" );
+        gst_element_set_state( mpPlaybin, GST_STATE_READY );
+        break;
+    case GST_MESSAGE_STATE_CHANGED:
+        if( message->src == GST_OBJECT( mpPlaybin ) ) {
+            GstState newstate, pendingstate;
+
+            gst_message_parse_state_changed (message, NULL, &newstate, &pendingstate);
+
+            if( newstate == GST_STATE_PAUSED &&
+                pendingstate == GST_STATE_VOID_PENDING &&
+                mpXOverlay )
+                gst_x_overlay_expose( mpXOverlay );
+        }
+    default:
+        break;
+    }
+}
+
+GstBusSyncReply Player::processSyncMessage( GstMessage *message )
+{
+    DBG( "%p processSyncMessage", this );
+    //DBG ( "gst message received: src name: %s structure type: %s",
+    //            gst_object_get_name (message->src),
+    //            message->structure ? gst_structure_get_name (message->structure) : "<none>");
+
+    if (message->structure) {
+        if( !strcmp( gst_structure_get_name( message->structure ), "prepare-xwindow-id" ) && mnWindowID != 0 ) {
+            if( mpXOverlay )
+                g_object_unref( G_OBJECT ( mpXOverlay ) );
+            mpXOverlay = GST_X_OVERLAY( GST_MESSAGE_SRC( message ) );
+            g_object_ref( G_OBJECT ( mpXOverlay ) );
+            gst_x_overlay_set_xwindow_id( mpXOverlay, mnWindowID );
+            return GST_BUS_DROP;
+        }
+    }
+
+    if( GST_MESSAGE_TYPE( message ) == GST_MESSAGE_STATE_CHANGED ) {
+        if( message->src == GST_OBJECT( mpPlaybin ) ) {
+            GstState newstate, pendingstate;
+
+            gst_message_parse_state_changed (message, NULL, &newstate, &pendingstate);
+
+            DBG( "%p state change received, new state %d", this, newstate );
+            if( newstate == GST_STATE_PAUSED &&
+                pendingstate == GST_STATE_VOID_PENDING ) {
+                
+                DBG( "%p change to paused received", this );
+
+                if( mnDuration == 0) {
+                    GstFormat format = GST_FORMAT_TIME;
+                    gint64 gst_duration = 0L;
+
+                    if( gst_element_query_duration( mpPlaybin, &format, &gst_duration) && format == GST_FORMAT_TIME && gst_duration > 0L )
+                        mnDuration = gst_duration;
+                }
+
+                if( mnWidth == 0 ) {
+                    GList *pStreamInfo = NULL;
+
+                    g_object_get( G_OBJECT( mpPlaybin ), "stream-info", &pStreamInfo, NULL );
+
+                    for ( ; pStreamInfo != NULL; pStreamInfo = pStreamInfo->next) {
+                        GObject *pInfo = G_OBJECT( pStreamInfo->data );
+
+                        if( !pInfo )
+                            continue;
+
+                        int nType;
+                        g_object_get( pInfo, "type", &nType, NULL );
+                        GEnumValue *pValue = g_enum_get_value( G_PARAM_SPEC_ENUM( g_object_class_find_property( G_OBJECT_GET_CLASS( pInfo ), "type" ) )->enum_class,
+                                                               nType );
+
+                        if( !g_strcasecmp( pValue->value_nick, "video" ) ) {
+                            GstStructure *pStructure;
+                            GstPad *pPad;
+
+                            g_object_get( pInfo, "object", &pPad, NULL );
+                            pStructure = gst_caps_get_structure( GST_PAD_CAPS( pPad ), 0 );
+                            if( pStructure ) {
+                                gst_structure_get_int( pStructure, "width", &mnWidth );
+                                gst_structure_get_int( pStructure, "height", &mnHeight );
+                                DBG( "queried size: %d x %d", mnWidth, mnHeight );
+                            }
+                        }
+                    }
+
+                    sal_Bool aSuccess = osl_setCondition( maSizeCondition );
+                    DBG( "%p set condition result: %d", this, aSuccess );
+                }
+            }
+        }
+    } else if( GST_MESSAGE_TYPE( message ) == GST_MESSAGE_ERROR ) {
+        if( mnWidth == 0 ) {
+            // an error occured, set condition so that OOo thread doesn't wait for us
+            sal_Bool aSuccess = osl_setCondition( maSizeCondition );
+            DBG( "%p set condition result: %d", this, aSuccess );
+        }
+    }
+
+    return GST_BUS_PASS;
+}
+
+void Player::preparePlaybin( const ::rtl::OUString& rURL, bool bFakeVideo )
+{
+        GstBus *pBus;
+
+        //sal_Bool aSuccess = osl_setCondition( maSizeCondition );
+        //DBG( "%p set condition result: %d", this, aSuccess );
+
+        if( mpPlaybin != NULL ) {
+            gst_element_set_state( mpPlaybin, GST_STATE_NULL );
+            g_object_unref( mpPlaybin );
+        }
+
+        mpPlaybin = gst_element_factory_make( "playbin", NULL );
+
+        if( bFakeVideo )
+            g_object_set( G_OBJECT( mpPlaybin ), "video-sink", gst_element_factory_make( "fakesink", NULL ), NULL );
+
+        mbFakeVideo = bFakeVideo;
+
+        rtl::OString ascURL = OUStringToOString( rURL, RTL_TEXTENCODING_ASCII_US );
+        g_object_set( G_OBJECT( mpPlaybin ), "uri", ascURL.getStr() , NULL );
+
+        pBus = gst_element_get_bus( mpPlaybin );
+        gst_bus_add_watch( pBus, gst_pipeline_bus_callback, this );
+        DBG( "%p set sync handler", this );
+        gst_bus_set_sync_handler( pBus, gst_pipeline_bus_sync_handler, this );
+        g_object_unref( pBus );
+}
+
+bool Player::create( const ::rtl::OUString& rURL )
+{
+    bool    bRet = false;
+
+    // create all the elements and link them     
+    
+    if( mbInitialized )
+    {
+        preparePlaybin( rURL, true );
+
+        gst_element_set_state( mpPlaybin, GST_STATE_PAUSED );
+
+        bRet = true;
+    }
+
+
+    if( bRet )
+        maURL = rURL;
+    else
+        maURL = ::rtl::OUString();
+
+    return bRet;
+}
+
+// ------------------------------------------------------------------------------
+
+void SAL_CALL Player::start(  )
+    throw (uno::RuntimeException)
+{
+    //DBG ("Player::start");
+
+    // set the pipeline state to READY and run the loop
+    if( mbInitialized && NULL != mpPlaybin )
+    {
+        gst_element_set_state( mpPlaybin, GST_STATE_PLAYING );
+    }
+}
+
+// ------------------------------------------------------------------------------
+
+void SAL_CALL Player::stop(  )
+    throw (uno::RuntimeException)
+{
+    // set the pipeline in PAUSED STATE
+    if( mpPlaybin )
+        gst_element_set_state( mpPlaybin, GST_STATE_PAUSED );
+
+    DBG( "stop %p", mpPlaybin );
+}
+
+// ------------------------------------------------------------------------------
+
+sal_Bool SAL_CALL Player::isPlaying()
+    throw (uno::RuntimeException)
+{
+    bool            bRet = false;
+
+    // return whether the pipeline is in PLAYING STATE or not
+    if( mbInitialized && mpPlaybin )
+    {
+        bRet = GST_STATE_PLAYING == GST_STATE( mpPlaybin );
+    }
+
+    DBG( "isPlaying %d", bRet );
+
+    return bRet;
+}
+
+// ------------------------------------------------------------------------------
+
+double SAL_CALL Player::getDuration(  )
+    throw (uno::RuntimeException)
+{
+    // slideshow checks for non-zero duration, so cheat here
+    double duration = 0.01;
+
+    if( mpPlaybin && mnDuration > 0 ) {
+        duration = mnDuration / 1E9;
+
+        //DBG( "gst duration: %lld ns duration: %lf s", gst_duration, duration );
+    }
+
+    return duration;
+}
+
+// ------------------------------------------------------------------------------
+
+void SAL_CALL Player::setMediaTime( double fTime )
+    throw (uno::RuntimeException)
+{
+    if( mpPlaybin ) {
+        gint64 gst_position = llround (fTime * 1E9);
+
+        gst_element_seek( mpPlaybin, 1.0,
+                          GST_FORMAT_TIME,
+                          GST_SEEK_FLAG_FLUSH,
+                          GST_SEEK_TYPE_SET, gst_position,
+                          GST_SEEK_TYPE_NONE, 0 );
+        if( !isPlaying() )
+            gst_element_set_state( mpPlaybin, GST_STATE_PAUSED );
+
+        DBG( "seek to: %lld ns original: %lf s", gst_position, fTime );
+    }
+}
+
+// ------------------------------------------------------------------------------
+
+double SAL_CALL Player::getMediaTime(  )
+    throw (uno::RuntimeException)
+{
+    double position = 0.0;
+
+    if( mpPlaybin ) {
+        // get current position in the stream
+        GstFormat format = GST_FORMAT_TIME;
+        gint64 gst_position;
+        if( gst_element_query_position( mpPlaybin, &format, &gst_position ) && format == GST_FORMAT_TIME && gst_position > 0L )
+            position = gst_position / 1E9;
+    }
+    
+    return position; 
+}
+
+// ------------------------------------------------------------------------------
+
+void SAL_CALL Player::setStopTime( double fTime )
+    throw (uno::RuntimeException)
+{
+    // TODO implement
+}
+
+// ------------------------------------------------------------------------------
+
+double SAL_CALL Player::getStopTime(  )
+    throw (uno::RuntimeException)
+{
+    // Get the time at which to stop
+
+    return 0; 
+}
+
+// ------------------------------------------------------------------------------
+
+void SAL_CALL Player::setRate( double fRate )
+    throw (uno::RuntimeException)
+{
+    // TODO set the window rate
+}
+
+// ------------------------------------------------------------------------------
+
+double SAL_CALL Player::getRate(  )
+    throw (uno::RuntimeException)
+{
+    double rate = 0.0;
+
+    // TODO get the window rate
+    if( mbInitialized )
+    {
+        
+    }
+    
+    return rate;
+}
+
+// ------------------------------------------------------------------------------
+
+void SAL_CALL Player::setPlaybackLoop( sal_Bool bSet )
+    throw (uno::RuntimeException)
+{
+    // TODO check how to do with GST
+    mbLooping = bSet;
+}
+
+// ------------------------------------------------------------------------------
+
+sal_Bool SAL_CALL Player::isPlaybackLoop(  )
+    throw (uno::RuntimeException)
+{
+    // TODO check how to do with GST
+    return mbLooping;
+}
+
+// ------------------------------------------------------------------------------
+
+void SAL_CALL Player::setMute( sal_Bool bSet )
+    throw (uno::RuntimeException)
+{
+    DBG( "set mute: %d muted: %d unmuted volume: %lf", bSet, mbMuted, mnUnmutedVolume );
+
+    // change the volume to 0 or the unmuted volume
+    if(  mpPlaybin && mbMuted != bSet )
+    {
+        double nVolume = mnUnmutedVolume;
+        if( bSet )
+        {
+            nVolume = 0.0;
+        }
+
+        g_object_set( G_OBJECT( mpPlaybin ), "volume", nVolume, NULL );
+
+        mbMuted = bSet;
+    }
+}
+
+// ------------------------------------------------------------------------------
+
+sal_Bool SAL_CALL Player::isMute(  )
+    throw (uno::RuntimeException)
+{
+    return mbMuted;
+}
+
+// ------------------------------------------------------------------------------
+
+void SAL_CALL Player::setVolumeDB( sal_Int16 nVolumeDB ) 
+    throw (uno::RuntimeException)
+{
+    mnUnmutedVolume = pow( 10.0, nVolumeDB / 20.0 );
+
+    DBG( "set volume: %d gst volume: %lf", nVolumeDB, mnUnmutedVolume );
+
+    // change volume
+     if( !mbMuted && mpPlaybin )
+     {
+         g_object_set( G_OBJECT( mpPlaybin ), "volume", (gdouble) mnUnmutedVolume, NULL );
+     }
+}
+
+// ------------------------------------------------------------------------------
+    
+sal_Int16 SAL_CALL Player::getVolumeDB(  ) 
+    throw (uno::RuntimeException)
+{
+    sal_Int16 nVolumeDB;
+
+    if( mpPlaybin ) {
+        double nGstVolume = 0.0;
+
+        g_object_get( G_OBJECT( mpPlaybin ), "volume", &nGstVolume, NULL );
+
+        nVolumeDB = (sal_Int16) ( 20.0*log10 ( nGstVolume ) );
+
+        //DBG( "get volume: %d gst volume: %lf", nVolumeDB, nGstVolume );
+    }
+
+    return nVolumeDB;
+}
+
+// ------------------------------------------------------------------------------
+
+awt::Size SAL_CALL Player::getPreferredPlayerWindowSize(  )
+    throw (uno::RuntimeException)
+{
+    awt::Size aSize( 0, 0 );
+    
+    DBG( "%p Player::getPreferredPlayerWindowSize, member %d x %d", this, mnWidth, mnHeight );
+
+    TimeValue aTimeout = { 10, 0 };
+    oslConditionResult aResult = osl_waitCondition( maSizeCondition, &aTimeout );
+
+    if( mbFakeVideo ) {
+        mbFakeVideo = sal_False;
+
+         g_object_set( G_OBJECT( mpPlaybin ), "video-sink", NULL, NULL );
+         gst_element_set_state( mpPlaybin, GST_STATE_READY );
+         gst_element_set_state( mpPlaybin, GST_STATE_PAUSED );
+    }
+
+    DBG( "%p Player::getPreferredPlayerWindowSize after waitCondition %d, member %d x %d", this, aResult, mnWidth, mnHeight );
+
+    if( mnWidth != 0 && mnHeight != 0 ) {
+        aSize.Width = mnWidth;
+        aSize.Height = mnHeight;
+    }
+
+    return aSize;
+}
+
+// ------------------------------------------------------------------------------
+
+uno::Reference< ::media::XPlayerWindow > SAL_CALL Player::createPlayerWindow( const uno::Sequence< uno::Any >& rArguments )
+    throw (uno::RuntimeException)
+{
+    uno::Reference< ::media::XPlayerWindow >    xRet;
+    awt::Size                                   aSize( getPreferredPlayerWindowSize() );
+
+    DBG( "Player::createPlayerWindow %d %d length: %d", aSize.Width, aSize.Height, rArguments.getLength() );
+
+    if( aSize.Width > 0 && aSize.Height > 0 )
+    {
+        ::avmedia::gstreamer::Window* pWindow = new ::avmedia::gstreamer::Window( mxMgr, *this );
+
+        xRet = pWindow;
+
+        if( rArguments.getLength() > 2 ) {
+            rArguments[ 2 ] >>= mnWindowID;
+            DBG( "window ID: %ld", mnWindowID );
+        }
+
+        //if( !pWindow->create( aArguments ) )
+        //xRet = uno::Reference< ::media::XPlayerWindow >();
+    }
+
+    return xRet;
+}
+
+// ------------------------------------------------------------------------------
+
+uno::Reference< media::XFrameGrabber > SAL_CALL Player::createFrameGrabber(  )
+    throw (uno::RuntimeException)
+{
+    uno::Reference< media::XFrameGrabber > xRet;
+
+    /*if( maURL.getLength() > 0 )
+    {
+        FrameGrabber* pGrabber = new FrameGrabber( mxMgr );
+        
+        xRet = pGrabber;
+        
+        if( !pGrabber->create( maURL ) )
+            xRet.clear();
+            }*/
+    
+    return xRet;
+}
+
+// ------------------------------------------------------------------------------
+
+::rtl::OUString SAL_CALL Player::getImplementationName(  )
+    throw (uno::RuntimeException)
+{
+    return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( AVMEDIA_GST_PLAYER_IMPLEMENTATIONNAME ) );
+}
+
+// ------------------------------------------------------------------------------
+
+sal_Bool SAL_CALL Player::supportsService( const ::rtl::OUString& ServiceName )
+    throw (uno::RuntimeException)
+{
+    return ServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( AVMEDIA_GST_PLAYER_SERVICENAME ) );
+}
+
+// ------------------------------------------------------------------------------
+
+uno::Sequence< ::rtl::OUString > SAL_CALL Player::getSupportedServiceNames(  )
+    throw (uno::RuntimeException)
+{
+    uno::Sequence< ::rtl::OUString > aRet(1);
+    aRet[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( AVMEDIA_GST_PLAYER_SERVICENAME ) );
+
+    return aRet;
+}
+
+} // namespace gstreamer
+} // namespace avmedia
--- /dev/null	2006-09-07 16:53:33.000000000 +0200
+++ avmedia/source/gstreamer/gstplayer.hxx	2006-09-22 13:39:21.000000000 +0200
@@ -0,0 +1,120 @@
+/*************************************************************************
+ *
+ *  OpenOffice.org - a multi-platform office productivity suite
+ *
+ *  $RCSfile$
+ *
+ *  $Revision: 7690 $
+ *
+ *  last change: $Author: rodo $ $Date: 2006-09-22 13:53:20 +0100 (Fri, 22 Sep 2006) $
+ *
+ *  The Contents of this file are made available subject to
+ *  the terms of GNU Lesser General Public License Version 2.1.
+ *
+ *
+ *    GNU Lesser General Public License Version 2.1
+ *    =============================================
+ *    Copyright 2005 by Sun Microsystems, Inc.
+ *    901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ *    This library is free software; you can redistribute it and/or
+ *    modify it under the terms of the GNU Lesser General Public
+ *    License version 2.1, as published by the Free Software Foundation.
+ *
+ *    This library is distributed in the hope that it will be useful,
+ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *    Lesser General Public License for more details.
+ *
+ *    You should have received a copy of the GNU Lesser General Public
+ *    License along with this library; if not, write to the Free Software
+ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ *    MA  02111-1307  USA
+ *
+ ************************************************************************/
+
+#ifndef _PLAYER_HXX
+#define _PLAYER_HXX
+
+#include <osl/conditn.h>
+#include "gstcommon.hxx"
+
+#ifndef _COM_SUN_STAR_MEDIA_XPLAYER_HDL_
+#include "com/sun/star/media/XPlayer.hdl"
+#endif
+
+typedef struct _GstXOverlay GstXOverlay;
+
+namespace avmedia { namespace gstreamer {
+
+// ----------
+// - Player -
+// ----------
+
+class Player : public ::cppu::WeakImplHelper2< ::com::sun::star::media::XPlayer,
+                                               ::com::sun::star::lang::XServiceInfo >
+{
+public:
+
+    Player( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& rxMgr );
+    ~Player();
+
+    void preparePlaybin( const ::rtl::OUString& rURL, bool bFakeVideo );
+    bool create( const ::rtl::OUString& rURL );
+    void processMessage( GstMessage *message );
+    GstBusSyncReply processSyncMessage( GstMessage *message );
+
+    // XPlayer
+    virtual void SAL_CALL start(  ) throw (::com::sun::star::uno::RuntimeException);
+    virtual void SAL_CALL stop(  ) throw (::com::sun::star::uno::RuntimeException);
+    virtual sal_Bool SAL_CALL isPlaying(  ) throw (::com::sun::star::uno::RuntimeException);
+    virtual double SAL_CALL getDuration(  ) throw (::com::sun::star::uno::RuntimeException);
+    virtual void SAL_CALL setMediaTime( double fTime ) throw (::com::sun::star::uno::RuntimeException);
+    virtual double SAL_CALL getMediaTime(  ) throw (::com::sun::star::uno::RuntimeException);
+    virtual void SAL_CALL setStopTime( double fTime ) throw (::com::sun::star::uno::RuntimeException);
+    virtual double SAL_CALL getStopTime(  ) throw (::com::sun::star::uno::RuntimeException);
+    virtual void SAL_CALL setRate( double fRate ) throw (::com::sun::star::uno::RuntimeException);
+    virtual double SAL_CALL getRate(  ) throw (::com::sun::star::uno::RuntimeException);
+    virtual void SAL_CALL setPlaybackLoop( sal_Bool bSet ) throw (::com::sun::star::uno::RuntimeException);
+    virtual sal_Bool SAL_CALL isPlaybackLoop(  ) throw (::com::sun::star::uno::RuntimeException);
+    virtual void SAL_CALL setMute( sal_Bool bSet ) throw (::com::sun::star::uno::RuntimeException);
+    virtual sal_Bool SAL_CALL isMute(  ) throw (::com::sun::star::uno::RuntimeException);
+    virtual void SAL_CALL setVolumeDB( sal_Int16 nVolumeDB ) throw (::com::sun::star::uno::RuntimeException);
+    virtual sal_Int16 SAL_CALL getVolumeDB(  ) throw (::com::sun::star::uno::RuntimeException);
+    virtual ::com::sun::star::awt::Size SAL_CALL getPreferredPlayerWindowSize(  ) throw (::com::sun::star::uno::RuntimeException);
+    virtual ::com::sun::star::uno::Reference< ::com::sun::star::media::XPlayerWindow > SAL_CALL createPlayerWindow( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments ) throw (::com::sun::star::uno::RuntimeException);
+    virtual ::com::sun::star::uno::Reference< ::com::sun::star::media::XFrameGrabber > SAL_CALL createFrameGrabber(  ) throw (::com::sun::star::uno::RuntimeException);
+
+    // XServiceInfo
+    virtual ::rtl::OUString SAL_CALL getImplementationName(  ) throw (::com::sun::star::uno::RuntimeException);
+    virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException);
+    virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames(  ) throw (::com::sun::star::uno::RuntimeException);
+
+private:
+
+    ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > mxMgr;
+
+    ::rtl::OUString         maURL;
+    
+    // Add elements and pipeline here
+    GstElement*             mpPlaybin;  // the playbin is also a pipeline
+    sal_Bool                mbFakeVideo;
+
+    gdouble                 mnUnmutedVolume;
+    sal_Bool                mbMuted;
+    sal_Bool                mbLooping;
+    sal_Bool                mbInitialized;
+
+    long                    mnWindowID;
+    GstXOverlay*            mpXOverlay;
+    gint64                  mnDuration;
+    int                     mnWidth;
+    int                     mnHeight;
+
+    oslCondition            maSizeCondition;
+};
+
+} // namespace gstreamer
+} // namespace avmedia
+
+#endif // _PLAYER_HXX
--- /dev/null	2006-08-13 17:52:05.000000000 +0200
+++ avmedia/source/gstreamer/gstuno.cxx	2006-08-22 11:38:56.000000000 +0200
@@ -0,0 +1,111 @@
+/*************************************************************************
+ *
+ *  OpenOffice.org - a multi-platform office productivity suite
+ *
+ *  $RCSfile$
+ *
+ *  $Revision: 7654 $
+ *
+ *  last change: $Author: rodo $ $Date: 2006-09-19 09:24:25 +0100 (Tue, 19 Sep 2006) $
+ *
+ *  The Contents of this file are made available subject to
+ *  the terms of GNU Lesser General Public License Version 2.1.
+ *
+ *
+ *    GNU Lesser General Public License Version 2.1
+ *    =============================================
+ *    Copyright 2005 by Sun Microsystems, Inc.
+ *    901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ *    This library is free software; you can redistribute it and/or
+ *    modify it under the terms of the GNU Lesser General Public
+ *    License version 2.1, as published by the Free Software Foundation.
+ *
+ *    This library is distributed in the hope that it will be useful,
+ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *    Lesser General Public License for more details.
+ *
+ *    You should have received a copy of the GNU Lesser General Public
+ *    License along with this library; if not, write to the Free Software
+ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ *    MA  02111-1307  USA
+ *
+ ************************************************************************/
+
+#include "gstmanager.hxx"
+
+using namespace ::com::sun::star;
+
+// -------------------
+// - factory methods -
+// -------------------
+
+static uno::Reference< uno::XInterface > SAL_CALL create_MediaPlayer( const uno::Reference< lang::XMultiServiceFactory >& rxFact )
+{
+	return uno::Reference< uno::XInterface >( *new ::avmedia::gstreamer::Manager( rxFact ) );
+}
+
+// ------------------------------------------
+// - component_getImplementationEnvironment -
+// ------------------------------------------
+
+extern "C" void SAL_CALL component_getImplementationEnvironment( const sal_Char ** ppEnvTypeName, uno_Environment ** ppEnv )
+{
+	*ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
+}
+
+// -----------------------
+// - component_writeInfo -
+// -----------------------
+
+extern "C" sal_Bool SAL_CALL component_writeInfo( void* pServiceManager, void* pRegistryKey )
+{
+	sal_Bool bRet = sal_False;
+
+	if( pRegistryKey )
+	{
+		try
+		{
+			uno::Reference< registry::XRegistryKey > xNewKey1(
+				static_cast< registry::XRegistryKey* >( pRegistryKey )->createKey(                                
+                ::rtl::OUString::createFromAscii( "/com.sun.star.comp.media.Manager_GStreamer/UNO/SERVICES/com.sun.star.media.Manager_GStreamer" ) ) );
+
+			bRet = sal_True;
+		}
+		catch( registry::InvalidRegistryException& )
+		{
+			OSL_ENSURE( sal_False, "### InvalidRegistryException!" );
+		}
+	}
+
+	return bRet;
+}
+
+// ------------------------
+// - component_getFactory -
+// ------------------------
+
+extern "C" void* SAL_CALL component_getFactory( const sal_Char* pImplName, void* pServiceManager, void* pRegistryKey )
+{
+	uno::Reference< lang::XSingleServiceFactory > xFactory;
+	void*									pRet = 0;
+
+	if( rtl_str_compare( pImplName, "com.sun.star.comp.media.Manager_GStreamer" ) == 0 )
+	{
+		const ::rtl::OUString aServiceName( ::rtl::OUString::createFromAscii( "com.sun.star.media.Manager_GStreamer" ) );
+
+		xFactory = uno::Reference< lang::XSingleServiceFactory >( ::cppu::createSingleFactory(
+						reinterpret_cast< lang::XMultiServiceFactory* >( pServiceManager ),
+						::rtl::OUString::createFromAscii( "com.sun.star.comp.media.Manager_GStreamer" ),
+						create_MediaPlayer, uno::Sequence< ::rtl::OUString >( &aServiceName, 1 ) ) );
+	}
+
+	if( xFactory.is() )
+	{
+		xFactory->acquire();
+		pRet = xFactory.get();
+	}
+
+	return pRet;
+}
--- /dev/null	2006-08-13 17:52:05.000000000 +0200
+++ avmedia/source/gstreamer/gstwindow.cxx	2006-08-22 11:38:56.000000000 +0200
@@ -0,0 +1,365 @@
+/*************************************************************************
+ *
+ *  OpenOffice.org - a multi-platform office productivity suite
+ *
+ *  $RCSfile$
+ *
+ *  $Revision: 7654 $
+ *
+ *  last change: $Author: rodo $ $Date: 2006-09-19 09:24:25 +0100 (Tue, 19 Sep 2006) $
+ *
+ *  The Contents of this file are made available subject to
+ *  the terms of GNU Lesser General Public License Version 2.1.
+ *
+ *
+ *    GNU Lesser General Public License Version 2.1
+ *    =============================================
+ *    Copyright 2005 by Sun Microsystems, Inc.
+ *    901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ *    This library is free software; you can redistribute it and/or
+ *    modify it under the terms of the GNU Lesser General Public
+ *    License version 2.1, as published by the Free Software Foundation.
+ *
+ *    This library is distributed in the hope that it will be useful,
+ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *    Lesser General Public License for more details.
+ *
+ *    You should have received a copy of the GNU Lesser General Public
+ *    License along with this library; if not, write to the Free Software
+ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ *    MA  02111-1307  USA
+ *
+ ************************************************************************/
+
+#include <com/sun/star/awt/SystemPointer.hdl>
+
+#include "gstwindow.hxx"
+#include "gstplayer.hxx"
+
+#define AVMEDIA_GST_WINDOW_IMPLEMENTATIONNAME "com.sun.star.comp.avmedia.Window_GStreamer"
+#define AVMEDIA_GST_WINDOW_SERVICENAME "com.sun.star.media.Window_GStreamer"
+
+using namespace ::com::sun::star;
+
+namespace avmedia { namespace gstreamer {
+
+// -----------
+// - statics -
+// -----------
+
+static ::osl::Mutex& ImplGetOwnStaticMutex()
+{
+    static ::osl::Mutex* pMutex = NULL;
+
+    if( pMutex == NULL )
+    {
+        ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
+
+        if( pMutex == NULL )
+        {
+            static ::osl::Mutex aMutex;
+            pMutex = &aMutex;
+        }
+    }
+
+    return *pMutex;
+}
+
+// ---------------
+// - Window -
+// ---------------
+
+// ------------------------------------------------------------------------------
+
+Window::Window( const uno::Reference< lang::XMultiServiceFactory >& rxMgr, Player& rPlayer ) :
+    mxMgr( rxMgr ),
+    maListeners( maMutex ),
+    meZoomLevel( media::ZoomLevel_NOT_AVAILABLE ),
+    mrPlayer( rPlayer ),
+    mnPointerType( awt::SystemPointer::ARROW )
+{
+    ::osl::MutexGuard aGuard( ImplGetOwnStaticMutex() );
+
+}
+
+// ------------------------------------------------------------------------------
+
+Window::~Window()
+{
+}
+
+// XPlayerWindow
+// ------------------------------------------------------------------------------
+
+void SAL_CALL Window::update(  )
+    throw (uno::RuntimeException)
+{
+    //::RedrawWindow( (HWND) mnFrameWnd, NULL, NULL, RDW_ALLCHILDREN | RDW_INVALIDATE | RDW_UPDATENOW | RDW_ERASE  );
+}
+
+// ------------------------------------------------------------------------------
+
+sal_Bool SAL_CALL Window::setZoomLevel( media::ZoomLevel eZoomLevel )
+    throw (uno::RuntimeException)
+{
+        sal_Bool bRet = false;
+
+        if( media::ZoomLevel_NOT_AVAILABLE != meZoomLevel &&
+            media::ZoomLevel_NOT_AVAILABLE != eZoomLevel )
+        {
+            if( eZoomLevel != meZoomLevel )
+            {
+                meZoomLevel = eZoomLevel;
+                //ImplLayoutVideoWindow();
+            }
+
+            bRet = true;
+        }
+
+        return bRet;
+}
+
+// ------------------------------------------------------------------------------
+
+media::ZoomLevel SAL_CALL Window::getZoomLevel(  )
+    throw (uno::RuntimeException)
+{
+    return meZoomLevel;
+}
+
+// ------------------------------------------------------------------------------
+
+void SAL_CALL Window::setPointerType( sal_Int32 nPointerType ) 
+    throw (uno::RuntimeException)
+{
+    mnPointerType = nPointerType;
+}
+
+// XWindow
+// ------------------------------------------------------------------------------
+
+void SAL_CALL Window::setPosSize( sal_Int32 X, sal_Int32 Y, sal_Int32 Width, sal_Int32 Height, sal_Int16 Flags )
+    throw (uno::RuntimeException)
+{
+//     if( mnFrameWnd )
+//     {
+//         ::SetWindowPos( (HWND) mnFrameWnd, HWND_TOP, X, Y, Width, Height, 0 );
+//         ImplLayoutVideoWindow();
+//     }
+}
+
+// ------------------------------------------------------------------------------
+
+awt::Rectangle SAL_CALL Window::getPosSize()
+    throw (uno::RuntimeException)
+{
+    awt::Rectangle aRet;
+
+    aRet.X = aRet.Y = 0;
+    aRet.Width = 320;
+    aRet.Height = 240;
+
+//     if( mnFrameWnd )
+//     {
+//         ::RECT  aWndRect;
+//         long    nX = 0, nY = 0, nWidth = 0, nHeight = 0;
+
+//         if( ::GetClientRect( (HWND) mnFrameWnd, &aWndRect ) )
+//         {
+//             aRet.X = aWndRect.left;
+//             aRet.Y = aWndRect.top;
+//             aRet.Width = aWndRect.right - aWndRect.left + 1;
+//             aRet.Height = aWndRect.bottom - aWndRect.top + 1;
+//         }
+//     }
+
+    return aRet;
+}
+
+// ------------------------------------------------------------------------------
+
+void SAL_CALL Window::setVisible( sal_Bool bVisible )
+    throw (uno::RuntimeException)
+{
+//     if( mnFrameWnd )
+//     {
+//         IVideoWindow* pVideoWindow = const_cast< IVideoWindow* >( mrPlayer.getVideoWindow() );
+
+//         if( pVideoWindow )
+//             pVideoWindow->put_Visible( bVisible ? OATRUE : OAFALSE );
+
+//         ::ShowWindow( (HWND) mnFrameWnd, bVisible ? SW_SHOW : SW_HIDE );
+//     }
+}
+
+// ------------------------------------------------------------------------------
+
+void SAL_CALL Window::setEnable( sal_Bool bEnable )
+    throw (uno::RuntimeException)
+{
+//     if( mnFrameWnd )
+//         ::EnableWindow( (HWND) mnFrameWnd, bEnable );
+}
+
+// ------------------------------------------------------------------------------
+
+void SAL_CALL Window::setFocus(  )
+    throw (uno::RuntimeException)
+{
+//     if( mnFrameWnd )
+//         ::SetFocus( (HWND) mnFrameWnd );
+}
+
+// ------------------------------------------------------------------------------
+
+void SAL_CALL Window::addWindowListener( const uno::Reference< awt::XWindowListener >& xListener )
+    throw (uno::RuntimeException)
+{
+    maListeners.addInterface( getCppuType( &xListener ), xListener );
+}
+
+// ------------------------------------------------------------------------------
+
+void SAL_CALL Window::removeWindowListener( const uno::Reference< awt::XWindowListener >& xListener )
+    throw (uno::RuntimeException)
+{
+    maListeners.removeInterface( getCppuType( &xListener ), xListener );
+}
+
+// ------------------------------------------------------------------------------
+
+void SAL_CALL Window::addFocusListener( const uno::Reference< awt::XFocusListener >& xListener )
+    throw (uno::RuntimeException)
+{
+    maListeners.addInterface( getCppuType( &xListener ), xListener );
+}
+
+// ------------------------------------------------------------------------------
+
+void SAL_CALL Window::removeFocusListener( const uno::Reference< awt::XFocusListener >& xListener )
+    throw (uno::RuntimeException)
+{
+    maListeners.removeInterface( getCppuType( &xListener ), xListener );
+}
+
+// ------------------------------------------------------------------------------
+
+void SAL_CALL Window::addKeyListener( const uno::Reference< awt::XKeyListener >& xListener )
+    throw (uno::RuntimeException)
+{
+    maListeners.addInterface( getCppuType( &xListener ), xListener );
+}
+
+// ------------------------------------------------------------------------------
+
+void SAL_CALL Window::removeKeyListener( const uno::Reference< awt::XKeyListener >& xListener )
+    throw (uno::RuntimeException)
+{
+    maListeners.removeInterface( getCppuType( &xListener ), xListener );
+}
+
+// ------------------------------------------------------------------------------
+
+void SAL_CALL Window::addMouseListener( const uno::Reference< awt::XMouseListener >& xListener )
+    throw (uno::RuntimeException)
+{
+    maListeners.addInterface( getCppuType( &xListener ), xListener );
+}
+
+// ------------------------------------------------------------------------------
+
+void SAL_CALL Window::removeMouseListener( const uno::Reference< awt::XMouseListener >& xListener )
+    throw (uno::RuntimeException)
+{
+    maListeners.removeInterface( getCppuType( &xListener ), xListener );
+}
+
+// ------------------------------------------------------------------------------
+
+void SAL_CALL Window::addMouseMotionListener( const uno::Reference< awt::XMouseMotionListener >& xListener )
+    throw (uno::RuntimeException)
+{
+    maListeners.addInterface( getCppuType( &xListener ), xListener );
+}
+
+// ------------------------------------------------------------------------------
+
+void SAL_CALL Window::removeMouseMotionListener( const uno::Reference< awt::XMouseMotionListener >& xListener )
+    throw (uno::RuntimeException)
+{
+    maListeners.removeInterface( getCppuType( &xListener ), xListener );
+}
+
+// ------------------------------------------------------------------------------
+
+void SAL_CALL Window::addPaintListener( const uno::Reference< awt::XPaintListener >& xListener )
+    throw (uno::RuntimeException)
+{
+    maListeners.addInterface( getCppuType( &xListener ), xListener );
+}
+
+// ------------------------------------------------------------------------------
+
+void SAL_CALL Window::removePaintListener( const uno::Reference< awt::XPaintListener >& xListener )
+    throw (uno::RuntimeException)
+{
+    maListeners.removeInterface( getCppuType( &xListener ), xListener );
+}
+
+
+// XComponent
+// ------------------------------------------------------------------------------
+
+void SAL_CALL Window::dispose(  )
+    throw (uno::RuntimeException)
+{
+}
+
+// ------------------------------------------------------------------------------
+
+void SAL_CALL Window::addEventListener( const uno::Reference< lang::XEventListener >& xListener )
+    throw (uno::RuntimeException)
+{
+    maListeners.addInterface( getCppuType( &xListener ), xListener );
+}
+
+// ------------------------------------------------------------------------------
+
+void SAL_CALL Window::removeEventListener( const uno::Reference< lang::XEventListener >& xListener )
+    throw (uno::RuntimeException)
+{
+    maListeners.removeInterface( getCppuType( &xListener ), xListener );
+}
+
+// XServiceInfo
+// ------------------------------------------------------------------------------
+
+::rtl::OUString SAL_CALL Window::getImplementationName(  )
+    throw (uno::RuntimeException)
+{
+    return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( AVMEDIA_GST_WINDOW_IMPLEMENTATIONNAME ) );
+}
+
+// ------------------------------------------------------------------------------
+
+sal_Bool SAL_CALL Window::supportsService( const ::rtl::OUString& ServiceName )
+    throw (uno::RuntimeException)
+{
+    return ServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( AVMEDIA_GST_WINDOW_SERVICENAME ) );
+}
+
+// ------------------------------------------------------------------------------
+
+uno::Sequence< ::rtl::OUString > SAL_CALL Window::getSupportedServiceNames(  )
+    throw (uno::RuntimeException)
+{
+    uno::Sequence< ::rtl::OUString > aRet(1);
+    aRet[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( AVMEDIA_GST_WINDOW_SERVICENAME ) );
+
+    return aRet;
+}
+
+} // namespace gstreamer
+} // namespace avmedia
--- /dev/null	2006-08-13 17:52:05.000000000 +0200
+++ avmedia/source/gstreamer/gstwindow.hxx	2006-08-22 11:38:56.000000000 +0200
@@ -0,0 +1,119 @@
+/*************************************************************************
+ *
+ *  OpenOffice.org - a multi-platform office productivity suite
+ *
+ *  $RCSfile$
+ *
+ *  $Revision: 7654 $
+ *
+ *  last change: $Author: rodo $ $Date: 2006-09-19 09:24:25 +0100 (Tue, 19 Sep 2006) $
+ *
+ *  The Contents of this file are made available subject to
+ *  the terms of GNU Lesser General Public License Version 2.1.
+ *
+ *
+ *    GNU Lesser General Public License Version 2.1
+ *    =============================================
+ *    Copyright 2005 by Sun Microsystems, Inc.
+ *    901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ *    This library is free software; you can redistribute it and/or
+ *    modify it under the terms of the GNU Lesser General Public
+ *    License version 2.1, as published by the Free Software Foundation.
+ *
+ *    This library is distributed in the hope that it will be useful,
+ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *    Lesser General Public License for more details.
+ *
+ *    You should have received a copy of the GNU Lesser General Public
+ *    License along with this library; if not, write to the Free Software
+ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ *    MA  02111-1307  USA
+ *
+ ************************************************************************/
+
+#ifndef _WINDOW_HXX
+#define _WINDOW_HXX
+
+#include "gstcommon.hxx"
+#include <cppuhelper/interfacecontainer.h>
+
+#ifndef _COM_SUN_STAR_MEDIA_XPLAYERWINDOW_HDL_
+#include "com/sun/star/media/XPlayerWindow.hdl"
+#endif
+
+namespace avmedia { namespace gstreamer {
+
+// ---------------
+// - Window -
+// ---------------
+
+class Player;
+
+class Window : public ::cppu::WeakImplHelper2 < ::com::sun::star::media::XPlayerWindow,
+                                                ::com::sun::star::lang::XServiceInfo >
+{
+public:
+
+            Window( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& rxMgr,
+                    Player& rPlayer );
+            ~Window();
+
+    bool    create( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments );
+    void    processGraphEvent();
+    void    updatePointer();
+
+    // XPlayerWindow
+    virtual void SAL_CALL update(  ) throw (::com::sun::star::uno::RuntimeException);
+    virtual sal_Bool SAL_CALL setZoomLevel( ::com::sun::star::media::ZoomLevel ZoomLevel ) throw (::com::sun::star::uno::RuntimeException);
+    virtual ::com::sun::star::media::ZoomLevel SAL_CALL getZoomLevel(  ) throw (::com::sun::star::uno::RuntimeException);
+    virtual void SAL_CALL setPointerType( sal_Int32 nPointerType ) throw (::com::sun::star::uno::RuntimeException);
+
+    // XWindow
+    virtual void SAL_CALL setPosSize( sal_Int32 X, sal_Int32 Y, sal_Int32 Width, sal_Int32 Height, sal_Int16 Flags ) throw (::com::sun::star::uno::RuntimeException);
+    virtual ::com::sun::star::awt::Rectangle SAL_CALL getPosSize(  ) throw (::com::sun::star::uno::RuntimeException);
+    virtual void SAL_CALL setVisible( sal_Bool Visible ) throw (::com::sun::star::uno::RuntimeException);
+    virtual void SAL_CALL setEnable( sal_Bool Enable ) throw (::com::sun::star::uno::RuntimeException);
+    virtual void SAL_CALL setFocus(  ) throw (::com::sun::star::uno::RuntimeException);
+    virtual void SAL_CALL addWindowListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
+    virtual void SAL_CALL removeWindowListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
+    virtual void SAL_CALL addFocusListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XFocusListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
+    virtual void SAL_CALL removeFocusListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XFocusListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
+    virtual void SAL_CALL addKeyListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XKeyListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
+    virtual void SAL_CALL removeKeyListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XKeyListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
+    virtual void SAL_CALL addMouseListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XMouseListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
+    virtual void SAL_CALL removeMouseListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XMouseListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
+    virtual void SAL_CALL addMouseMotionListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XMouseMotionListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
+    virtual void SAL_CALL removeMouseMotionListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XMouseMotionListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
+    virtual void SAL_CALL addPaintListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XPaintListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
+    virtual void SAL_CALL removePaintListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XPaintListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
+
+    // XComponent
+    virtual void SAL_CALL dispose(  ) throw (::com::sun::star::uno::RuntimeException);
+    virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
+    virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& aListener ) throw (::com::sun::star::uno::RuntimeException);
+
+    // XServiceInfo
+    virtual ::rtl::OUString SAL_CALL getImplementationName(  ) throw (::com::sun::star::uno::RuntimeException);
+    virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException);
+    virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames(  ) throw (::com::sun::star::uno::RuntimeException);
+
+
+private:
+
+    ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > mxMgr;
+
+    ::osl::Mutex                                maMutex;
+    ::cppu::OMultiTypeInterfaceContainerHelper  maListeners;
+    ::com::sun::star::media::ZoomLevel          meZoomLevel;
+    Player&                                     mrPlayer;
+    int                                         mnPointerType;
+
+    void                                        ImplLayoutVideoWindow();
+};
+
+} // namespace gstreamer
+} // namespace avmedia
+
+#endif // _WINDOW_HXX
--- /dev/null	2006-08-13 17:52:05.000000000 +0200
+++ avmedia/source/gstreamer/makefile.mk	2006-08-22 11:38:56.000000000 +0200
@@ -0,0 +1,85 @@
+#*************************************************************************
+#
+#   OpenOffice.org - a multi-platform office productivity suite
+#
+#   $RCSfile$
+#
+#   $Revision: 7654 $
+#
+#   last change: $Author: rodo $ $Date: 2006-09-19 09:24:25 +0100 (Tue, 19 Sep 2006) $
+#
+#   The Contents of this file are made available subject to
+#   the terms of GNU Lesser General Public License Version 2.1.
+#
+#
+#     GNU Lesser General Public License Version 2.1
+#     =============================================
+#     Copyright 2005 by Sun Microsystems, Inc.
+#     901 San Antonio Road, Palo Alto, CA 94303, USA
+#
+#     This library is free software; you can redistribute it and/or
+#     modify it under the terms of the GNU Lesser General Public
+#     License version 2.1, as published by the Free Software Foundation.
+#
+#     This library is distributed in the hope that it will be useful,
+#     but WITHOUT ANY WARRANTY; without even the implied warranty of
+#     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+#     Lesser General Public License for more details.
+#
+#     You should have received a copy of the GNU Lesser General Public
+#     License along with this library; if not, write to the Free Software
+#     Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+#     MA  02111-1307  USA
+#
+#*************************************************************************
+
+PRJ=..$/..
+PRJNAME=avmedia
+TARGET=avmediagst
+
+# --- Settings ----------------------------------
+
+.INCLUDE :  	settings.mk
+
+.IF "$(ENABLE_GSTREAMER)" == "TRUE"
+
+.IF "$(verbose)"!="" || "$(VERBOSE)"!=""
+CDEFS+= -DVERBOSE
+.ENDIF
+
+PKGCONFIG_MODULES=gstreamer-0.10, gstreamer-plugins-base-0.10
+.INCLUDE: pkg_config.mk
+PKGCONFIG_LIBS+=-lgstinterfaces-0.10
+
+# --- Files ----------------------------------
+
+.IF "$(GUI)" == "UNX" || "$(GUI)" == "WNT"
+
+.IF "$(GUI)" == "WNT"
+CDEFS+= -DWINNT
+.ENDIF
+
+SLOFILES= \
+		$(SLO)$/gstuno.obj      \
+		$(SLO)$/gstmanager.obj  \
+		$(SLO)$/gstplayer.obj	\
+		$(SLO)$/gstwindow.obj
+        
+
+EXCEPTIONSFILES= \
+		$(SLO)$/gstuno.obj      \
+
+SHL1TARGET=$(TARGET)
+SHL1STDLIBS= $(CPPULIB) $(SALLIB) $(COMPHELPERLIB) $(CPPUHELPERLIB) $(PKGCONFIG_LIBS) $(TOOLSLIB)
+SHL1IMPLIB=i$(TARGET)
+SHL1LIBS=$(SLB)$/$(TARGET).lib
+SHL1DEF=$(MISC)$/$(SHL1TARGET).def
+
+DEF1NAME=$(SHL1TARGET)
+DEF1EXPORTFILE=exports.dxp
+
+.ENDIF
+
+.ENDIF
+
+.INCLUDE :  	target.mk
Index: com/sun/star/wizards/letter/LocaleCodes.java
===================================================================
RCS file: /cvs/installation/wizards/com/sun/star/wizards/letter/LocaleCodes.java,v
retrieving revision 1.5
diff -u -r1.5 LocaleCodes.java
--- wizards.orig/com/sun/star/wizards/letter/LocaleCodes.java	23 Nov 2007 16:52:56 -0000	1.5
+++ wizards/com/sun/star/wizards/letter/LocaleCodes.java	5 Feb 2008 08:57:11 -0000
@@ -45,7 +45,7 @@
     public LocaleCodes(XMultiServiceFactory xmsf)
     {
         super(xmsf, UNIT_NAME, MODULE_NAME);
-        allLanguageStrings = getStringList(16300);  // STR_ARR_SVT_LANGUAGE_TABLE from svtools/source/misc/langtab.src
+        allLanguageStrings = getStringList(16302);  // STR_ARR_SVT_LANGUAGE_TABLE from svtools/source/misc/langtab.src
     }
 
     public String getLanguageString(String MSID)
diff -ru /usr/src/redhat/BUILD/OOF680_m18/avmedia/source/gstreamer/gstplayer.cxx source/gstreamer/gstplayer.cxx
--- avmedia.orig/source/gstreamer/gstplayer.cxx	2007-08-07 19:50:02.000000000 +0100
+++ avmedia/source/gstreamer/gstplayer.cxx	2007-08-07 17:14:52.000000000 +0100
@@ -67,6 +67,7 @@
     mpPlaybin( NULL ),
     mbFakeVideo (sal_False ),
     mnUnmutedVolume( 0 ),
+    mbPlayPending ( false ),
     mbMuted( false ),
     mbLooping( false ),
     mbInitialized( false ),
@@ -140,6 +141,7 @@
     case GST_MESSAGE_EOS:
         //DBG( "EOS, reset state to NULL" );
         gst_element_set_state( mpPlaybin, GST_STATE_READY );
+        mbPlayPending = false;
         break;
     case GST_MESSAGE_STATE_CHANGED:
         if( message->src == GST_OBJECT( mpPlaybin ) ) {
@@ -151,6 +153,9 @@
                 pendingstate == GST_STATE_VOID_PENDING &&
                 mpXOverlay )
                 gst_x_overlay_expose( mpXOverlay );
+
+	    if (mbPlayPending)
+	        mbPlayPending = ((newstate == GST_STATE_READY) || (newstate == GST_STATE_PAUSED));
         }
     default:
         break;
@@ -250,6 +255,7 @@
 
         if( mpPlaybin != NULL ) {
             gst_element_set_state( mpPlaybin, GST_STATE_NULL );
+            mbPlayPending = false;
             g_object_unref( mpPlaybin );
         }
 
@@ -281,6 +287,7 @@
         preparePlaybin( rURL, true );
 
         gst_element_set_state( mpPlaybin, GST_STATE_PAUSED );
+        mbPlayPending = false;
 
         bRet = true;
     }
@@ -305,6 +312,7 @@
     if( mbInitialized && NULL != mpPlaybin )
     {
         gst_element_set_state( mpPlaybin, GST_STATE_PLAYING );
+        mbPlayPending = true;
     }
 }
 
@@ -317,6 +325,7 @@
     if( mpPlaybin )
         gst_element_set_state( mpPlaybin, GST_STATE_PAUSED );
 
+    mbPlayPending = false;
     DBG( "stop %p", mpPlaybin );
 }
 
@@ -325,10 +334,10 @@
 sal_Bool SAL_CALL Player::isPlaying()
     throw (uno::RuntimeException)
 {
-    bool            bRet = false;
+    bool            bRet = mbPlayPending;
 
     // return whether the pipeline is in PLAYING STATE or not
-    if( mbInitialized && mpPlaybin )
+    if( !mbPlayPending && mbInitialized && mpPlaybin )
     {
         bRet = GST_STATE_PLAYING == GST_STATE( mpPlaybin );
     }
diff -ru /usr/src/redhat/BUILD/OOF680_m18/avmedia/source/gstreamer/gstplayer.hxx source/gstreamer/gstplayer.hxx
--- avmedia.orig/source/gstreamer/gstplayer.hxx	2007-08-07 19:50:02.000000000 +0100
+++ avmedia/source/gstreamer/gstplayer.hxx	2007-08-07 10:30:45.000000000 +0100
@@ -101,6 +101,7 @@
     sal_Bool                mbFakeVideo;
 
     gdouble                 mnUnmutedVolume;
+	sal_Bool				mbPlayPending;
     sal_Bool                mbMuted;
     sal_Bool                mbLooping;
     sal_Bool                mbInitialized;
diff -ru avmedia.orig/source/gstreamer/gstplayer.cxx avmedia/source/gstreamer/gstplayer.cxx
--- avmedia.orig/source/gstreamer/gstplayer.cxx	2009-04-28 08:28:19.000000000 +0100
+++ avmedia/source/gstreamer/gstplayer.cxx	2009-04-28 09:11:50.000000000 +0100
@@ -142,6 +142,8 @@
         //DBG( "EOS, reset state to NULL" );
         gst_element_set_state( mpPlaybin, GST_STATE_READY );
         mbPlayPending = false;
+        if (mbLooping)
+            start();
         break;
     case GST_MESSAGE_STATE_CHANGED:
         if( message->src == GST_OBJECT( mpPlaybin ) ) {