summaryrefslogtreecommitdiff
path: root/avmedia
diff options
context:
space:
mode:
Diffstat (limited to 'avmedia')
-rw-r--r--avmedia/inc/avmedia/mediaitem.hxx6
-rw-r--r--avmedia/inc/avmedia/mediaplayer.hxx2
-rw-r--r--avmedia/inc/avmedia/mediatoolbox.hxx4
-rw-r--r--avmedia/inc/avmedia/mediawindow.hxx1
-rwxr-xr-x[-rw-r--r--]avmedia/inc/helpids.hrc26
-rw-r--r--avmedia/prj/build.lst7
-rw-r--r--avmedia/prj/d.lst5
-rwxr-xr-x[-rw-r--r--]avmedia/source/framework/makefile.mk0
-rw-r--r--avmedia/source/framework/mediacontrol.cxx16
-rwxr-xr-x[-rw-r--r--]avmedia/source/framework/mediacontrol.hrc2
-rw-r--r--avmedia/source/framework/mediacontrol.src66
-rw-r--r--avmedia/source/framework/mediaitem.cxx6
-rw-r--r--avmedia/source/framework/mediaplayer.cxx2
-rw-r--r--avmedia/source/framework/mediatoolbox.cxx4
-rw-r--r--avmedia/source/framework/soundhandler.cxx41
-rw-r--r--avmedia/source/framework/soundhandler.hxx1
-rwxr-xr-x[-rw-r--r--]avmedia/source/framework/soundhandler.xml0
-rw-r--r--avmedia/source/gstreamer/ChangeLog112
-rw-r--r--avmedia/source/gstreamer/avmediagstreamer.component6
-rwxr-xr-x[-rw-r--r--]avmedia/source/gstreamer/exports.dxp1
-rw-r--r--avmedia/source/gstreamer/gstframegrabber.cxx3
-rw-r--r--avmedia/source/gstreamer/gstmanager.cxx2
-rw-r--r--avmedia/source/gstreamer/gstplayer.cxx49
-rw-r--r--avmedia/source/gstreamer/gstuno.cxx39
-rw-r--r--avmedia/source/gstreamer/gstwindow.cxx40
-rw-r--r--avmedia/source/gstreamer/gstwindow.hxx1
-rwxr-xr-x[-rw-r--r--]avmedia/source/gstreamer/makefile.mk19
-rw-r--r--avmedia/source/inc/mediamisc.hxx24
-rwxr-xr-x[-rw-r--r--]avmedia/source/java/FrameGrabber.java0
-rwxr-xr-x[-rw-r--r--]avmedia/source/java/Manager.java0
-rwxr-xr-x[-rw-r--r--]avmedia/source/java/MediaUno.java9
-rwxr-xr-x[-rw-r--r--]avmedia/source/java/Player.java0
-rwxr-xr-x[-rw-r--r--]avmedia/source/java/PlayerWindow.java4
-rwxr-xr-x[-rw-r--r--]avmedia/source/java/WindowAdapter.java12
-rwxr-xr-x[-rw-r--r--]avmedia/source/java/avmedia.jarbin16420 -> 15776 bytes
-rwxr-xr-xavmedia/source/java/avmedia.jar.component34
-rwxr-xr-x[-rw-r--r--]avmedia/source/java/makefile.mk8
-rwxr-xr-x[-rw-r--r--]avmedia/source/java/manifest0
-rwxr-xr-x[-rw-r--r--]avmedia/source/java/win/SystemWindowAdapter.java0
-rwxr-xr-x[-rw-r--r--]avmedia/source/java/x11/SystemWindowAdapter.java0
-rwxr-xr-xavmedia/source/quicktime/avmediaQuickTime.component34
-rwxr-xr-x[-rw-r--r--]avmedia/source/quicktime/makefile.mk8
-rw-r--r--avmedia/source/quicktime/player.cxx2
-rw-r--r--avmedia/source/quicktime/player.hxx6
-rw-r--r--avmedia/source/quicktime/quicktimecommon.hxx1
-rw-r--r--avmedia/source/quicktime/quicktimeuno.cxx33
-rw-r--r--avmedia/source/quicktime/window.cxx2
-rwxr-xr-x[-rw-r--r--]avmedia/source/viewer/makefile.mk0
-rw-r--r--avmedia/source/viewer/mediaevent_impl.cxx4
-rw-r--r--avmedia/source/viewer/mediawindow.cxx76
-rwxr-xr-x[-rw-r--r--]avmedia/source/viewer/mediawindow.hrc0
-rw-r--r--avmedia/source/viewer/mediawindow_impl.cxx107
-rw-r--r--avmedia/source/viewer/mediawindow_impl.hxx45
-rw-r--r--avmedia/source/viewer/mediawindowbase_impl.cxx16
-rw-r--r--avmedia/source/viewer/mediawindowbase_impl.hxx4
-rwxr-xr-xavmedia/source/win/avmediawin.component34
-rwxr-xr-x[-rw-r--r--]avmedia/source/win/exports.dxp1
-rw-r--r--avmedia/source/win/framegrabber.cxx5
-rw-r--r--avmedia/source/win/interface.hxx6
-rwxr-xr-x[-rw-r--r--]avmedia/source/win/makefile.mk8
-rw-r--r--avmedia/source/win/player.cxx6
-rw-r--r--avmedia/source/win/window.cxx36
-rw-r--r--avmedia/source/win/winuno.cxx33
-rw-r--r--avmedia/source/xine/exports.dxp4
-rw-r--r--avmedia/source/xine/makefile.mk64
-rw-r--r--avmedia/source/xine/manager.cxx94
-rw-r--r--avmedia/source/xine/manager.hxx67
-rw-r--r--avmedia/source/xine/player.cxx265
-rw-r--r--avmedia/source/xine/player.hxx85
-rw-r--r--avmedia/source/xine/window.cxx574
-rw-r--r--avmedia/source/xine/window.hxx115
-rw-r--r--avmedia/source/xine/xinecommon.hxx68
-rw-r--r--avmedia/source/xine/xineuno.cxx109
-rwxr-xr-xavmedia/util/avmedia.component34
-rw-r--r--[-rwxr-xr-x]avmedia/util/hidother.src0
-rwxr-xr-x[-rw-r--r--]avmedia/util/makefile.mk8
76 files changed, 398 insertions, 2108 deletions
diff --git a/avmedia/inc/avmedia/mediaitem.hxx b/avmedia/inc/avmedia/mediaitem.hxx
index 7b80f5899a..bec9391f65 100644
--- a/avmedia/inc/avmedia/mediaitem.hxx
+++ b/avmedia/inc/avmedia/mediaitem.hxx
@@ -70,7 +70,7 @@ class MediaItem : public SfxPoolItem
public:
TYPEINFO();
- MediaItem( USHORT nWhich = 0, sal_uInt32 nMaskSet = AVMEDIA_SETMASK_NONE );
+ MediaItem( sal_uInt16 nWhich = 0, sal_uInt32 nMaskSet = AVMEDIA_SETMASK_NONE );
MediaItem( const MediaItem& rMediaItem );
virtual ~MediaItem();
@@ -81,8 +81,8 @@ public:
SfxMapUnit ePresUnit,
XubString& rText,
const IntlWrapper *pIntl ) const;
- virtual bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
- virtual bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
void merge( const MediaItem& rMediaItem );
diff --git a/avmedia/inc/avmedia/mediaplayer.hxx b/avmedia/inc/avmedia/mediaplayer.hxx
index 175719a8f4..2d382113be 100644
--- a/avmedia/inc/avmedia/mediaplayer.hxx
+++ b/avmedia/inc/avmedia/mediaplayer.hxx
@@ -53,7 +53,7 @@ namespace avmedia
class MediaPlayer : public SfxChildWindow
{
public:
- MediaPlayer( Window*, USHORT, SfxBindings*, SfxChildWinInfo* );
+ MediaPlayer( Window*, sal_uInt16, SfxBindings*, SfxChildWinInfo* );
~MediaPlayer();
SFX_DECL_CHILDWINDOW( MediaPlayer );
diff --git a/avmedia/inc/avmedia/mediatoolbox.hxx b/avmedia/inc/avmedia/mediatoolbox.hxx
index c65a670a58..681305af55 100644
--- a/avmedia/inc/avmedia/mediatoolbox.hxx
+++ b/avmedia/inc/avmedia/mediatoolbox.hxx
@@ -49,10 +49,10 @@ public:
SFX_DECL_TOOLBOX_CONTROL();
- MediaToolBoxControl( USHORT nSlotId, USHORT nId, ToolBox& rTbX );
+ MediaToolBoxControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbX );
~MediaToolBoxControl();
- virtual void StateChanged( USHORT nSID, SfxItemState eState, const SfxPoolItem* pState );
+ virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState );
virtual Window* CreateItemWindow( Window* pParent );
private:
diff --git a/avmedia/inc/avmedia/mediawindow.hxx b/avmedia/inc/avmedia/mediawindow.hxx
index 62b998b2e1..dc4ea62aa6 100644
--- a/avmedia/inc/avmedia/mediawindow.hxx
+++ b/avmedia/inc/avmedia/mediawindow.hxx
@@ -82,7 +82,6 @@ namespace avmedia
const ::rtl::OUString& getURL() const;
bool isValid() const;
-//
bool hasPreferredSize() const;
Size getPreferredSize() const;
diff --git a/avmedia/inc/helpids.hrc b/avmedia/inc/helpids.hrc
index 1f7ffb6172..a16eaa6ce9 100644..100755
--- a/avmedia/inc/helpids.hrc
+++ b/avmedia/inc/helpids.hrc
@@ -28,19 +28,17 @@
#ifndef _AVMEDIA_HELPIDS_HRC
#define _AVMEDIA_HELPIDS_HRC
-#include <svl/solar.hrc>
-
-#define HID_AVMEDIA_TOOLBOXITEM_PLAY (HID_AVMEDIA_START+0)
-#define HID_AVMEDIA_TOOLBOXITEM_PAUSE (HID_AVMEDIA_START+1)
-#define HID_AVMEDIA_TOOLBOXITEM_STOP (HID_AVMEDIA_START+2)
-#define HID_AVMEDIA_TOOLBOXITEM_MUTE (HID_AVMEDIA_START+3)
-#define HID_AVMEDIA_TOOLBOXITEM_LOOP (HID_AVMEDIA_START+4)
-#define HID_AVMEDIA_TOOLBOXITEM_OPEN (HID_AVMEDIA_START+5)
-#define HID_AVMEDIA_TOOLBOXITEM_INSERT (HID_AVMEDIA_START+6)
-#define HID_AVMEDIA_ZOOMLISTBOX (HID_AVMEDIA_START+7)
-#define HID_AVMEDIA_TIMESLIDER (HID_AVMEDIA_START+8)
-#define HID_AVMEDIA_TIMEEDIT (HID_AVMEDIA_START+9)
-#define HID_AVMEDIA_VOLUMESLIDER (HID_AVMEDIA_START+10)
-#define HID_AVMEDIA_PLAYERWINDOW (HID_AVMEDIA_START+11)
+#define HID_AVMEDIA_TOOLBOXITEM_PLAY "AVMEDIA_HID_AVMEDIA_TOOLBOXITEM_PLAY"
+#define HID_AVMEDIA_TOOLBOXITEM_PAUSE "AVMEDIA_HID_AVMEDIA_TOOLBOXITEM_PAUSE"
+#define HID_AVMEDIA_TOOLBOXITEM_STOP "AVMEDIA_HID_AVMEDIA_TOOLBOXITEM_STOP"
+#define HID_AVMEDIA_TOOLBOXITEM_MUTE "AVMEDIA_HID_AVMEDIA_TOOLBOXITEM_MUTE"
+#define HID_AVMEDIA_TOOLBOXITEM_LOOP "AVMEDIA_HID_AVMEDIA_TOOLBOXITEM_LOOP"
+#define HID_AVMEDIA_TOOLBOXITEM_OPEN "AVMEDIA_HID_AVMEDIA_TOOLBOXITEM_OPEN"
+#define HID_AVMEDIA_TOOLBOXITEM_INSERT "AVMEDIA_HID_AVMEDIA_TOOLBOXITEM_INSERT"
+#define HID_AVMEDIA_ZOOMLISTBOX "AVMEDIA_HID_AVMEDIA_ZOOMLISTBOX"
+#define HID_AVMEDIA_TIMESLIDER "AVMEDIA_HID_AVMEDIA_TIMESLIDER"
+#define HID_AVMEDIA_TIMEEDIT "AVMEDIA_HID_AVMEDIA_TIMEEDIT"
+#define HID_AVMEDIA_VOLUMESLIDER "AVMEDIA_HID_AVMEDIA_VOLUMESLIDER"
+#define HID_AVMEDIA_PLAYERWINDOW "AVMEDIA_HID_AVMEDIA_PLAYERWINDOW"
#endif // _AVMEDIA_HELPIDS_HRC
diff --git a/avmedia/prj/build.lst b/avmedia/prj/build.lst
index 9e3f9ea098..78397f235b 100644
--- a/avmedia/prj/build.lst
+++ b/avmedia/prj/build.lst
@@ -1,4 +1,4 @@
-av avmedia : l10n tools sfx2 NULL
+av avmedia : TRANSLATIONS:translations tools sfx2 LIBXSLT:libxslt NULL
av avmedia usr1 - all av_mkout NULL
av avmedia\prj get - all av_prj NULL
av avmedia\inc get - all av_inv NULL
@@ -6,7 +6,6 @@ av avmedia\source\viewer nmake - all av_viewer NULL
av avmedia\source\framework nmake - all av_framework NULL
av avmedia\source\win nmake - all av_win NULL
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\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
+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_gstreamer NULL
diff --git a/avmedia/prj/d.lst b/avmedia/prj/d.lst
index c82db252aa..23f7c35723 100644
--- a/avmedia/prj/d.lst
+++ b/avmedia/prj/d.lst
@@ -16,3 +16,8 @@ mkdir: %_DEST%\inc%_EXT%\avmedia
..\inc\avmedia\mediatoolbox.hxx %_DEST%\inc%_EXT%\avmedia\mediatoolbox.hxx
..\%__SRC%\class\avmedia.jar %_DEST%\bin%_EXT%\avmedia.jar
+..\%__SRC%\misc\avmedia.component %_DEST%\xml%_EXT%\avmedia.component
+..\%__SRC%\misc\avmedia.jar.component %_DEST%\xml%_EXT%\avmedia.jar.component
+..\%__SRC%\misc\avmediaQuickTime.component %_DEST%\xml%_EXT%\avmediaQuickTime.component
+..\%__SRC%\misc\avmediagstreamer.component %_DEST%\xml%_EXT%\avmediagstreamer.component
+..\%__SRC%\misc\avmediawin.component %_DEST%\xml%_EXT%\avmediawin.component
diff --git a/avmedia/source/framework/makefile.mk b/avmedia/source/framework/makefile.mk
index 4c814c5348..4c814c5348 100644..100755
--- a/avmedia/source/framework/makefile.mk
+++ b/avmedia/source/framework/makefile.mk
diff --git a/avmedia/source/framework/mediacontrol.cxx b/avmedia/source/framework/mediacontrol.cxx
index 56fac24e39..832fb1f27f 100644
--- a/avmedia/source/framework/mediacontrol.cxx
+++ b/avmedia/source/framework/mediacontrol.cxx
@@ -87,13 +87,11 @@ MediaControl::MediaControl( Window* pParent, MediaControlStyle eControlStyle ) :
const String aTimeText( RTL_CONSTASCII_USTRINGPARAM( " 00:00:00/00:00:00 " ) );
SetBackground();
- SetPaintTransparent( TRUE );
+ SetPaintTransparent( sal_True );
SetParentClipMode( PARENTCLIPMODE_NOCLIP );
if( MEDIACONTROLSTYLE_SINGLELINE != meControlStyle )
{
-
-
maPlayToolBox.InsertItem( AVMEDIA_TOOLBOXITEM_OPEN, implGetImage( AVMEDIA_IMG_OPEN ), String( AVMEDIA_RESID( AVMEDIA_STR_OPEN ) ) );
maPlayToolBox.SetHelpId( AVMEDIA_TOOLBOXITEM_OPEN, HID_AVMEDIA_TOOLBOXITEM_OPEN );
@@ -104,16 +102,14 @@ MediaControl::MediaControl( Window* pParent, MediaControlStyle eControlStyle ) :
}
else
{
- maTimeSlider.SetBackground();
- maVolumeSlider.SetBackground();
mpZoomListBox->SetBackground();
maZoomToolBox.SetBackground();
- maZoomToolBox.SetPaintTransparent( TRUE );
+ maZoomToolBox.SetPaintTransparent( sal_True );
maPlayToolBox.SetBackground();
- maPlayToolBox.SetPaintTransparent( TRUE );
+ maPlayToolBox.SetPaintTransparent( sal_True );
maMuteToolBox.SetBackground();
- maMuteToolBox.SetPaintTransparent( TRUE );
+ maMuteToolBox.SetPaintTransparent( sal_True );
}
@@ -367,7 +363,7 @@ void MediaControl::implUpdateToolboxes()
if( !mpZoomListBox->IsTravelSelect() && !mpZoomListBox->IsInDropDown() )
{
- USHORT nSelectEntryPos ;
+ sal_uInt16 nSelectEntryPos ;
switch( maItem.getZoom() )
{
@@ -459,7 +455,7 @@ void MediaControl::implUpdateTimeField( double fCurTime )
Image MediaControl::implGetImage( sal_Int32 nImageId ) const
{
- return maImageList.GetImage( static_cast< USHORT >( nImageId ) );
+ return maImageList.GetImage( static_cast< sal_uInt16 >( nImageId ) );
}
// ------------------------------------------------------------------------------
diff --git a/avmedia/source/framework/mediacontrol.hrc b/avmedia/source/framework/mediacontrol.hrc
index ef9ddc2a1b..1c98b5ac81 100644..100755
--- a/avmedia/source/framework/mediacontrol.hrc
+++ b/avmedia/source/framework/mediacontrol.hrc
@@ -48,6 +48,4 @@
#define AVMEDIA_IMG_MUTE 2054
#define AVMEDIA_IMGLST 3072
-#define AVMEDIA_IMGLST_HC 3073
#define AVMEDIA_IMGLST_L 3074
-#define AVMEDIA_IMGLST_L_HC 3075
diff --git a/avmedia/source/framework/mediacontrol.src b/avmedia/source/framework/mediacontrol.src
index f56e1bbeae..e7d6958e65 100644
--- a/avmedia/source/framework/mediacontrol.src
+++ b/avmedia/source/framework/mediacontrol.src
@@ -32,92 +32,66 @@ String AVMEDIA_STR_OPEN
Text[en-US] = "Open";
};
-// ------------------------------------------------------------------------------
-
String AVMEDIA_STR_INSERT
{
Text [ en-US ] = "Apply" ;
};
-// ------------------------------------------------------------------------------
-
String AVMEDIA_STR_PLAY
{
Text[en-US] = "Play";
};
-// ------------------------------------------------------------------------------
-
String AVMEDIA_STR_PAUSE
{
Text[en-US] = "Pause";
};
-// ------------------------------------------------------------------------------
-
String AVMEDIA_STR_STOP
{
Text[en-US] = "Stop";
};
-// ------------------------------------------------------------------------------
-
String AVMEDIA_STR_ENDLESS
{
Text[en-US] = "Repeat";
};
-// ------------------------------------------------------------------------------
-
String AVMEDIA_STR_MUTE
{
Text[en-US] = "Mute";
};
-// ------------------------------------------------------------------------------
-
String AVMEDIA_STR_ZOOM
{
Text[en-US] = "View";
};
-// ------------------------------------------------------------------------------
-
String AVMEDIA_STR_ZOOM_50
{
Text[en-US] = "50%";
};
-// ------------------------------------------------------------------------------
-
String AVMEDIA_STR_ZOOM_100
{
Text[en-US] = "100%";
};
-// ------------------------------------------------------------------------------
-
String AVMEDIA_STR_ZOOM_200
{
Text[en-US] = "200%";
};
-// ------------------------------------------------------------------------------
-
String AVMEDIA_STR_ZOOM_FIT
{
Text[en-US] = "Scaled";
};
-// ------------------------------------------------------------------------------
-
String AVMEDIA_STR_MEDIAPLAYER
{
Text[en-US] = "Media Player";
};
-// ------------------------------------------------------------------------------
-
ImageList AVMEDIA_IMGLST
{
Prefix = "av";
@@ -135,8 +109,6 @@ ImageList AVMEDIA_IMGLST
IdCount = 7;
};
-// ------------------------------------------------------------------------------
-
ImageList AVMEDIA_IMGLST_L
{
Prefix = "avl";
@@ -153,41 +125,3 @@ ImageList AVMEDIA_IMGLST_L
};
IdCount = 7;
};
-
-// ------------------------------------------------------------------------------
-
-ImageList AVMEDIA_IMGLST_HC
-{
- Prefix = "avh";
- MaskColor = Color{ Red = 0xff00; Green = 0x0000; Blue = 0xff00; };
- IdList =
- {
- AVMEDIA_IMG_OPEN;
- AVMEDIA_IMG_PLAY;
- AVMEDIA_IMG_PAUSE;
- AVMEDIA_IMG_STOP;
- AVMEDIA_IMG_ENDLESS;
- AVMEDIA_IMG_INSERT;
- AVMEDIA_IMG_MUTE;
- };
- IdCount = 7;
-};
-
-// ------------------------------------------------------------------------------
-
-ImageList AVMEDIA_IMGLST_L_HC
-{
- Prefix = "avlh";
- MaskColor = Color{ Red = 0xff00; Green = 0x0000; Blue = 0xff00; };
- IdList =
- {
- AVMEDIA_IMG_OPEN;
- AVMEDIA_IMG_PLAY;
- AVMEDIA_IMG_PAUSE;
- AVMEDIA_IMG_STOP;
- AVMEDIA_IMG_ENDLESS;
- AVMEDIA_IMG_INSERT;
- AVMEDIA_IMG_MUTE;
- };
- IdCount = 7;
-};
diff --git a/avmedia/source/framework/mediaitem.cxx b/avmedia/source/framework/mediaitem.cxx
index 8501fd054d..e6096ddc47 100644
--- a/avmedia/source/framework/mediaitem.cxx
+++ b/avmedia/source/framework/mediaitem.cxx
@@ -51,7 +51,7 @@ TYPEINIT1_AUTOFACTORY( MediaItem, ::SfxPoolItem );
// ------------------------------------------------------------------------------
-MediaItem::MediaItem( USHORT _nWhich, sal_uInt32 nMaskSet ) :
+MediaItem::MediaItem( sal_uInt16 _nWhich, sal_uInt32 nMaskSet ) :
SfxPoolItem( _nWhich ),
mnMaskSet( nMaskSet ),
meState( MEDIASTATE_STOP ),
@@ -123,7 +123,7 @@ SfxItemPresentation MediaItem::GetPresentation( SfxItemPresentation,
//------------------------------------------------------------------------
-bool MediaItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE ) const
+bool MediaItem::QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 ) const
{
uno::Sequence< uno::Any > aSeq( 9 );
@@ -144,7 +144,7 @@ bool MediaItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE ) const
//------------------------------------------------------------------------
-bool MediaItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE )
+bool MediaItem::PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 )
{
uno::Sequence< uno::Any > aSeq;
bool bRet = false;
diff --git a/avmedia/source/framework/mediaplayer.cxx b/avmedia/source/framework/mediaplayer.cxx
index 9ef4042c5b..d1f20ee6ff 100644
--- a/avmedia/source/framework/mediaplayer.cxx
+++ b/avmedia/source/framework/mediaplayer.cxx
@@ -46,7 +46,7 @@ namespace avmedia
// - MediaPlayer -
// ---------------
-MediaPlayer::MediaPlayer( Window* _pParent, USHORT nId, SfxBindings* _pBindings, SfxChildWinInfo* pInfo ) :
+MediaPlayer::MediaPlayer( Window* _pParent, sal_uInt16 nId, SfxBindings* _pBindings, SfxChildWinInfo* pInfo ) :
SfxChildWindow( _pParent, nId )
{
pWindow = new MediaFloater( _pBindings, this, _pParent );
diff --git a/avmedia/source/framework/mediatoolbox.cxx b/avmedia/source/framework/mediatoolbox.cxx
index 993bf5d507..f0e10900f2 100644
--- a/avmedia/source/framework/mediatoolbox.cxx
+++ b/avmedia/source/framework/mediatoolbox.cxx
@@ -96,7 +96,7 @@ SFX_IMPL_TOOLBOX_CONTROL( ::avmedia::MediaToolBoxControl, ::avmedia::MediaItem )
// -----------------------------------------------------------------------------
-MediaToolBoxControl::MediaToolBoxControl( USHORT nSlotId, USHORT nId, ToolBox& rTbx ) :
+MediaToolBoxControl::MediaToolBoxControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ) :
SfxToolBoxControl( nSlotId, nId, rTbx )
{
rTbx.Invalidate();
@@ -110,7 +110,7 @@ MediaToolBoxControl::~MediaToolBoxControl()
// -----------------------------------------------------------------------------
-void MediaToolBoxControl::StateChanged( USHORT /* nSID */, SfxItemState eState, const SfxPoolItem* pState )
+void MediaToolBoxControl::StateChanged( sal_uInt16 /* nSID */, SfxItemState eState, const SfxPoolItem* pState )
{
MediaToolBoxControl_Impl* pCtrl = static_cast< MediaToolBoxControl_Impl* >( GetToolBox().GetItemWindow( GetId() ) );
diff --git a/avmedia/source/framework/soundhandler.cxx b/avmedia/source/framework/soundhandler.cxx
index e727f2ffe0..5e7e3cdc76 100644
--- a/avmedia/source/framework/soundhandler.cxx
+++ b/avmedia/source/framework/soundhandler.cxx
@@ -256,7 +256,6 @@ void SAL_CALL SoundHandler::impl_initService()
{
}
-
/*-************************************************************************************************************//**
@short standard ctor
@descr These initialize a new instance of this class with needed informations for work.
@@ -424,7 +423,7 @@ void SAL_CALL SoundHandler::dispatch( const css::util::URL&
// I think we can the following ones:
// a) look for given extension of url to map our type decision HARD CODED!!!
// b) return preferred type every time... it's easy :-)
- sTypeName = ::rtl::OUString::createFromAscii("wav_Wave_Audio_File");
+ sTypeName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("wav_Wave_Audio_File"));
aDescriptor[::comphelper::MediaDescriptor::PROP_TYPENAME()] <<= sTypeName;
aDescriptor >> lDescriptor;
}
@@ -494,44 +493,6 @@ extern "C" void SAL_CALL component_getImplementationEnvironment( const sal_Char
*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
- {
- rtl::OUString sKeyName = DECLARE_ASCII( "/" );
- sKeyName += avmedia::SoundHandler::impl_getStaticImplementationName();
- sKeyName += DECLARE_ASCII( "/UNO/SERVICES" );
- css::uno::Reference< css::registry::XRegistryKey > xNewKey(
- static_cast< css::registry::XRegistryKey* >( pRegistryKey )->createKey(sKeyName));
-
- if ( xNewKey.is() == sal_True )
- {
- css::uno::Sequence< ::rtl::OUString > seqServiceNames = avmedia::SoundHandler::impl_getStaticSupportedServiceNames();
- const ::rtl::OUString* pArray = seqServiceNames.getArray();
- sal_Int32 nLength = seqServiceNames.getLength();
- for ( sal_Int32 nCounter = 0; nCounter < nLength; ++nCounter )
- xNewKey->createKey( pArray[nCounter] );
- }
-
- bRet = sal_True;
- }
- catch( css::registry::InvalidRegistryException& )
- {
- OSL_ENSURE( sal_False, "### InvalidRegistryException!" );
- }
- }
-
- return bRet;
-}
-
// ------------------------
// - component_getFactory -
// ------------------------
diff --git a/avmedia/source/framework/soundhandler.hxx b/avmedia/source/framework/soundhandler.hxx
index decb177178..67f4f6bf6f 100644
--- a/avmedia/source/framework/soundhandler.hxx
+++ b/avmedia/source/framework/soundhandler.hxx
@@ -119,7 +119,6 @@ class SoundHandler : // interfaces
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes () throw( css::uno::RuntimeException );
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw( css::uno::RuntimeException );
-
/* interface XServiceInfo */
virtual ::rtl::OUString SAL_CALL getImplementationName ( ) throw( css::uno::RuntimeException );
virtual sal_Bool SAL_CALL supportsService ( const ::rtl::OUString& sServiceName ) throw( css::uno::RuntimeException );
diff --git a/avmedia/source/framework/soundhandler.xml b/avmedia/source/framework/soundhandler.xml
index 3eb039dec7..3eb039dec7 100644..100755
--- a/avmedia/source/framework/soundhandler.xml
+++ b/avmedia/source/framework/soundhandler.xml
diff --git a/avmedia/source/gstreamer/ChangeLog b/avmedia/source/gstreamer/ChangeLog
deleted file mode 100644
index 8671b11a97..0000000000
--- a/avmedia/source/gstreamer/ChangeLog
+++ /dev/null
@@ -1,112 +0,0 @@
-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
diff --git a/avmedia/source/gstreamer/avmediagstreamer.component b/avmedia/source/gstreamer/avmediagstreamer.component
new file mode 100644
index 0000000000..cd25a6b0cc
--- /dev/null
+++ b/avmedia/source/gstreamer/avmediagstreamer.component
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<component loader="com.sun.star.loader.SharedLibrary" xmlns="http://openoffice.org/2010/uno-components">
+ <implementation name="com.sun.star.comp.media.Manager_GStreamer">
+ <service name="com.sun.star.media.Manager_GStreamer"/>
+ </implementation>
+</component>
diff --git a/avmedia/source/gstreamer/exports.dxp b/avmedia/source/gstreamer/exports.dxp
index 9630d7e067..f0e1c69934 100644..100755
--- a/avmedia/source/gstreamer/exports.dxp
+++ b/avmedia/source/gstreamer/exports.dxp
@@ -1,3 +1,2 @@
component_getImplementationEnvironment
-component_writeInfo
component_getFactory
diff --git a/avmedia/source/gstreamer/gstframegrabber.cxx b/avmedia/source/gstreamer/gstframegrabber.cxx
index bb3678d2b9..fc775fe012 100644
--- a/avmedia/source/gstreamer/gstframegrabber.cxx
+++ b/avmedia/source/gstreamer/gstframegrabber.cxx
@@ -26,14 +26,11 @@
*
************************************************************************/
-#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"
diff --git a/avmedia/source/gstreamer/gstmanager.cxx b/avmedia/source/gstreamer/gstmanager.cxx
index 558b949563..e3b2c158c1 100644
--- a/avmedia/source/gstreamer/gstmanager.cxx
+++ b/avmedia/source/gstreamer/gstmanager.cxx
@@ -34,7 +34,7 @@
#define AVMEDIA_GST_MANAGER_IMPLEMENTATIONNAME "com.sun.star.comp.avmedia.Manager_GStreamer"
#define AVMEDIA_GST_MANAGER_SERVICENAME "com.sun.star.media.Manager"
-#if DEBUG
+#if OSL_DEBUG_LEVEL > 2
#define DBG OSL_TRACE
#else
#define DBG(...)
diff --git a/avmedia/source/gstreamer/gstplayer.cxx b/avmedia/source/gstreamer/gstplayer.cxx
index 7a5defdb7d..1e2d0b7080 100644
--- a/avmedia/source/gstreamer/gstplayer.cxx
+++ b/avmedia/source/gstreamer/gstplayer.cxx
@@ -28,9 +28,11 @@
#include <math.h>
-#ifndef __RTL_USTRING_
#include <rtl/string.hxx>
-#endif
+
+#include <vcl/syschild.hxx>
+#include <vcl/sysdata.hxx>
+
#include "gstplayer.hxx"
#include "gstframegrabber.hxx"
@@ -41,7 +43,7 @@
#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
+#if OSL_DEBUG_LEVEL > 2
#define DBG OSL_TRACE
#else
#define DBG(...)
@@ -73,7 +75,8 @@ Player::Player( const uno::Reference< lang::XMultiServiceFactory >& rxMgr ) :
{
// Initialize GStreamer library
int argc = 1;
- char *arguments[] = { "libreoffice.org" };
+ char name[] = "libreoffice";
+ char *arguments[] = { name };
char** argv = arguments;
GError* pError = NULL;
@@ -154,7 +157,18 @@ void Player::processMessage( GstMessage *message )
GstBusSyncReply Player::processSyncMessage( GstMessage *message )
{
- DBG( "%p processSyncMessage", this );
+ DBG( "%p processSyncMessage: %s", this, GST_MESSAGE_TYPE_NAME( message ) );
+
+#if OSL_DEBUG_LEVEL > 0
+ if ( GST_MESSAGE_TYPE( message ) == GST_MESSAGE_ERROR )
+ {
+ GError* error;
+ gchar* error_debug;
+
+ gst_message_parse_error( message, &error, &error_debug );
+ OSL_TRACE("gstreamer error: '%s' debug: '%s'", error->message, error_debug);
+ }
+#endif
if (message->structure) {
if( !strcmp( gst_structure_get_name( message->structure ), "prepare-xwindow-id" ) && mnWindowID != 0 ) {
@@ -217,7 +231,7 @@ GstBusSyncReply Player::processSyncMessage( GstMessage *message )
}
}
-#if DEBUG
+#if OSL_DEBUG_LEVEL > 2
sal_Bool aSuccess =
#endif
osl_setCondition( maSizeCondition );
@@ -227,8 +241,8 @@ GstBusSyncReply Player::processSyncMessage( GstMessage *message )
}
} 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
-#if DEBUG
+ // an error occurred, set condition so that OOo thread doesn't wait for us
+#if OSL_DEBUG_LEVEL > 2
sal_Bool aSuccess =
#endif
osl_setCondition( maSizeCondition );
@@ -272,6 +286,8 @@ bool Player::create( const ::rtl::OUString& rURL )
// create all the elements and link them
+ DBG("create player, URL: %s", OUStringToOString( rURL, RTL_TEXTENCODING_UTF8 ).getStr());
+
if( mbInitialized )
{
preparePlaybin( rURL, true );
@@ -282,7 +298,6 @@ bool Player::create( const ::rtl::OUString& rURL )
bRet = true;
}
-
if( bRet )
maURL = rURL;
else
@@ -366,7 +381,7 @@ void SAL_CALL Player::setMediaTime( double fTime )
if( !isPlaying() )
gst_element_set_state( mpPlaybin, GST_STATE_PAUSED );
- DBG( "seek to: %lld ns original: %lf s", gst_position, fTime );
+ DBG( "seek to: %"SAL_PRIdINT64" ns original: %lf s", gst_position, fTime );
}
}
@@ -522,7 +537,7 @@ awt::Size SAL_CALL Player::getPreferredPlayerWindowSize( )
DBG( "%p Player::getPreferredPlayerWindowSize, member %d x %d", this, mnWidth, mnHeight );
TimeValue aTimeout = { 10, 0 };
-#if DEBUG
+#if OSL_DEBUG_LEVEL > 2
oslConditionResult aResult =
#endif
osl_waitCondition( maSizeCondition, &aTimeout );
@@ -561,9 +576,15 @@ uno::Reference< ::media::XPlayerWindow > SAL_CALL Player::createPlayerWindow( co
xRet = pWindow;
- if( rArguments.getLength() > 2 ) {
- rArguments[ 2 ] >>= mnWindowID;
- DBG( "window ID: %ld", mnWindowID );
+ if( rArguments.getLength() > 2 )
+ {
+ sal_IntPtr pIntPtr = 0;
+ rArguments[ 2 ] >>= pIntPtr;
+ SystemChildWindow *pParentWindow = reinterpret_cast< SystemChildWindow* >( pIntPtr );
+ const SystemEnvData* pEnvData = pParentWindow ? pParentWindow->GetSystemData() : NULL;
+ OSL_ASSERT(pEnvData);
+ if (pEnvData)
+ mnWindowID = pEnvData->aWindow;
}
}
diff --git a/avmedia/source/gstreamer/gstuno.cxx b/avmedia/source/gstreamer/gstuno.cxx
index 96c199daac..da9ee9aa47 100644
--- a/avmedia/source/gstreamer/gstuno.cxx
+++ b/avmedia/source/gstreamer/gstuno.cxx
@@ -39,46 +39,11 @@ static uno::Reference< uno::XInterface > SAL_CALL create_MediaPlayer( const uno:
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;
@@ -86,11 +51,11 @@ extern "C" void* SAL_CALL component_getFactory( const sal_Char* pImplName, void*
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" ) );
+ const ::rtl::OUString aServiceName( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "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" ),
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.media.Manager_GStreamer" )),
create_MediaPlayer, uno::Sequence< ::rtl::OUString >( &aServiceName, 1 ) ) );
}
diff --git a/avmedia/source/gstreamer/gstwindow.cxx b/avmedia/source/gstreamer/gstwindow.cxx
index 5385d40477..9228f9e6c9 100644
--- a/avmedia/source/gstreamer/gstwindow.cxx
+++ b/avmedia/source/gstreamer/gstwindow.cxx
@@ -89,7 +89,6 @@ Window::~Window()
void SAL_CALL Window::update( )
throw (uno::RuntimeException)
{
- //::RedrawWindow( (HWND) mnFrameWnd, NULL, NULL, RDW_ALLCHILDREN | RDW_INVALIDATE | RDW_UPDATENOW | RDW_ERASE );
}
// ------------------------------------------------------------------------------
@@ -105,7 +104,6 @@ sal_Bool SAL_CALL Window::setZoomLevel( media::ZoomLevel eZoomLevel )
if( eZoomLevel != meZoomLevel )
{
meZoomLevel = eZoomLevel;
- //ImplLayoutVideoWindow();
}
bRet = true;
@@ -133,14 +131,9 @@ void SAL_CALL Window::setPointerType( sal_Int32 nPointerType )
// XWindow
// ------------------------------------------------------------------------------
-void SAL_CALL Window::setPosSize( sal_Int32 X, sal_Int32 Y, sal_Int32 Width, sal_Int32 Height, sal_Int16 Flags )
+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();
-// }
}
// ------------------------------------------------------------------------------
@@ -154,46 +147,22 @@ awt::Rectangle SAL_CALL Window::getPosSize()
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 )
+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 )
+void SAL_CALL Window::setEnable( sal_Bool /*bEnable*/ )
throw (uno::RuntimeException)
{
-// if( mnFrameWnd )
-// ::EnableWindow( (HWND) mnFrameWnd, bEnable );
}
// ------------------------------------------------------------------------------
@@ -201,8 +170,6 @@ void SAL_CALL Window::setEnable( sal_Bool bEnable )
void SAL_CALL Window::setFocus( )
throw (uno::RuntimeException)
{
-// if( mnFrameWnd )
-// ::SetFocus( (HWND) mnFrameWnd );
}
// ------------------------------------------------------------------------------
@@ -301,7 +268,6 @@ void SAL_CALL Window::removePaintListener( const uno::Reference< awt::XPaintList
maListeners.removeInterface( getCppuType( &xListener ), xListener );
}
-
// XComponent
// ------------------------------------------------------------------------------
diff --git a/avmedia/source/gstreamer/gstwindow.hxx b/avmedia/source/gstreamer/gstwindow.hxx
index b63e769e3f..18b9a7dbd0 100644
--- a/avmedia/source/gstreamer/gstwindow.hxx
+++ b/avmedia/source/gstreamer/gstwindow.hxx
@@ -90,7 +90,6 @@ public:
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;
diff --git a/avmedia/source/gstreamer/makefile.mk b/avmedia/source/gstreamer/makefile.mk
index 2f52b9cc47..0bea1330a0 100644..100755
--- a/avmedia/source/gstreamer/makefile.mk
+++ b/avmedia/source/gstreamer/makefile.mk
@@ -62,7 +62,7 @@ EXCEPTIONSFILES= \
$(SLO)$/gstuno.obj \
SHL1TARGET=$(TARGET)
-SHL1STDLIBS= $(CPPULIB) $(SALLIB) $(COMPHELPERLIB) $(CPPUHELPERLIB) $(PKGCONFIG_LIBS) $(TOOLSLIB)
+SHL1STDLIBS= $(CPPULIB) $(SALLIB) $(COMPHELPERLIB) $(CPPUHELPERLIB) $(PKGCONFIG_LIBS) $(TOOLSLIB) $(VCLLIB)
SHL1IMPLIB=i$(TARGET)
SHL1LIBS=$(SLB)$/$(TARGET).lib
SHL1DEF=$(MISC)$/$(SHL1TARGET).def
@@ -70,8 +70,19 @@ SHL1DEF=$(MISC)$/$(SHL1TARGET).def
DEF1NAME=$(SHL1TARGET)
DEF1EXPORTFILE=exports.dxp
-.ENDIF
-
-.ENDIF
+.ENDIF # UNX / WNT
+.ENDIF # ENABLE_GSTREAMER
.INCLUDE : target.mk
+
+.IF "$(ENABLE_GSTREAMER)" == "TRUE"
+.IF "$(GUI)" == "UNX" || "$(GUI)" == "WNT"
+
+ALLTAR : $(MISC)/avmediagstreamer.component
+$(MISC)/avmediagstreamer.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt avmediagstreamer.component
+ $(XSLTPROC) --nonet \
+ --stringparam uri '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' \
+ -o $@ $(SOLARENV)/bin/createcomponent.xslt avmediagstreamer.component
+
+.ENDIF # UNX / WNT
+.ENDIF # ENABLE_GSTREAMER
diff --git a/avmedia/source/inc/mediamisc.hxx b/avmedia/source/inc/mediamisc.hxx
index 7c24df071a..47c78f3f13 100644
--- a/avmedia/source/inc/mediamisc.hxx
+++ b/avmedia/source/inc/mediamisc.hxx
@@ -34,12 +34,30 @@ class ResMgr;
#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"
+
+#define AVMEDIA_MANAGER_SERVICE_NAME "com.sun.star.comp.avmedia.Manager_DirectX"
+#define AVMEDIA_MANAGER_SERVICE_IS_JAVABASED sal_False
+
+#define AVMEDIA_MANAGER_SERVICE_NAME_FALLBACK1 ""
+#define AVMEDIA_MANAGER_SERVICE_IS_JAVABASED_FALLBACK1 sal_False
+
#else
#ifdef QUARTZ
-#define AVMEDIA_MANAGER_SERVICE_NAME "com.sun.star.comp.avmedia.Manager_QuickTime"
+
+#define AVMEDIA_MANAGER_SERVICE_NAME "com.sun.star.comp.avmedia.Manager_QuickTime"
+#define AVMEDIA_MANAGER_SERVICE_IS_JAVABASED sal_False
+
+#define AVMEDIA_MANAGER_SERVICE_NAME_FALLBACK1 ""
+#define AVMEDIA_MANAGER_SERVICE_IS_JAVABASED_FALLBACK1 sal_False
+
#else
-#define AVMEDIA_MANAGER_SERVICE_NAME "com.sun.star.media.Manager_Java"
+
+#define AVMEDIA_MANAGER_SERVICE_NAME "com.sun.star.comp.avmedia.Manager_GStreamer"
+#define AVMEDIA_MANAGER_SERVICE_IS_JAVABASED sal_False
+
+#define AVMEDIA_MANAGER_SERVICE_NAME_FALLBACK1 "com.sun.star.comp.avmedia.Manager_Java"
+#define AVMEDIA_MANAGER_SERVICE_IS_JAVABASED_FALLBACK1 sal_True
+
#endif
#endif
#endif
diff --git a/avmedia/source/java/FrameGrabber.java b/avmedia/source/java/FrameGrabber.java
index a3ad559aa9..a3ad559aa9 100644..100755
--- a/avmedia/source/java/FrameGrabber.java
+++ b/avmedia/source/java/FrameGrabber.java
diff --git a/avmedia/source/java/Manager.java b/avmedia/source/java/Manager.java
index a85a5176a1..a85a5176a1 100644..100755
--- a/avmedia/source/java/Manager.java
+++ b/avmedia/source/java/Manager.java
diff --git a/avmedia/source/java/MediaUno.java b/avmedia/source/java/MediaUno.java
index 004ae7cf68..b77fd97eae 100644..100755
--- a/avmedia/source/java/MediaUno.java
+++ b/avmedia/source/java/MediaUno.java
@@ -64,13 +64,4 @@ public class MediaUno
return null;
}
-
- // -------------------------------------------------------------------------
-
- public static boolean __writeRegistryServiceInfo(
- com.sun.star.registry.XRegistryKey regKey )
- {
- return com.sun.star.comp.loader.FactoryHelper.writeRegistryServiceInfo(
- s_implName, s_serviceName, regKey );
- }
}
diff --git a/avmedia/source/java/Player.java b/avmedia/source/java/Player.java
index d35be5cc1a..d35be5cc1a 100644..100755
--- a/avmedia/source/java/Player.java
+++ b/avmedia/source/java/Player.java
diff --git a/avmedia/source/java/PlayerWindow.java b/avmedia/source/java/PlayerWindow.java
index 4bc9db4ac7..58df751b39 100644..100755
--- a/avmedia/source/java/PlayerWindow.java
+++ b/avmedia/source/java/PlayerWindow.java
@@ -67,9 +67,7 @@ public class PlayerWindow implements java.awt.event.KeyListener,
maFrame = new WindowAdapter( AnyConverter.toInt( aArgs[ 0 ] ) );
maFrame.setPosSize( aBoundRect.X, aBoundRect.Y, aBoundRect.Width, aBoundRect.Height, (short) 0 );
-
- if( aArgs.length > 2 )
- mbShowControls = AnyConverter.toBoolean( aArgs[ 2 ] );
+ mbShowControls = false;
java.awt.Panel aPanel = new java.awt.Panel( new java.awt.BorderLayout() );
diff --git a/avmedia/source/java/WindowAdapter.java b/avmedia/source/java/WindowAdapter.java
index 053b37e1bd..276cd6e57f 100644..100755
--- a/avmedia/source/java/WindowAdapter.java
+++ b/avmedia/source/java/WindowAdapter.java
@@ -164,21 +164,9 @@ public class WindowAdapter
case( java.awt.event.KeyEvent.VK_MULTIPLY ): nRet = com.sun.star.awt.Key.MULTIPLY; break;
case( java.awt.event.KeyEvent.VK_DIVIDE ): nRet = com.sun.star.awt.Key.DIVIDE; break;
case( java.awt.event.KeyEvent.VK_DECIMAL ): nRet = com.sun.star.awt.Key.POINT; break;
- // case( java.awt.event.KeyEvent.VK_ COMMA; break;
case( java.awt.event.KeyEvent.VK_LESS ): nRet = com.sun.star.awt.Key.LESS; break;
case( java.awt.event.KeyEvent.VK_GREATER ): nRet = com.sun.star.awt.Key.GREATER; break;
case( java.awt.event.KeyEvent.VK_EQUALS ): nRet = com.sun.star.awt.Key.EQUAL; break;
- // case( java.awt.event.KeyEvent.VK_ OPEN; break;
- // case( java.awt.event.KeyEvent.VK_ CUT; break;
- // case( java.awt.event.KeyEvent.VK_ COPY; break;
- // case( java.awt.event.KeyEvent.VK_ PASTE; break;
- // case( java.awt.event.KeyEvent.VK_ UNDO; break;
- // case( java.awt.event.KeyEvent.VK_ REPEAT; break;
- // case( java.awt.event.KeyEvent.VK_ FIND; break;
- // case( java.awt.event.KeyEvent.VK_ PROPERTIES; break;
- // case( java.awt.event.KeyEvent.VK_ FRONT; break;
- // case( java.awt.event.KeyEvent.VK_ CONTEXTMENU; break;
- // case( java.awt.event.KeyEvent.VK_ HELP; break;
default:
break;
diff --git a/avmedia/source/java/avmedia.jar b/avmedia/source/java/avmedia.jar
index 55576baa5b..85a98bbcf3 100644..100755
--- a/avmedia/source/java/avmedia.jar
+++ b/avmedia/source/java/avmedia.jar
Binary files differ
diff --git a/avmedia/source/java/avmedia.jar.component b/avmedia/source/java/avmedia.jar.component
new file mode 100755
index 0000000000..d7cc160bd7
--- /dev/null
+++ b/avmedia/source/java/avmedia.jar.component
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--**********************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2000, 2010 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org 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 version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+**********************************************************************-->
+
+<component loader="com.sun.star.loader.Java2"
+ xmlns="http://openoffice.org/2010/uno-components">
+ <implementation name="com.sun.star.comp.media.Manager_Java">
+ <service name="com.sun.star.media.Manager_Java"/>
+ </implementation>
+</component>
diff --git a/avmedia/source/java/makefile.mk b/avmedia/source/java/makefile.mk
index 37c53a7211..1fe771c117 100644..100755
--- a/avmedia/source/java/makefile.mk
+++ b/avmedia/source/java/makefile.mk
@@ -59,3 +59,11 @@ CUSTOMMANIFESTFILE = manifest
# --- Targets ------------------------------------------------------
.INCLUDE: target.mk
+
+ALLTAR : $(MISC)/avmedia.jar.component
+
+$(MISC)/avmedia.jar.component .ERRREMOVE : \
+ $(SOLARENV)/bin/createcomponent.xslt avmedia.jar.component
+ $(XSLTPROC) --nonet --stringparam uri \
+ '$(COMPONENTPREFIX_BASIS_JAVA)avmedia.jar' -o $@ \
+ $(SOLARENV)/bin/createcomponent.xslt avmedia.jar.component
diff --git a/avmedia/source/java/manifest b/avmedia/source/java/manifest
index fa9c2500d3..fa9c2500d3 100644..100755
--- a/avmedia/source/java/manifest
+++ b/avmedia/source/java/manifest
diff --git a/avmedia/source/java/win/SystemWindowAdapter.java b/avmedia/source/java/win/SystemWindowAdapter.java
index 1d2f143add..1d2f143add 100644..100755
--- a/avmedia/source/java/win/SystemWindowAdapter.java
+++ b/avmedia/source/java/win/SystemWindowAdapter.java
diff --git a/avmedia/source/java/x11/SystemWindowAdapter.java b/avmedia/source/java/x11/SystemWindowAdapter.java
index 6cada42982..6cada42982 100644..100755
--- a/avmedia/source/java/x11/SystemWindowAdapter.java
+++ b/avmedia/source/java/x11/SystemWindowAdapter.java
diff --git a/avmedia/source/quicktime/avmediaQuickTime.component b/avmedia/source/quicktime/avmediaQuickTime.component
new file mode 100755
index 0000000000..aa0251d74c
--- /dev/null
+++ b/avmedia/source/quicktime/avmediaQuickTime.component
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--**********************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2000, 2010 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org 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 version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+**********************************************************************-->
+
+<component loader="com.sun.star.loader.SharedLibrary"
+ xmlns="http://openoffice.org/2010/uno-components">
+ <implementation name="com.sun.star.comp.avmedia.Manager_QuickTime">
+ <service name="com.sun.star.media.Manager_QuickTime"/>
+ </implementation>
+</component>
diff --git a/avmedia/source/quicktime/makefile.mk b/avmedia/source/quicktime/makefile.mk
index f3c9f244f3..358fce4918 100644..100755
--- a/avmedia/source/quicktime/makefile.mk
+++ b/avmedia/source/quicktime/makefile.mk
@@ -83,3 +83,11 @@ SHL1VERSIONMAP=$(SOLARENV)/src/component.map
dummy:
@echo " Nothing to build for GUIBASE=$(GUIBASE)"
.ENDIF
+
+ALLTAR : $(MISC)/avmediaQuickTime.component
+
+$(MISC)/avmediaQuickTime.component .ERRREMOVE : \
+ $(SOLARENV)/bin/createcomponent.xslt avmediaQuickTime.component
+ $(XSLTPROC) --nonet --stringparam uri \
+ '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \
+ $(SOLARENV)/bin/createcomponent.xslt avmediaQuickTime.component
diff --git a/avmedia/source/quicktime/player.cxx b/avmedia/source/quicktime/player.cxx
index 079307fd37..d77dcf2438 100644
--- a/avmedia/source/quicktime/player.cxx
+++ b/avmedia/source/quicktime/player.cxx
@@ -140,7 +140,6 @@ bool Player::create( const ::rtl::OUString& rURL )
NSString* aNSStr = [[[NSString alloc] initWithCharacters: rURL.getStr() length: rURL.getLength()]stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding] ;
NSURL* aURL = [NSURL URLWithString:aNSStr ];
-
NSError* pErr = nil;
mpMovie = [QTMovie movieWithURL:aURL error:&pErr];
if(mpMovie)
@@ -423,7 +422,6 @@ awt::Size SAL_CALL Player::getPreferredPlayerWindowSize( )
return aSize;
}
-
// ------------------------------------------------------------------------------
uno::Reference< ::media::XPlayerWindow > SAL_CALL Player::createPlayerWindow( const uno::Sequence< uno::Any >& aArguments )
diff --git a/avmedia/source/quicktime/player.hxx b/avmedia/source/quicktime/player.hxx
index 204f520703..f8dd0ebe12 100644
--- a/avmedia/source/quicktime/player.hxx
+++ b/avmedia/source/quicktime/player.hxx
@@ -52,8 +52,6 @@ public:
bool create( const ::rtl::OUString& rURL );
-// void processMessage( 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);
@@ -87,9 +85,7 @@ private:
::rtl::OUString maURL;
QTMovie *mpMovie; // the Movie object
- /* GST
- sal_Bool mbFakeVideo;
- */
+
float mnUnmutedVolume;
double mnStopTime;
diff --git a/avmedia/source/quicktime/quicktimecommon.hxx b/avmedia/source/quicktime/quicktimecommon.hxx
index e89bc21dc4..c768901164 100644
--- a/avmedia/source/quicktime/quicktimecommon.hxx
+++ b/avmedia/source/quicktime/quicktimecommon.hxx
@@ -78,7 +78,6 @@
// Quicktime 6.4+ in Mac OS X 10.3
#define QT64 0x06400000
-
#endif // _QUICKTIMECOMMOM_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/avmedia/source/quicktime/quicktimeuno.cxx b/avmedia/source/quicktime/quicktimeuno.cxx
index 48233b4dd0..f127beb788 100644
--- a/avmedia/source/quicktime/quicktimeuno.cxx
+++ b/avmedia/source/quicktime/quicktimeuno.cxx
@@ -49,35 +49,6 @@ extern "C" void SAL_CALL component_getImplementationEnvironment( const sal_Char
*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(
- "/" AVMEDIA_QUICKTIME_MANAGER_IMPLEMENTATIONNAME "/UNO/SERVICES/"
- AVMEDIA_QUICKTIME_MANAGER_SERVICENAME ) ) );
-
- bRet = sal_True;
- }
- catch( registry::InvalidRegistryException& )
- {
- OSL_ENSURE( sal_False, "### InvalidRegistryException!" );
- }
- }
-
- return bRet;
-}
-
// ------------------------
// - component_getFactory -
// ------------------------
@@ -89,11 +60,11 @@ extern "C" void* SAL_CALL component_getFactory( const sal_Char* pImplName, void*
if( rtl_str_compare( pImplName, AVMEDIA_QUICKTIME_MANAGER_IMPLEMENTATIONNAME ) == 0 )
{
- const ::rtl::OUString aServiceName( ::rtl::OUString::createFromAscii( AVMEDIA_QUICKTIME_MANAGER_SERVICENAME ) );
+ const ::rtl::OUString aServiceName( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( AVMEDIA_QUICKTIME_MANAGER_SERVICENAME )) );
xFactory = uno::Reference< lang::XSingleServiceFactory >( ::cppu::createSingleFactory(
reinterpret_cast< lang::XMultiServiceFactory* >( pServiceManager ),
- ::rtl::OUString::createFromAscii( AVMEDIA_QUICKTIME_MANAGER_IMPLEMENTATIONNAME ),
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( AVMEDIA_QUICKTIME_MANAGER_IMPLEMENTATIONNAME )),
create_MediaPlayer, uno::Sequence< ::rtl::OUString >( &aServiceName, 1 ) ) );
}
diff --git a/avmedia/source/quicktime/window.cxx b/avmedia/source/quicktime/window.cxx
index 024354093b..7e09966d03 100644
--- a/avmedia/source/quicktime/window.cxx
+++ b/avmedia/source/quicktime/window.cxx
@@ -76,7 +76,6 @@ Window::Window( const uno::Reference< lang::XMultiServiceFactory >& i_rxMgr, Pla
::osl::MutexGuard aGuard( ImplGetOwnStaticMutex() );
-
if( mpParentView ) // sanity check
{
@@ -297,7 +296,6 @@ void SAL_CALL Window::removePaintListener( const uno::Reference< awt::XPaintList
maListeners.removeInterface( getCppuType( &xListener ), xListener );
}
-
// XComponent
// ------------------------------------------------------------------------------
diff --git a/avmedia/source/viewer/makefile.mk b/avmedia/source/viewer/makefile.mk
index 7771d1eb05..7771d1eb05 100644..100755
--- a/avmedia/source/viewer/makefile.mk
+++ b/avmedia/source/viewer/makefile.mk
diff --git a/avmedia/source/viewer/mediaevent_impl.cxx b/avmedia/source/viewer/mediaevent_impl.cxx
index 1d96dc9245..1bdca46406 100644
--- a/avmedia/source/viewer/mediaevent_impl.cxx
+++ b/avmedia/source/viewer/mediaevent_impl.cxx
@@ -118,7 +118,7 @@ void SAL_CALL MediaEventListenersImpl::mousePressed( const ::com::sun::star::awt
if( mpNotifyWindow )
{
MouseEvent aVCLMouseEvt( Point( e.X, e.Y ),
- sal::static_int_cast< USHORT >(e.ClickCount),
+ sal::static_int_cast< sal_uInt16 >(e.ClickCount),
0,
( ( e.Buttons & 1 ) ? MOUSE_LEFT : 0 ) |
( ( e.Buttons & 2 ) ? MOUSE_RIGHT : 0 ) |
@@ -139,7 +139,7 @@ void SAL_CALL MediaEventListenersImpl::mouseReleased( const ::com::sun::star::aw
if( mpNotifyWindow )
{
MouseEvent aVCLMouseEvt( Point( e.X, e.Y ),
- sal::static_int_cast< USHORT >(e.ClickCount),
+ sal::static_int_cast< sal_uInt16 >(e.ClickCount),
0,
( ( e.Buttons & 1 ) ? MOUSE_LEFT : 0 ) |
( ( e.Buttons & 2 ) ? MOUSE_RIGHT : 0 ) |
diff --git a/avmedia/source/viewer/mediawindow.cxx b/avmedia/source/viewer/mediawindow.cxx
index e7cc9604d0..3137b14b25 100644
--- a/avmedia/source/viewer/mediawindow.cxx
+++ b/avmedia/source/viewer/mediawindow.cxx
@@ -163,7 +163,9 @@ Size MediaWindow::getPreferredSize() const
void MediaWindow::setPosSize( const Rectangle& rNewRect )
{
if( mpImpl )
+ {
mpImpl->setPosSize( rNewRect );
+ }
}
// -------------------------------------------------------------------------
@@ -365,25 +367,26 @@ Window* MediaWindow::getWindow() const
void MediaWindow::getMediaFilters( FilterNameVector& rFilterNameVector )
{
- static const char* pFilters[] = { "AIF Audio", "aif;aiff",
- "AU Audio", "au",
- "AVI", "avi",
- "CD Audio", "cda",
- "FLAC Audio", "flac",
- "MIDI Audio", "mid;midi",
- "MPEG Audio", "mp2;mp3;mpa",
- "MPEG Video", "mpg;mpeg;mpv;mp4",
- "Ogg bitstream", "ogg",
- "Quicktime Video", "mov",
- "Vivo Video", "viv",
- "WAVE Audio", "wav" };
-
- unsigned int i;
- for( i = 0; i < ( sizeof( pFilters ) / sizeof( char* ) ); i += 2 )
+ static const char* pFilters[] = { "AIF Audio", "aif;aiff",
+ "AU Audio", "au",
+ "AVI", "avi",
+ "CD Audio", "cda",
+ "FLAC Audio", "flac",
+ "Matroska Media", "mkv",
+ "MIDI Audio", "mid;midi",
+ "MPEG Audio", "mp2;mp3;mpa",
+ "MPEG Video", "mpg;mpeg;mpv;mp4",
+ "Ogg bitstream", "ogg",
+ "Quicktime Video", "mov",
+ "Vivo Video", "viv",
+ "WAVE Audio", "wav",
+ "WebM Video", "webm" };
+
+ for( size_t i = 0; i < SAL_N_ELEMENTS(pFilters); i += 2 )
{
rFilterNameVector.push_back( ::std::make_pair< ::rtl::OUString, ::rtl::OUString >(
- ::rtl::OUString::createFromAscii( pFilters[ i ] ),
- ::rtl::OUString::createFromAscii( pFilters[ i + 1 ] ) ) );
+ ::rtl::OUString::createFromAscii(pFilters[i]),
+ ::rtl::OUString::createFromAscii(pFilters[i+1]) ) );
}
}
@@ -466,39 +469,26 @@ bool MediaWindow::isMediaURL( const ::rtl::OUString& rURL, bool bDeep, Size* pPr
{
if( bDeep || pPreferredSizePixel )
{
- uno::Reference< lang::XMultiServiceFactory > xFactory( ::comphelper::getProcessServiceFactory() );
-
- if( xFactory.is() )
+ try
{
- try
- {
- fprintf(stderr, "-->%s uno reference \n\n",AVMEDIA_MANAGER_SERVICE_NAME);
+ uno::Reference< media::XPlayer > xPlayer( priv::MediaWindowImpl::createPlayer(
+ aURL.GetMainURL( INetURLObject::DECODE_UNAMBIGUOUS ) ) );
- uno::Reference< ::com::sun::star::media::XManager > xManager(
- xFactory->createInstance( ::rtl::OUString::createFromAscii( AVMEDIA_MANAGER_SERVICE_NAME ) ),
- uno::UNO_QUERY );
+ if( xPlayer.is() )
+ {
+ bRet = true;
- if( xManager.is() )
+ if( pPreferredSizePixel )
{
- uno::Reference< media::XPlayer > xPlayer( xManager->createPlayer( aURL.GetMainURL( INetURLObject::DECODE_UNAMBIGUOUS ) ) );
+ const awt::Size aAwtSize( xPlayer->getPreferredPlayerWindowSize() );
- if( xPlayer.is() )
- {
- bRet = true;
-
- if( pPreferredSizePixel )
- {
- const awt::Size aAwtSize( xPlayer->getPreferredPlayerWindowSize() );
-
- pPreferredSizePixel->Width() = aAwtSize.Width;
- pPreferredSizePixel->Height() = aAwtSize.Height;
- }
- }
+ pPreferredSizePixel->Width() = aAwtSize.Width;
+ pPreferredSizePixel->Height() = aAwtSize.Height;
}
}
- catch( ... )
- {
- }
+ }
+ catch( ... )
+ {
}
}
else
diff --git a/avmedia/source/viewer/mediawindow.hrc b/avmedia/source/viewer/mediawindow.hrc
index 988088e88b..988088e88b 100644..100755
--- a/avmedia/source/viewer/mediawindow.hrc
+++ b/avmedia/source/viewer/mediawindow.hrc
diff --git a/avmedia/source/viewer/mediawindow_impl.cxx b/avmedia/source/viewer/mediawindow_impl.cxx
index 3e4151037a..48cd33b078 100644
--- a/avmedia/source/viewer/mediawindow_impl.cxx
+++ b/avmedia/source/viewer/mediawindow_impl.cxx
@@ -77,7 +77,7 @@ MediaWindowControl::~MediaWindowControl()
void MediaWindowControl::update()
{
MediaItem aItem;
-
+
static_cast< MediaWindowImpl* >( GetParent() )->updateMediaItem( aItem );
setState( aItem );
}
@@ -94,11 +94,7 @@ void MediaWindowControl::execute( const MediaItem& rItem )
// --------------------
MediaChildWindow::MediaChildWindow( Window* pParent ) :
-#ifdef GSTREAMER
SystemChildWindow( pParent, WB_CLIPCHILDREN )
-#else
- JavaChildWindow( pParent, WB_CLIPCHILDREN )
-#endif
{
}
@@ -114,12 +110,8 @@ void MediaChildWindow::MouseMove( const MouseEvent& rMEvt )
{
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 );
}
@@ -129,12 +121,8 @@ void MediaChildWindow::MouseButtonDown( const MouseEvent& rMEvt )
{
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 );
}
@@ -145,11 +133,7 @@ void MediaChildWindow::MouseButtonUp( const MouseEvent& rMEvt )
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 );
}
@@ -157,11 +141,7 @@ void MediaChildWindow::MouseButtonUp( const MouseEvent& rMEvt )
void MediaChildWindow::KeyInput( const KeyEvent& rKEvt )
{
-#ifdef GSTREAMER
SystemChildWindow::KeyInput( rKEvt );
-#else
- JavaChildWindow::KeyInput( rKEvt );
-#endif
GetParent()->KeyInput( rKEvt );
}
@@ -169,11 +149,7 @@ void MediaChildWindow::KeyInput( const KeyEvent& rKEvt )
void MediaChildWindow::KeyUp( const KeyEvent& rKEvt )
{
-#ifdef GSTREAMER
SystemChildWindow::KeyUp( rKEvt );
-#else
- JavaChildWindow::KeyUp( rKEvt );
-#endif
GetParent()->KeyUp( rKEvt );
}
@@ -183,12 +159,8 @@ void MediaChildWindow::Command( const CommandEvent& rCEvt )
{
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 );
}
@@ -207,9 +179,10 @@ MediaWindowImpl::MediaWindowImpl( Window* pParent, MediaWindow* pMediaWindow, bo
mpEmptyBmpEx( NULL ),
mpAudioBmpEx( NULL )
{
+ maChildWindow.SetBackground( Color( COL_BLACK ) );
maChildWindow.SetHelpId( HID_AVMEDIA_PLAYERWINDOW );
maChildWindow.Hide();
-
+
if( mpMediaWindowControl )
{
mpMediaWindowControl->SetSizePixel( mpMediaWindowControl->getMinSizePixel() );
@@ -239,12 +212,12 @@ void MediaWindowImpl::cleanUp()
xPlayerWindow->removeKeyListener( uno::Reference< awt::XKeyListener >( mxEventsIf, uno::UNO_QUERY ) );
xPlayerWindow->removeMouseListener( uno::Reference< awt::XMouseListener >( mxEventsIf, uno::UNO_QUERY ) );
xPlayerWindow->removeMouseMotionListener( uno::Reference< awt::XMouseMotionListener >( mxEventsIf, uno::UNO_QUERY ) );
-
+
uno::Reference< lang::XComponent > xComponent( xPlayerWindow, uno::UNO_QUERY );
-
+
if( xComponent.is() )
xComponent->dispose();
-
+
setPlayerWindow( NULL );
}
@@ -261,28 +234,15 @@ void MediaWindowImpl::onURLChanged()
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_Int32 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
-
+ aArgs[ 2 ] = uno::makeAny( reinterpret_cast< sal_IntPtr >( &maChildWindow ) );
+
try
{
-#ifdef GSTREAMER
- if( pSystemData->aWindow != 0 )
-#else
- if( nWndHandle != 0 )
-#endif
- xPlayerWindow = getPlayer()->createPlayerWindow( aArgs );
+ xPlayerWindow = getPlayer()->createPlayerWindow( aArgs );
}
catch( uno::RuntimeException )
{
@@ -323,7 +283,7 @@ void MediaWindowImpl::onURLChanged()
void MediaWindowImpl::update()
{
uno::Reference< media::XPlayerWindow > xPlayerWindow( getPlayerWindow() );
-
+
if( xPlayerWindow.is() )
xPlayerWindow->update();
}
@@ -332,7 +292,7 @@ void MediaWindowImpl::update()
void MediaWindowImpl::setPosSize( const Rectangle& rRect )
{
- SetPosSizePixel( rRect.Left(), rRect.Top(), rRect.GetWidth(), rRect.GetHeight() );
+ SetPosSizePixel( rRect.TopLeft(), rRect.GetSize() );
}
// ---------------------------------------------------------------------
@@ -340,25 +300,24 @@ void MediaWindowImpl::setPosSize( const Rectangle& rRect )
void MediaWindowImpl::setPointer( const Pointer& rPointer )
{
uno::Reference< media::XPlayerWindow > xPlayerWindow( getPlayerWindow() );
-
+
SetPointer( rPointer );
maChildWindow.SetPointer( rPointer );
-
+
if( xPlayerWindow.is() )
{
-
long nPointer;
-
+
switch( rPointer.GetStyle() )
{
case( POINTER_CROSS ): nPointer = awt::SystemPointer::CROSS; break;
case( POINTER_HAND ): nPointer = awt::SystemPointer::HAND; break;
case( POINTER_MOVE ): nPointer = awt::SystemPointer::MOVE; break;
case( POINTER_WAIT ): nPointer = awt::SystemPointer::WAIT; break;
-
+
default: nPointer = awt::SystemPointer::ARROW; break;
}
-
+
xPlayerWindow->setPointerType( nPointer );
}
}
@@ -386,20 +345,20 @@ void MediaWindowImpl::Resize()
const sal_Int32 nOffset( mpMediaWindowControl ? AVMEDIA_CONTROLOFFSET : 0 );
Size aPlayerWindowSize( aCurSize.Width() - ( nOffset << 1 ),
aCurSize.Height() - ( nOffset << 1 ) );
-
+
if( mpMediaWindowControl )
{
const sal_Int32 nControlHeight = mpMediaWindowControl->GetSizePixel().Height();
const sal_Int32 nControlY = ::std::max( aCurSize.Height() - nControlHeight - nOffset, 0L );
-
+
aPlayerWindowSize.Height() = ( nControlY - ( nOffset << 1 ) );
mpMediaWindowControl->SetPosSizePixel( Point( nOffset, nControlY ), Size( aCurSize.Width() - ( nOffset << 1 ), nControlHeight ) );
}
-
- maChildWindow.SetPosSizePixel( Point( nOffset, nOffset ), aPlayerWindowSize );
-
+
if( xPlayerWindow.is() )
xPlayerWindow->setPosSize( 0, 0, aPlayerWindowSize.Width(), aPlayerWindowSize.Height(), 0 );
+
+ maChildWindow.SetPosSizePixel( Point( nOffset, nOffset ), aPlayerWindowSize );
}
// ---------------------------------------------------------------------
@@ -438,25 +397,25 @@ void MediaWindowImpl::StateChanged( StateChangedType eType )
void MediaWindowImpl::Paint( const Rectangle& )
{
BitmapEx* pLogo = NULL;
-
+
if( !getPlayer().is() )
{
if( !mpEmptyBmpEx )
mpEmptyBmpEx = new BitmapEx( AVMEDIA_RESID( AVMEDIA_BMP_EMPTYLOGO ) );
-
+
pLogo = mpEmptyBmpEx;
}
- else if ( !getPlayerWindow().is() )
+ else if( !getPlayerWindow().is() )
{
if( !mpAudioBmpEx )
mpAudioBmpEx = new BitmapEx( AVMEDIA_RESID( AVMEDIA_BMP_AUDIOLOGO ) );
-
+
pLogo = mpAudioBmpEx;
}
const Point aBasePos( maChildWindow.GetPosPixel() );
- const Rectangle aVideoRect( aBasePos, maChildWindow.GetSizePixel() );
-
+ const Rectangle aVideoRect( aBasePos, maChildWindow.GetSizePixel() );
+
if( pLogo && !pLogo->IsEmpty() && ( aVideoRect.GetWidth() > 0 ) && ( aVideoRect.GetHeight() > 0 ) )
{
Size aLogoSize( pLogo->GetSizePixel() );
@@ -465,7 +424,7 @@ void MediaWindowImpl::Paint( const Rectangle& )
SetLineColor( aBackgroundColor );
SetFillColor( aBackgroundColor );
DrawRect( aVideoRect );
-
+
if( ( aLogoSize.Width() > aVideoRect.GetWidth() || aLogoSize.Height() > aVideoRect.GetHeight() ) &&
( aLogoSize.Height() > 0 ) )
{
@@ -483,12 +442,10 @@ void MediaWindowImpl::Paint( const Rectangle& )
}
}
- DrawBitmapEx( Point( aBasePos.X() + ( ( aVideoRect.GetWidth() - aLogoSize.Width() ) >> 1 ),
+ DrawBitmapEx( Point( aBasePos.X() + ( ( aVideoRect.GetWidth() - aLogoSize.Width() ) >> 1 ),
aBasePos.Y() + ( ( aVideoRect.GetHeight() - aLogoSize.Height() ) >> 1 ) ),
aLogoSize, *pLogo );
}
-
- update();
}
// ---------------------------------------------------------------------
diff --git a/avmedia/source/viewer/mediawindow_impl.hxx b/avmedia/source/viewer/mediawindow_impl.hxx
index c2dc310821..f8abda9bb7 100644
--- a/avmedia/source/viewer/mediawindow_impl.hxx
+++ b/avmedia/source/viewer/mediawindow_impl.hxx
@@ -2,11 +2,14 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
*
+ * $RCSfile: mediawindow_impl.hxx,v $
+ * $Revision: 1.3 $
+ *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -30,11 +33,7 @@
#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"
@@ -48,16 +47,16 @@ namespace avmedia
// ----------------------
// - MediaWindowControl -
// ----------------------
-
+
class MediaWindowControl : public MediaControl
{
public:
-
+
MediaWindowControl( Window* pParent );
~MediaWindowControl();
-
+
protected:
-
+
void update();
void execute( const MediaItem& rItem );
};
@@ -65,20 +64,16 @@ namespace avmedia
// --------------------
// - MediaChildWindow -
// --------------------
-
-#ifdef GSTREAMER
+
class MediaChildWindow : public SystemChildWindow
-#else
- class MediaChildWindow : public JavaChildWindow
-#endif
{
public:
-
+
MediaChildWindow( Window* pParent );
~MediaChildWindow();
-
+
protected:
-
+
virtual void MouseMove( const MouseEvent& rMEvt );
virtual void MouseButtonDown( const MouseEvent& rMEvt );
virtual void MouseButtonUp( const MouseEvent& rMEvt );
@@ -86,7 +81,7 @@ namespace avmedia
virtual void KeyUp( const KeyEvent& rKEvt );
virtual void Command( const CommandEvent& rCEvt );
};
-
+
// ------------------.
// - MediaWindowImpl -
// -------------------
@@ -97,7 +92,7 @@ namespace avmedia
public MediaWindowBaseImpl,
public DropTargetHelper,
public DragSourceHelper
-
+
{
public:
@@ -106,18 +101,18 @@ namespace avmedia
virtual void cleanUp();
virtual void onURLChanged();
-
+
public:
-
+
void update();
void setPosSize( const Rectangle& rRect );
-
+
void setPointer( const Pointer& rPointer );
const Pointer& getPointer() const;
-
+
bool hasInternalMediaControl() const;
-
+
protected:
// Window
diff --git a/avmedia/source/viewer/mediawindowbase_impl.cxx b/avmedia/source/viewer/mediawindowbase_impl.cxx
index d047b963fd..89928b27ed 100644
--- a/avmedia/source/viewer/mediawindowbase_impl.cxx
+++ b/avmedia/source/viewer/mediawindowbase_impl.cxx
@@ -46,6 +46,7 @@ namespace avmedia { namespace priv {
// - MediaWindowBaseImpl -
// -----------------------
+
MediaWindowBaseImpl::MediaWindowBaseImpl( MediaWindow* pMediaWindow ) :
mpMediaWindow( pMediaWindow )
{
@@ -71,7 +72,7 @@ uno::Reference< media::XPlayer > MediaWindowBaseImpl::createPlayer( const ::rtl:
{
uno::Reference< ::com::sun::star::media::XManager > xManager(
- xFactory->createInstance( ::rtl::OUString::createFromAscii( AVMEDIA_MANAGER_SERVICE_NAME ) ),
+ xFactory->createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( AVMEDIA_MANAGER_SERVICE_NAME )) ),
uno::UNO_QUERY );
if( xManager.is() )
@@ -88,7 +89,6 @@ uno::Reference< media::XPlayer > MediaWindowBaseImpl::createPlayer( const ::rtl:
return xPlayer;
}
-
// ---------------------------------------------------------------------
void MediaWindowBaseImpl::setURL( const ::rtl::OUString& rURL )
@@ -142,10 +142,7 @@ void MediaWindowBaseImpl::stopPlayingInternal( bool bStop )
{
if( isPlaying() )
{
- if( bStop )
- mxPlayer->stop();
- else
- mxPlayer->start();
+ bStop ? mxPlayer->stop() : mxPlayer->start();
}
}
@@ -405,12 +402,7 @@ void MediaWindowBaseImpl::executeMediaItem( const MediaItem& rItem )
case( MEDIASTATE_PLAY ):
case( MEDIASTATE_PLAYFFW ):
{
-/*
- const double fNewRate = ( ( MEDIASTATE_PLAYFFW == rItem.getState() ) ? AVMEDIA_FFW_PLAYRATE : 1.0 );
-
- if( getRate() != fNewRate )
- setRate( fNewRate );
-*/
+
if( !isPlaying() )
start();
}
diff --git a/avmedia/source/viewer/mediawindowbase_impl.hxx b/avmedia/source/viewer/mediawindowbase_impl.hxx
index 063665b97d..408528e209 100644
--- a/avmedia/source/viewer/mediawindowbase_impl.hxx
+++ b/avmedia/source/viewer/mediawindowbase_impl.hxx
@@ -62,7 +62,7 @@ namespace avmedia
virtual void cleanUp();
virtual void onURLChanged();
- static ::com::sun::star::uno::Reference< ::com::sun::star::media::XPlayer > createPlayer( const ::rtl::OUString& rURL );
+ static ::com::sun::star::uno::Reference< ::com::sun::star::media::XPlayer > createPlayer( const ::rtl::OUString& rURL);
public:
@@ -113,6 +113,7 @@ namespace avmedia
void stopPlayingInternal( bool );
MediaWindow* getMediaWindow() const;
+ inline sal_Bool isMediaWindowJavaBased() const { return( mbIsMediaWindowJavaBased ); }
::com::sun::star::uno::Reference< ::com::sun::star::media::XPlayer > getPlayer() const;
@@ -125,6 +126,7 @@ namespace avmedia
::com::sun::star::uno::Reference< ::com::sun::star::media::XPlayer > mxPlayer;
::com::sun::star::uno::Reference< ::com::sun::star::media::XPlayerWindow > mxPlayerWindow;
MediaWindow* mpMediaWindow;
+ sal_Bool mbIsMediaWindowJavaBased;
};
}
}
diff --git a/avmedia/source/win/avmediawin.component b/avmedia/source/win/avmediawin.component
new file mode 100755
index 0000000000..c80c19bff0
--- /dev/null
+++ b/avmedia/source/win/avmediawin.component
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--**********************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2000, 2010 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org 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 version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+**********************************************************************-->
+
+<component loader="com.sun.star.loader.SharedLibrary"
+ xmlns="http://openoffice.org/2010/uno-components">
+ <implementation name="com.sun.star.comp.avmedia.Manager_DirectX">
+ <service name="com.sun.star.media.Manager_DirectX"/>
+ </implementation>
+</component>
diff --git a/avmedia/source/win/exports.dxp b/avmedia/source/win/exports.dxp
index db9c0a52f2..926e49f5f1 100644..100755
--- a/avmedia/source/win/exports.dxp
+++ b/avmedia/source/win/exports.dxp
@@ -1,4 +1,3 @@
component_getImplementationEnvironment
-component_writeInfo
component_getFactory
diff --git a/avmedia/source/win/framegrabber.cxx b/avmedia/source/win/framegrabber.cxx
index 59a9217da4..5b9f823c89 100644
--- a/avmedia/source/win/framegrabber.cxx
+++ b/avmedia/source/win/framegrabber.cxx
@@ -26,12 +26,12 @@
*
************************************************************************/
-#include <tools/prewin.h>
#if defined _MSC_VER
#pragma warning(push, 1)
#pragma warning(disable: 4917)
#endif
-#include <windows.h>
+#include <prewin.h>
+#include <postwin.h>
#include <objbase.h>
#include <strmif.h>
#include <Amvideo.h>
@@ -44,7 +44,6 @@
#if defined _MSC_VER
#pragma warning(pop)
#endif
-#include <tools/postwin.h>
#include "framegrabber.hxx"
#include "player.hxx"
diff --git a/avmedia/source/win/interface.hxx b/avmedia/source/win/interface.hxx
index be9efe3fcd..f14d35ba9f 100644
--- a/avmedia/source/win/interface.hxx
+++ b/avmedia/source/win/interface.hxx
@@ -91,7 +91,7 @@ public:
IMediaSample *pSample) = 0;
virtual HRESULT __stdcall BufferCB(
double SampleTime,
- WIN_BYTE *pBuffer,
+ BYTE *pBuffer,
long BufferLen) = 0;
};
@@ -104,13 +104,13 @@ ISampleGrabber : public IUnknown
{
public:
virtual HRESULT __stdcall SetOneShot(
- WIN_BOOL OneShot) = 0;
+ BOOL OneShot) = 0;
virtual HRESULT __stdcall SetMediaType(
const AM_MEDIA_TYPE *pType) = 0;
virtual HRESULT __stdcall GetConnectedMediaType(
AM_MEDIA_TYPE *pType) = 0;
virtual HRESULT __stdcall SetBufferSamples(
- WIN_BOOL BufferThem) = 0;
+ BOOL BufferThem) = 0;
virtual HRESULT __stdcall GetCurrentBuffer(
long *pBufferSize,
long *pBuffer) = 0;
diff --git a/avmedia/source/win/makefile.mk b/avmedia/source/win/makefile.mk
index 7fdb92378d..7c6c9e14da 100644..100755
--- a/avmedia/source/win/makefile.mk
+++ b/avmedia/source/win/makefile.mk
@@ -78,3 +78,11 @@ SHL1STDLIBS += dxguid.lib
.ENDIF
.INCLUDE : target.mk
+
+ALLTAR : $(MISC)/avmediawin.component
+
+$(MISC)/avmediawin.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
+ avmediawin.component
+ $(XSLTPROC) --nonet --stringparam uri \
+ '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \
+ $(SOLARENV)/bin/createcomponent.xslt avmediawin.component
diff --git a/avmedia/source/win/player.cxx b/avmedia/source/win/player.cxx
index 9b7e8f7f2a..133d26eda9 100644
--- a/avmedia/source/win/player.cxx
+++ b/avmedia/source/win/player.cxx
@@ -26,12 +26,10 @@
*
************************************************************************/
-#include <tools/prewin.h>
#if defined _MSC_VER
#pragma warning(push, 1)
#pragma warning(disable: 4917)
#endif
-#include <windows.h>
#include <objbase.h>
#include <strmif.h>
#include <control.h>
@@ -40,7 +38,6 @@
#if defined _MSC_VER
#pragma warning(pop)
#endif
-#include <tools/postwin.h>
#include "player.hxx"
#include "framegrabber.hxx"
@@ -207,7 +204,8 @@ void Player::setDDrawParams( IDirectDraw* pDDraw, IDirectDrawSurface* pDDrawSurf
long Player::processEvent()
{
- long nCode, nParam1, nParam2;
+ long nCode;
+ LONG_PTR nParam1, nParam2;
if( mpME && SUCCEEDED( mpME->GetEvent( &nCode, &nParam1, &nParam2, 0 ) ) )
{
diff --git a/avmedia/source/win/window.cxx b/avmedia/source/win/window.cxx
index 3c2006abb8..7d7a1cdef9 100644
--- a/avmedia/source/win/window.cxx
+++ b/avmedia/source/win/window.cxx
@@ -26,12 +26,10 @@
*
************************************************************************/
-#include <tools/prewin.h>
#if defined _MSC_VER
#pragma warning(push, 1)
#pragma warning(disable: 4917)
#endif
-#include <windows.h>
#include <objbase.h>
#include <strmif.h>
#include <control.h>
@@ -39,7 +37,6 @@
#if defined _MSC_VER
#pragma warning(pop)
#endif
-#include <tools/postwin.h>
#include <com/sun/star/awt/SystemPointer.hdl>
#include "window.hxx"
@@ -342,33 +339,6 @@ bool Window::create( const uno::Sequence< uno::Any >& rArguments )
{
::SetWindowLong( (HWND) mnFrameWnd, 0, (DWORD) this );
-#ifdef DDRAW_TEST_OUTPUT
- IDirectDraw7* pDDraw;
- IDirectDrawSurface7* pDDSurface;
- IDirectDrawClipper* pDDClipper;
-
- if( DD_OK == DirectDrawCreateEx( NULL, (void**) &pDDraw, IID_IDirectDraw7, NULL ) )
- {
- if( DD_OK == pDDraw->SetCooperativeLevel( (HWND) mnParentWnd, DDSCL_NORMAL ) )
- {
- DDSURFACEDESC2 aDDDesc;
-
- memset( &aDDDesc, 0, sizeof( aDDDesc ) );
- aDDDesc.dwSize = sizeof( aDDDesc );
- aDDDesc.dwFlags = DDSD_CAPS;
- aDDDesc.ddsCaps.dwCaps |= DDSCAPS_PRIMARYSURFACE;
-
- if( DD_OK == pDDraw->CreateSurface( &aDDDesc, &pDDSurface, NULL ) )
- {
- if( DD_OK == pDDraw->CreateClipper( 0, &pDDClipper, NULL ) )
- {
- pDDClipper->SetHWnd( 0, (HWND) mnFrameWnd );
- pDDSurface->SetClipper( pDDClipper );
- }
-
- mrPlayer.setDDrawParams( (IDirectDraw*) pDDraw, (IDirectDrawSurface*) pDDSurface );
-#endif
-
pVideoWindow->put_Owner( (OAHWND) mnFrameWnd );
pVideoWindow->put_MessageDrain( (OAHWND) mnFrameWnd );
pVideoWindow->put_WindowStyle( WS_VISIBLE | WS_CHILD | WS_CLIPSIBLINGS | WS_CLIPCHILDREN );
@@ -377,11 +347,6 @@ bool Window::create( const uno::Sequence< uno::Any >& rArguments )
meZoomLevel = media::ZoomLevel_ORIGINAL;
ImplLayoutVideoWindow();
-#ifdef DDRAW_TEST_OUTPUT
- }
- }
- }
-#endif
}
}
@@ -404,7 +369,6 @@ void Window::updatePointer()
switch( mnPointerType )
{
case( awt::SystemPointer::CROSS ): pCursorName = IDC_CROSS; break;
- //case( awt::SystemPointer::HAND ): pCursorName = IDC_HAND; break;
case( awt::SystemPointer::MOVE ): pCursorName = IDC_SIZEALL; break;
case( awt::SystemPointer::WAIT ): pCursorName = IDC_WAIT; break;
diff --git a/avmedia/source/win/winuno.cxx b/avmedia/source/win/winuno.cxx
index 8f4b3d6e93..f444e8f14d 100644
--- a/avmedia/source/win/winuno.cxx
+++ b/avmedia/source/win/winuno.cxx
@@ -49,33 +49,6 @@ extern "C" void SAL_CALL component_getImplementationEnvironment( const sal_Char
*ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
}
-// -----------------------
-// - component_writeInfo -
-// -----------------------
-
-extern "C" sal_Bool SAL_CALL component_writeInfo( void*, 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_DirectX/UNO/SERVICES/com.sun.star.media.Manager_DirectX" ) ) );
-
- bRet = sal_True;
- }
- catch( registry::InvalidRegistryException& )
- {
- OSL_ENSURE( sal_False, "### InvalidRegistryException!" );
- }
- }
-
- return bRet;
-}
-
// ------------------------
// - component_getFactory -
// ------------------------
@@ -85,13 +58,13 @@ extern "C" void* SAL_CALL component_getFactory( const sal_Char* pImplName, void*
uno::Reference< lang::XSingleServiceFactory > xFactory;
void* pRet = 0;
- if( rtl_str_compare( pImplName, "com.sun.star.comp.media.Manager_DirectX" ) == 0 )
+ if( rtl_str_compare( pImplName, "com.sun.star.comp.avmedia.Manager_DirectX" ) == 0 )
{
- const ::rtl::OUString aServiceName( ::rtl::OUString::createFromAscii( "com.sun.star.media.Manager_DirectX" ) );
+ const ::rtl::OUString aServiceName( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.media.Manager_DirectX" )) );
xFactory = uno::Reference< lang::XSingleServiceFactory >( ::cppu::createSingleFactory(
reinterpret_cast< lang::XMultiServiceFactory* >( pServiceManager ),
- ::rtl::OUString::createFromAscii( "com.sun.star.comp.media.Manager_DirectX" ),
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.avmedia.Manager_DirectX" )),
create_MediaPlayer, uno::Sequence< ::rtl::OUString >( &aServiceName, 1 ) ) );
}
diff --git a/avmedia/source/xine/exports.dxp b/avmedia/source/xine/exports.dxp
deleted file mode 100644
index db9c0a52f2..0000000000
--- a/avmedia/source/xine/exports.dxp
+++ /dev/null
@@ -1,4 +0,0 @@
-component_getImplementationEnvironment
-component_writeInfo
-component_getFactory
-
diff --git a/avmedia/source/xine/makefile.mk b/avmedia/source/xine/makefile.mk
deleted file mode 100644
index 3ba341c0d3..0000000000
--- a/avmedia/source/xine/makefile.mk
+++ /dev/null
@@ -1,64 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org 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 version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..
-PRJNAME=avmediaxine
-TARGET=avmediaxine
-
-# --- Settings ----------------------------------
-
-.INCLUDE : settings.mk
-
-.IF "$(verbose)"!="" || "$(VERBOSE)"!=""
-CDEFS+= -DVERBOSE
-.ENDIF
-
-# --- Files ----------------------------------
-
-.IF "$(GUI)" == "UNX" && "$(GUIBASE)"!="aqua"
-
-SLOFILES= \
- $(SLO)$/xineuno.obj \
- $(SLO)$/manager.obj \
- $(SLO)$/window.obj \
- $(SLO)$/player.obj
-
-EXCEPTIONSFILES= \
- $(SLO)$/xineuno.obj
-
-SHL1TARGET=$(TARGET)
-SHL1STDLIBS= $(CPPULIB) $(SALLIB) $(COMPHELPERLIB) $(CPPUHELPERLIB)
-SHL1IMPLIB=i$(TARGET)
-SHL1LIBS=$(SLB)$/$(TARGET).lib
-SHL1DEF=$(MISC)$/$(SHL1TARGET).def
-
-DEF1NAME=$(SHL1TARGET)
-DEF1EXPORTFILE=exports.dxp
-
-.ENDIF
-
-.INCLUDE : target.mk
diff --git a/avmedia/source/xine/manager.cxx b/avmedia/source/xine/manager.cxx
deleted file mode 100644
index 151a63001f..0000000000
--- a/avmedia/source/xine/manager.cxx
+++ /dev/null
@@ -1,94 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org 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 version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#include "manager.hxx"
-#include "player.hxx"
-
-using namespace ::com::sun::star;
-
-namespace avmedia { namespace xine {
-// ----------------
-// - Manager -
-// ----------------
-
-Manager::Manager( const uno::Reference< lang::XMultiServiceFactory >& rxMgr ) :
- mxMgr( rxMgr )
-{
-}
-
-// ------------------------------------------------------------------------------
-
-Manager::~Manager()
-{
-}
-
-// ------------------------------------------------------------------------------
-
-uno::Reference< media::XPlayer > SAL_CALL Manager::createPlayer( const ::rtl::OUString& aURL )
- throw (uno::RuntimeException)
-{
- Player* pPlayer( new Player );
- uno::Reference< media::XPlayer > xRet( pPlayer );
-
- if( !pPlayer->create( aURL ) )
- xRet = uno::Reference< media::XPlayer >();
-
- return xRet;
-}
-
-// ------------------------------------------------------------------------------
-
-::rtl::OUString SAL_CALL Manager::getImplementationName( )
- throw (uno::RuntimeException)
-{
- return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( AVMEDIA_XINE_MANAGER_IMPLEMENTATIONNAME ) );
-}
-
-// ------------------------------------------------------------------------------
-
-sal_Bool SAL_CALL Manager::supportsService( const ::rtl::OUString& ServiceName )
- throw (uno::RuntimeException)
-{
- return ServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( AVMEDIA_XINE_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_XINE_MANAGER_SERVICENAME ) );
-
- return aRet;
-}
-
-} // namespace xine
-} // namespace avmedia
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/avmedia/source/xine/manager.hxx b/avmedia/source/xine/manager.hxx
deleted file mode 100644
index 93cd7b6deb..0000000000
--- a/avmedia/source/xine/manager.hxx
+++ /dev/null
@@ -1,67 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org 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 version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef _MANAGER_HXX
-#define _MANAGER_HXX
-
-#include "xinecommon.hxx"
-
-#include "com/sun/star/media/XManager.hdl"
-
-// -----------
-// - Manager -
-// -----------
-
-namespace avmedia { namespace xine {
-
-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 xine
-} // namespace avmedia
-
-#endif // _MANAGER_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/avmedia/source/xine/player.cxx b/avmedia/source/xine/player.cxx
deleted file mode 100644
index 71b62b9e1a..0000000000
--- a/avmedia/source/xine/player.cxx
+++ /dev/null
@@ -1,265 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org 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 version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#include "player.hxx"
-#include "window.hxx"
-
-using namespace ::com::sun::star;
-
-namespace avmedia { namespace xine {
-
-// ----------------
-// - Player -
-// ----------------
-
-Player::Player()
-{
-}
-
-// ------------------------------------------------------------------------------
-
-Player::~Player()
-{
-}
-
-// ------------------------------------------------------------------------------
-
-bool Player::create( const ::rtl::OUString& /* rURL */ )
-{
- bool bRet = false;
-
-
- return bRet;
-}
-
-// ------------------------------------------------------------------------------
-
-void SAL_CALL Player::start( )
- throw (uno::RuntimeException)
-{
-}
-
-// ------------------------------------------------------------------------------
-
-void SAL_CALL Player::stop( )
- throw (uno::RuntimeException)
-{
-}
-
-// ------------------------------------------------------------------------------
-
-sal_Bool SAL_CALL Player::isPlaying()
- throw (uno::RuntimeException)
-{
- bool bRet = false;
-
- return bRet;
-}
-
-// ------------------------------------------------------------------------------
-
-double SAL_CALL Player::getDuration( )
- throw (uno::RuntimeException)
-{
- double fRet = 0.0;
-
- return fRet;
-}
-
-// ------------------------------------------------------------------------------
-
-void SAL_CALL Player::setMediaTime( double /* fTime */ )
- throw (uno::RuntimeException)
-{
-}
-
-// ------------------------------------------------------------------------------
-
-double SAL_CALL Player::getMediaTime( )
- throw (uno::RuntimeException)
-{
- double fRet = 0.0;
-
- return fRet;
-}
-
-// ------------------------------------------------------------------------------
-
-void SAL_CALL Player::setStopTime( double /* fTime */ )
- throw (uno::RuntimeException)
-{
-}
-
-// ------------------------------------------------------------------------------
-
-double SAL_CALL Player::getStopTime( )
- throw (uno::RuntimeException)
-{
- double fRet = 0.0;
-
- return fRet;
-}
-
-// ------------------------------------------------------------------------------
-
-void SAL_CALL Player::setRate( double /* fRate */ )
- throw (uno::RuntimeException)
-{
-}
-
-// ------------------------------------------------------------------------------
-
-double SAL_CALL Player::getRate( )
- throw (uno::RuntimeException)
-{
- double fRet = 0.0;
-
- return fRet;
-}
-
-// ------------------------------------------------------------------------------
-
-void SAL_CALL Player::setPlaybackLoop( sal_Bool /* bSet */ )
- throw (uno::RuntimeException)
-{
-}
-
-// ------------------------------------------------------------------------------
-
-sal_Bool SAL_CALL Player::isPlaybackLoop( )
- throw (uno::RuntimeException)
-{
- bool bRet = false;
-
- return bRet;
-}
-
-// ------------------------------------------------------------------------------
-
-void SAL_CALL Player::setMute( sal_Bool /* bSet */ )
- throw (uno::RuntimeException)
-{
-}
-
-// ------------------------------------------------------------------------------
-
-sal_Bool SAL_CALL Player::isMute( )
- throw (uno::RuntimeException)
-{
- bool bRet = false;
-
- return bRet;
-}
-
-// ------------------------------------------------------------------------------
-
-void SAL_CALL Player::setVolumeDB( sal_Int16 /* nVolumeDB */ )
- throw (uno::RuntimeException)
-{
-}
-
-// ------------------------------------------------------------------------------
-
-sal_Int16 SAL_CALL Player::getVolumeDB( )
- throw (uno::RuntimeException)
-{
- sal_Int16 nRet = 0;
-
- return nRet;
-}
-
-// ------------------------------------------------------------------------------
-
-awt::Size SAL_CALL Player::getPreferredPlayerWindowSize( )
- throw (uno::RuntimeException)
-{
- awt::Size aSize( 0, 0 );
-
- return aSize;
-}
-
-// ------------------------------------------------------------------------------
-
-uno::Reference< ::media::XPlayerWindow > SAL_CALL Player::createPlayerWindow( const uno::Sequence< uno::Any >& aArguments )
- throw (uno::RuntimeException)
-{
- uno::Reference< ::media::XPlayerWindow > xRet;
- awt::Size aSize( getPreferredPlayerWindowSize() );
-
- if( aSize.Width > 0 && aSize.Height > 0 )
- {
- ::avmedia::xine::Window* pWindow = new ::avmedia::xine::Window( *this );
-
- xRet = pWindow;
-
- if( !pWindow->create( aArguments ) )
- xRet = uno::Reference< ::media::XPlayerWindow >();
- }
-
- return xRet;
-}
-
-// ------------------------------------------------------------------------------
-
-uno::Reference< media::XFrameGrabber > SAL_CALL Player::createFrameGrabber( )
- throw (::com::sun::star::uno::RuntimeException)
-{
- return NULL;
-}
-
-// ------------------------------------------------------------------------------
-
-::rtl::OUString SAL_CALL Player::getImplementationName( )
- throw (uno::RuntimeException)
-{
- return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( AVMEDIA_XINE_PLAYER_IMPLEMENTATIONNAME ) );
-}
-
-// ------------------------------------------------------------------------------
-
-sal_Bool SAL_CALL Player::supportsService( const ::rtl::OUString& ServiceName )
- throw (uno::RuntimeException)
-{
- return ServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( AVMEDIA_XINE_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_XINE_PLAYER_SERVICENAME ) );
-
- return aRet;
-}
-
-} // namespace xine
-} // namespace avmedia
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/avmedia/source/xine/player.hxx b/avmedia/source/xine/player.hxx
deleted file mode 100644
index cb503e61af..0000000000
--- a/avmedia/source/xine/player.hxx
+++ /dev/null
@@ -1,85 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org 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 version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef _PLAYER_HXX
-#define _PLAYER_HXX
-
-#include "xinecommon.hxx"
-
-#include "com/sun/star/media/XPlayer.hdl"
-
-namespace avmedia { namespace xine {
-
-// ----------
-// - Player -
-// ----------
-
-class Player : public ::cppu::WeakImplHelper2< ::com::sun::star::media::XPlayer,
- ::com::sun::star::lang::XServiceInfo >
-{
-public:
-
- Player();
- ~Player();
-
- bool create( const ::rtl::OUString& rURL );
-
- // 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:
-};
-
-} // namespace xine
-} // namespace avmedia
-
-#endif // _PLAYER_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/avmedia/source/xine/window.cxx b/avmedia/source/xine/window.cxx
deleted file mode 100644
index 4634233769..0000000000
--- a/avmedia/source/xine/window.cxx
+++ /dev/null
@@ -1,574 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org 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 version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#include <com/sun/star/awt/SystemPointer.hdl>
-
-#include "window.hxx"
-#include "player.hxx"
-
-using namespace ::com::sun::star;
-
-namespace avmedia { namespace xine {
-
-// -----------
-// - 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;
-}
-
-// -----------
-// - WndProc -
-// -----------
-
-/*
-LRESULT CALLBACK MediaPlayerWndProc( HWND hWnd,UINT nMsg, WPARAM nPar1, LPARAM nPar2 )
-{
- Window* pWindow = (Window*) ::GetWindowLong( hWnd, 0 );
- bool bProcessed = true;
-
- if( pWindow )
- {
- switch( nMsg )
- {
- case( WM_SETCURSOR ):
- pWindow->updatePointer();
- break;
-
- case( WM_GRAPHNOTIFY ):
- pWindow->processGraphEvent();
- break;
-
- case( WM_MOUSEMOVE ):
- case( WM_LBUTTONDOWN ):
- case( WM_MBUTTONDOWN ):
- case( WM_RBUTTONDOWN ):
- case( WM_LBUTTONUP ):
- case( WM_MBUTTONUP ):
- case( WM_RBUTTONUP ):
- {
- awt::MouseEvent aUNOEvt;
- POINT aWinPoint;
-
- if( !::GetCursorPos( &aWinPoint ) || !::ScreenToClient( hWnd, &aWinPoint ) )
- {
- aWinPoint.x = GET_X_LPARAM( nPar2 );
- aWinPoint.y = GET_Y_LPARAM( nPar2 );
- }
- aUNOEvt.Modifiers = 0;
- aUNOEvt.Buttons = 0;
- aUNOEvt.X = aWinPoint.x;
- aUNOEvt.Y = aWinPoint.y;
- aUNOEvt.PopupTrigger = false;
-
- // Modifiers
- if( nPar1 & MK_SHIFT )
- aUNOEvt.Modifiers |= awt::KeyModifier::SHIFT;
-
- if( nPar1 & MK_CONTROL )
- aUNOEvt.Modifiers |= awt::KeyModifier::MOD1;
-
- // Buttons
- if( WM_LBUTTONDOWN == nMsg || WM_LBUTTONUP == nMsg )
- aUNOEvt.Buttons |= awt::MouseButton::LEFT;
-
- if( WM_MBUTTONDOWN == nMsg || WM_MBUTTONUP == nMsg )
- aUNOEvt.Buttons |= awt::MouseButton::MIDDLE;
-
- if( WM_RBUTTONDOWN == nMsg || WM_RBUTTONUP == nMsg )
- aUNOEvt.Buttons |= awt::MouseButton::RIGHT;
-
- // event type
- if( WM_LBUTTONDOWN == nMsg ||
- WM_MBUTTONDOWN == nMsg ||
- WM_RBUTTONDOWN == nMsg )
- {
- aUNOEvt.ClickCount = 1;
- pWindow->fireMousePressedEvent( aUNOEvt );
- }
- else if( WM_LBUTTONUP == nMsg ||
- WM_MBUTTONUP == nMsg ||
- WM_RBUTTONUP == nMsg )
- {
- aUNOEvt.ClickCount = 1;
- pWindow->fireMouseReleasedEvent( aUNOEvt );
- }
- else if( WM_MOUSEMOVE == nMsg )
- {
- aUNOEvt.ClickCount = 0;
- pWindow->fireMouseMovedEvent( aUNOEvt );
- pWindow->updatePointer();
- }
- }
- break;
-
- case( WM_SETFOCUS ):
- {
- const awt::FocusEvent aUNOEvt;
- pWindow->fireSetFocusEvent( aUNOEvt );
- }
- break;
-
- default:
- bProcessed = false;
- break;
- }
- }
- else
- bProcessed = false;
-
- return( bProcessed ? 0 : DefWindowProc( hWnd, nMsg, nPar1, nPar2 ) );
-}
-*/
-
-// ---------------
-// - Window -
-// ---------------
-
-Window::Window( Player& rPlayer ) :
- mrPlayer( rPlayer ),
- maListeners( maMutex ),
- meZoomLevel( media::ZoomLevel_NOT_AVAILABLE ),
- mnPointerType( awt::SystemPointer::ARROW )
-{
- ::osl::MutexGuard aGuard( ImplGetOwnStaticMutex() );
-}
-
-// ------------------------------------------------------------------------------
-
-Window::~Window()
-{
-}
-
-// ------------------------------------------------------------------------------
-
-void Window::implLayoutVideoWindow()
-{
- if( media::ZoomLevel_NOT_AVAILABLE != meZoomLevel )
- {
- awt::Size aPrefSize( mrPlayer.getPreferredPlayerWindowSize() );
- awt::Rectangle aRect = getPosSize();
- int nW = aRect.Width, nH = aRect.Height;
- int nVideoW = nW, nVideoH = nH;
- int nX = 0, nY = 0, nWidth = 0, nHeight = 0;
- bool bDone = false, bZoom = false;
-
- if( media::ZoomLevel_ORIGINAL == meZoomLevel )
- {
- bZoom = true;
- }
- else if( media::ZoomLevel_ZOOM_1_TO_4 == meZoomLevel )
- {
- aPrefSize.Width >>= 2;
- aPrefSize.Height >>= 2;
- bZoom = true;
- }
- else if( media::ZoomLevel_ZOOM_1_TO_2 == meZoomLevel )
- {
- aPrefSize.Width >>= 1;
- aPrefSize.Height >>= 1;
- bZoom = true;
- }
- else if( media::ZoomLevel_ZOOM_2_TO_1 == meZoomLevel )
- {
- aPrefSize.Width <<= 1;
- aPrefSize.Height <<= 1;
- bZoom = true;
- }
- else if( media::ZoomLevel_ZOOM_4_TO_1 == meZoomLevel )
- {
- aPrefSize.Width <<= 2;
- aPrefSize.Height <<= 2;
- bZoom = true;
- }
- else if( media::ZoomLevel_FIT_TO_WINDOW == meZoomLevel )
- {
- nWidth = nVideoW;
- nHeight = nVideoH;
- bDone = true;
- }
-
- if( bZoom )
- {
- if( ( aPrefSize.Width <= nVideoW ) && ( aPrefSize.Height <= nVideoH ) )
- {
- nX = ( nVideoW - aPrefSize.Width ) >> 1;
- nY = ( nVideoH - aPrefSize.Height ) >> 1;
- nWidth = aPrefSize.Width;
- nHeight = aPrefSize.Height;
- bDone = true;
- }
- }
-
- if( !bDone )
- {
- if( aPrefSize.Width > 0 && aPrefSize.Height > 0 && nVideoW > 0 && nVideoH > 0 )
- {
- double fPrefWH = (double) aPrefSize.Width / aPrefSize.Height;
-
- if( fPrefWH < ( (double) nVideoW / nVideoH ) )
- nVideoW = (int)( nVideoH * fPrefWH );
- else
- nVideoH = (int)( nVideoW / fPrefWH );
-
- nX = ( nW - nVideoW ) >> 1;
- nY = ( nH - nVideoH ) >> 1;
- nWidth = nVideoW;
- nHeight = nVideoH;
- }
- else
- nX = nY = nWidth = nHeight = 0;
- }
-
- /*
- IVideoWindow* pVideoWindow = const_cast< IVideoWindow* >( mrPlayer.getVideoWindow() );
-
- if( pVideoWindow )
- pVideoWindow->SetWindowPosition( nX, nY, nWidth, nHeight );
- */
- }
-}
-
-// ------------------------------------------------------------------------------
-
-bool Window::create( const uno::Sequence< uno::Any >& /*rArguments*/ )
-{
- bool bRet = false;
-
- return bRet;
-}
-
-// ------------------------------------------------------------------------------
-
-void SAL_CALL Window::update( )
- throw (uno::RuntimeException)
-{
-}
-
-// ------------------------------------------------------------------------------
-
-sal_Bool SAL_CALL Window::setZoomLevel( media::ZoomLevel eZoomLevel )
- throw (uno::RuntimeException)
-{
- 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;
-}
-
-// ------------------------------------------------------------------------------
-
-void SAL_CALL Window::setPosSize( sal_Int32 /*X*/, sal_Int32 /*Y*/, sal_Int32 /*Width*/, sal_Int32 /*Height*/, sal_Int16 /*Flags*/ )
- throw (uno::RuntimeException)
-{
- implLayoutVideoWindow();
-}
-
-// ------------------------------------------------------------------------------
-
-awt::Rectangle SAL_CALL Window::getPosSize()
- throw (uno::RuntimeException)
-{
- awt::Rectangle aRet;
-
- return aRet;
-}
-
-// ------------------------------------------------------------------------------
-
-void SAL_CALL Window::setVisible( sal_Bool /* bVisible */ )
- throw (uno::RuntimeException)
-{
-}
-
-// ------------------------------------------------------------------------------
-
-void SAL_CALL Window::setEnable( sal_Bool /* bEnable */ )
- throw (uno::RuntimeException)
-{
-}
-
-// ------------------------------------------------------------------------------
-
-void SAL_CALL Window::setFocus( )
- throw (uno::RuntimeException)
-{
-}
-
-// ------------------------------------------------------------------------------
-
-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 );
-}
-
-// ------------------------------------------------------------------------------
-
-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 );
-}
-
-// ------------------------------------------------------------------------------
-
-void Window::fireMousePressedEvent( const ::com::sun::star::awt::MouseEvent& rEvt )
-{
- ::cppu::OInterfaceContainerHelper* pContainer = maListeners.getContainer( getCppuType( (uno::Reference< awt::XMouseListener >*) 0 ) );
-
- if( pContainer )
- {
- ::cppu::OInterfaceIteratorHelper aIter( *pContainer );
-
- while( aIter.hasMoreElements() )
- uno::Reference< awt::XMouseListener >( aIter.next(), uno::UNO_QUERY )->mousePressed( rEvt );
- }
-}
-
-// -----------------------------------------------------------------------------
-
-void Window::fireMouseReleasedEvent( const ::com::sun::star::awt::MouseEvent& rEvt )
-{
- ::cppu::OInterfaceContainerHelper* pContainer = maListeners.getContainer( getCppuType( (uno::Reference< awt::XMouseListener >*) 0 ) );
-
- if( pContainer )
- {
- ::cppu::OInterfaceIteratorHelper aIter( *pContainer );
-
- while( aIter.hasMoreElements() )
- uno::Reference< awt::XMouseListener >( aIter.next(), uno::UNO_QUERY )->mouseReleased( rEvt );
- }
-}
-
-// -----------------------------------------------------------------------------
-
-void Window::fireMouseMovedEvent( const ::com::sun::star::awt::MouseEvent& rEvt )
-{
- ::cppu::OInterfaceContainerHelper* pContainer = maListeners.getContainer( getCppuType( (uno::Reference< awt::XMouseMotionListener >*) 0 ) );
-
- if( pContainer )
- {
- ::cppu::OInterfaceIteratorHelper aIter( *pContainer );
-
- while( aIter.hasMoreElements() )
- uno::Reference< awt::XMouseMotionListener >( aIter.next(), uno::UNO_QUERY )->mouseMoved( rEvt );
- }
-}
-
-// -----------------------------------------------------------------------------
-
-void Window::fireSetFocusEvent( const ::com::sun::star::awt::FocusEvent& rEvt )
-{
- ::cppu::OInterfaceContainerHelper* pContainer = maListeners.getContainer( getCppuType( (uno::Reference< awt::XFocusListener >*) 0 ) );
-
- if( pContainer )
- {
- ::cppu::OInterfaceIteratorHelper aIter( *pContainer );
-
- while( aIter.hasMoreElements() )
- uno::Reference< awt::XFocusListener >( aIter.next(), uno::UNO_QUERY )->focusGained( rEvt );
- }
-}
-
-// ------------------------------------------------------------------------------
-
-::rtl::OUString SAL_CALL Window::getImplementationName( )
- throw (uno::RuntimeException)
-{
- return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( AVMEDIA_XINE_WINDOW_IMPLEMENTATIONNAME ) );
-}
-
-// ------------------------------------------------------------------------------
-
-sal_Bool SAL_CALL Window::supportsService( const ::rtl::OUString& ServiceName )
- throw (uno::RuntimeException)
-{
- return ServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( AVMEDIA_XINE_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_XINE_WINDOW_SERVICENAME ) );
-
- return aRet;
-}
-
-} // namespace xine
-} // namespace avmedia
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/avmedia/source/xine/window.hxx b/avmedia/source/xine/window.hxx
deleted file mode 100644
index 1db5bc65c5..0000000000
--- a/avmedia/source/xine/window.hxx
+++ /dev/null
@@ -1,115 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org 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 version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef _WINDOW_HXX
-#define _WINDOW_HXX
-
-#include "xinecommon.hxx"
-#include <cppuhelper/interfacecontainer.h>
-
-#include "com/sun/star/media/XPlayerWindow.hdl"
-
-namespace avmedia { namespace xine {
-
-// ---------------
-// - Window -
-// ---------------
-
-class Player;
-
-class Window : public ::cppu::WeakImplHelper2 < ::com::sun::star::media::XPlayerWindow,
- ::com::sun::star::lang::XServiceInfo >
-{
-public:
-
- Window( Player& rPlayer );
- ~Window();
-
- bool create( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments );
-
- // 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);
-
-public:
-
- void fireMousePressedEvent( const ::com::sun::star::awt::MouseEvent& rEvt );
- void fireMouseReleasedEvent( const ::com::sun::star::awt::MouseEvent& rEvt );
- void fireMouseMovedEvent( const ::com::sun::star::awt::MouseEvent& rEvt );
- void fireKeyPressedEvent( const ::com::sun::star::awt::KeyEvent& rEvt );
- void fireKeyReleasedEvent( const ::com::sun::star::awt::KeyEvent& rEvt );
- void fireSetFocusEvent( const ::com::sun::star::awt::FocusEvent& rEvt );
-
-private:
-
- ::osl::Mutex maMutex;
- Player& mrPlayer;
- ::cppu::OMultiTypeInterfaceContainerHelper maListeners;
- ::com::sun::star::media::ZoomLevel meZoomLevel;
- sal_Int32 mnPointerType;
-
- void implLayoutVideoWindow();
-};
-
-} // namespace xine
-} // namespace avmedia
-
-#endif // _WINDOW_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/avmedia/source/xine/xinecommon.hxx b/avmedia/source/xine/xinecommon.hxx
deleted file mode 100644
index 11f964f205..0000000000
--- a/avmedia/source/xine/xinecommon.hxx
+++ /dev/null
@@ -1,68 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org 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 version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef _XINECOMMON_HXX
-#define _XINECOMMON_HXX
-
-#include <osl/mutex.hxx>
-#ifndef __RTL_USTRING_
-#include <rtl/ustring.hxx>
-#endif
-#include <tools/debug.hxx>
-#include <tools/stream.hxx>
-#include <tools/string.hxx>
-#include <tools/urlobj.hxx>
-#include <cppuhelper/implbase1.hxx>
-#include <cppuhelper/implbase2.hxx>
-#include <cppuhelper/weak.hxx>
-#include <cppuhelper/factory.hxx>
-
-#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 AVMEDIA_XINE_MANAGER_IMPLEMENTATIONNAME "com.sun.star.comp.avmedia.Manager_Xine"
-#define AVMEDIA_XINE_MANAGER_SERVICENAME "com.sun.star.media.Manager_Xine"
-
-#define AVMEDIA_XINE_PLAYER_IMPLEMENTATIONNAME "com.sun.star.comp.avmedia.Player_Xine"
-#define AVMEDIA_XINE_PLAYER_SERVICENAME "com.sun.star.media.Player_Xine"
-
-#define AVMEDIA_XINE_WINDOW_IMPLEMENTATIONNAME "com.sun.star.comp.avmedia.Window_Xine"
-#define AVMEDIA_XINE_WINDOW_SERVICENAME "com.sun.star.media.Window_Xine"
-
-#endif // _XINECOMMOM_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/avmedia/source/xine/xineuno.cxx b/avmedia/source/xine/xineuno.cxx
deleted file mode 100644
index 72d87fcae7..0000000000
--- a/avmedia/source/xine/xineuno.cxx
+++ /dev/null
@@ -1,109 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org 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 version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#include "xinecommon.hxx"
-#include "manager.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::xine::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(
- "/" AVMEDIA_XINE_MANAGER_IMPLEMENTATIONNAME "/UNO/SERVICES/"
- AVMEDIA_XINE_MANAGER_SERVICENAME ) ) );
-
- 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, AVMEDIA_XINE_MANAGER_IMPLEMENTATIONNAME ) == 0 )
- {
- const ::rtl::OUString aServiceName( ::rtl::OUString::createFromAscii( AVMEDIA_XINE_MANAGER_SERVICENAME ) );
-
- xFactory = uno::Reference< lang::XSingleServiceFactory >( ::cppu::createSingleFactory(
- reinterpret_cast< lang::XMultiServiceFactory* >( pServiceManager ),
- ::rtl::OUString::createFromAscii( AVMEDIA_XINE_MANAGER_IMPLEMENTATIONNAME ),
- create_MediaPlayer, uno::Sequence< ::rtl::OUString >( &aServiceName, 1 ) ) );
- }
-
- if( xFactory.is() )
- {
- xFactory->acquire();
- pRet = xFactory.get();
- }
-
- return pRet;
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/avmedia/util/avmedia.component b/avmedia/util/avmedia.component
new file mode 100755
index 0000000000..fa01dc03eb
--- /dev/null
+++ b/avmedia/util/avmedia.component
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--**********************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2000, 2010 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org 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 version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+**********************************************************************-->
+
+<component loader="com.sun.star.loader.SharedLibrary"
+ xmlns="http://openoffice.org/2010/uno-components">
+ <implementation name="com.sun.star.comp.framework.SoundHandler">
+ <service name="com.sun.star.frame.ContentHandler"/>
+ </implementation>
+</component>
diff --git a/avmedia/util/hidother.src b/avmedia/util/hidother.src
index c8352e29cb..c8352e29cb 100755..100644
--- a/avmedia/util/hidother.src
+++ b/avmedia/util/hidother.src
diff --git a/avmedia/util/makefile.mk b/avmedia/util/makefile.mk
index bd167e8744..6d12706a26 100644..100755
--- a/avmedia/util/makefile.mk
+++ b/avmedia/util/makefile.mk
@@ -77,3 +77,11 @@ $(MISC)$/$(SHL1TARGET).flt: makefile.mk
@echo LibMain>>$@
@echo CT>>$@
.ENDIF
+
+ALLTAR : $(MISC)/avmedia.component
+
+$(MISC)/avmedia.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
+ avmedia.component
+ $(XSLTPROC) --nonet --stringparam uri \
+ '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \
+ $(SOLARENV)/bin/createcomponent.xslt avmedia.component