diff options
Diffstat (limited to 'avmedia')
85 files changed, 320 insertions, 283 deletions
diff --git a/avmedia/inc/avmedia/mediaitem.hxx b/avmedia/inc/avmedia/mediaitem.hxx index 753deeec6d52..4ae504fc58c9 100644..100755 --- 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 2c2704a5e657..2d49f80e2af7 100644..100755 --- 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 1f0fd47b18bd..3b5023a4c908 100644..100755 --- 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 5b56f1fd3aa2..5b56f1fd3aa2 100644..100755 --- a/avmedia/inc/avmedia/mediawindow.hxx +++ b/avmedia/inc/avmedia/mediawindow.hxx diff --git a/avmedia/inc/helpids.hrc b/avmedia/inc/helpids.hrc index 2d7ccd764762..4b1d2e04d628 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/inc/mediacontrol.hxx b/avmedia/inc/mediacontrol.hxx index 022a32eb9586..022a32eb9586 100644..100755 --- a/avmedia/inc/mediacontrol.hxx +++ b/avmedia/inc/mediacontrol.hxx diff --git a/avmedia/prj/build.lst b/avmedia/prj/build.lst index 025e85097323..7d9343b916fd 100644..100755 --- a/avmedia/prj/build.lst +++ b/avmedia/prj/build.lst @@ -1,4 +1,4 @@ -av avmedia : l10n tools sfx2 NULL +av avmedia : L10N:l10n 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 @@ -7,5 +7,5 @@ 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\quicktime nmake - all av_quicktime NULL -av avmedia\source\gstreamer nmake - all 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 c82db252aab8..23f7c35723cf 100644..100755 --- 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 4c814c534844..4c814c534844 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 0bb5f0c93760..e69d4d3b93a0 100644..100755 --- a/avmedia/source/framework/mediacontrol.cxx +++ b/avmedia/source/framework/mediacontrol.cxx @@ -87,12 +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 ); @@ -103,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 ); } @@ -366,7 +363,7 @@ void MediaControl::implUpdateToolboxes() if( !mpZoomListBox->IsTravelSelect() && !mpZoomListBox->IsInDropDown() ) { - USHORT nSelectEntryPos ; + sal_uInt16 nSelectEntryPos ; switch( maItem.getZoom() ) { @@ -458,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 f69ab937f5f5..f69ab937f5f5 100644..100755 --- a/avmedia/source/framework/mediacontrol.hrc +++ b/avmedia/source/framework/mediacontrol.hrc diff --git a/avmedia/source/framework/mediacontrol.src b/avmedia/source/framework/mediacontrol.src index 22ddc29b3550..22ddc29b3550 100644..100755 --- a/avmedia/source/framework/mediacontrol.src +++ b/avmedia/source/framework/mediacontrol.src diff --git a/avmedia/source/framework/mediaitem.cxx b/avmedia/source/framework/mediaitem.cxx index 5ed6c0d4ea69..babaa39b427c 100644..100755 --- 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/mediamisc.cxx b/avmedia/source/framework/mediamisc.cxx index 882f5db55d9c..882f5db55d9c 100644..100755 --- a/avmedia/source/framework/mediamisc.cxx +++ b/avmedia/source/framework/mediamisc.cxx diff --git a/avmedia/source/framework/mediaplayer.cxx b/avmedia/source/framework/mediaplayer.cxx index af6fde31d984..350e4e92bbe2 100644..100755 --- 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 e6c7750b37a4..cb795692011b 100644..100755 --- 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 188527b20d2e..c8213f6c1301 100644..100755 --- a/avmedia/source/framework/soundhandler.cxx +++ b/avmedia/source/framework/soundhandler.cxx @@ -493,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 d76bd13df5b7..d76bd13df5b7 100644..100755 --- a/avmedia/source/framework/soundhandler.hxx +++ b/avmedia/source/framework/soundhandler.hxx diff --git a/avmedia/source/framework/soundhandler.xml b/avmedia/source/framework/soundhandler.xml index 065b31a2c402..065b31a2c402 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 index 8671b11a9720..8671b11a9720 100644..100755 --- a/avmedia/source/gstreamer/ChangeLog +++ b/avmedia/source/gstreamer/ChangeLog diff --git a/avmedia/source/gstreamer/avmediagst.component b/avmedia/source/gstreamer/avmediagst.component new file mode 100755 index 000000000000..75d39d275f5c --- /dev/null +++ b/avmedia/source/gstreamer/avmediagst.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_GStreamer"> + <service name="com.sun.star.media.Manager_GStreamer"/> + </implementation> +</component> diff --git a/avmedia/source/gstreamer/avmediagstreamer.component b/avmedia/source/gstreamer/avmediagstreamer.component new file mode 100644 index 000000000000..97a8c83709e1 --- /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.avmedia.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 9630d7e06768..f0e1c69934bc 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/gstcommon.hxx b/avmedia/source/gstreamer/gstcommon.hxx index 1d9b5caaff96..1d9b5caaff96 100644..100755 --- a/avmedia/source/gstreamer/gstcommon.hxx +++ b/avmedia/source/gstreamer/gstcommon.hxx diff --git a/avmedia/source/gstreamer/gstframegrabber.cxx b/avmedia/source/gstreamer/gstframegrabber.cxx index e0b161c483fc..e0b161c483fc 100644..100755 --- a/avmedia/source/gstreamer/gstframegrabber.cxx +++ b/avmedia/source/gstreamer/gstframegrabber.cxx diff --git a/avmedia/source/gstreamer/gstframegrabber.hxx b/avmedia/source/gstreamer/gstframegrabber.hxx index fc0795221a88..fc0795221a88 100644..100755 --- a/avmedia/source/gstreamer/gstframegrabber.hxx +++ b/avmedia/source/gstreamer/gstframegrabber.hxx diff --git a/avmedia/source/gstreamer/gstmanager.cxx b/avmedia/source/gstreamer/gstmanager.cxx index 558b94956304..558b94956304 100644..100755 --- a/avmedia/source/gstreamer/gstmanager.cxx +++ b/avmedia/source/gstreamer/gstmanager.cxx diff --git a/avmedia/source/gstreamer/gstmanager.hxx b/avmedia/source/gstreamer/gstmanager.hxx index 2d83215402df..2d83215402df 100644..100755 --- a/avmedia/source/gstreamer/gstmanager.hxx +++ b/avmedia/source/gstreamer/gstmanager.hxx diff --git a/avmedia/source/gstreamer/gstplayer.cxx b/avmedia/source/gstreamer/gstplayer.cxx index 227f1eca8c0c..227f1eca8c0c 100644..100755 --- a/avmedia/source/gstreamer/gstplayer.cxx +++ b/avmedia/source/gstreamer/gstplayer.cxx diff --git a/avmedia/source/gstreamer/gstplayer.hxx b/avmedia/source/gstreamer/gstplayer.hxx index 02839dc9b2bd..02839dc9b2bd 100644..100755 --- a/avmedia/source/gstreamer/gstplayer.hxx +++ b/avmedia/source/gstreamer/gstplayer.hxx diff --git a/avmedia/source/gstreamer/gstuno.cxx b/avmedia/source/gstreamer/gstuno.cxx index 36ac2182fa00..4695ba646a47 100644..100755 --- 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(RTL_CONSTASCII_USTRINGPARAM( "/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; diff --git a/avmedia/source/gstreamer/gstwindow.cxx b/avmedia/source/gstreamer/gstwindow.cxx index 9228f9e6c9a0..9228f9e6c9a0 100644..100755 --- a/avmedia/source/gstreamer/gstwindow.cxx +++ b/avmedia/source/gstreamer/gstwindow.cxx diff --git a/avmedia/source/gstreamer/gstwindow.hxx b/avmedia/source/gstreamer/gstwindow.hxx index 18b9a7dbd0ae..18b9a7dbd0ae 100644..100755 --- a/avmedia/source/gstreamer/gstwindow.hxx +++ b/avmedia/source/gstreamer/gstwindow.hxx diff --git a/avmedia/source/gstreamer/makefile.mk b/avmedia/source/gstreamer/makefile.mk index 2f52b9cc4732..692a63abe743 100644..100755 --- a/avmedia/source/gstreamer/makefile.mk +++ b/avmedia/source/gstreamer/makefile.mk @@ -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 c09e6e098e83..85e14abf9fb2 100644..100755 --- 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 1a0deda4ce57..1a0deda4ce57 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 47707478fd5b..47707478fd5b 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 ca7a164586d8..3e4387840741 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 be3b3d62d367..be3b3d62d367 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 229c651d9f54..2229e4f1644b 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 bd11aec5e738..bd11aec5e738 100644..100755 --- a/avmedia/source/java/WindowAdapter.java +++ b/avmedia/source/java/WindowAdapter.java diff --git a/avmedia/source/java/avmedia.jar b/avmedia/source/java/avmedia.jar Binary files differindex 55576baa5b34..85a98bbcf33c 100644..100755 --- a/avmedia/source/java/avmedia.jar +++ b/avmedia/source/java/avmedia.jar diff --git a/avmedia/source/java/avmedia.jar.component b/avmedia/source/java/avmedia.jar.component new file mode 100755 index 000000000000..d7cc160bd7d0 --- /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 37c53a721164..1fe771c117f2 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 fa9c2500d385..fa9c2500d385 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 ebf3cac99307..ebf3cac99307 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 4292dabe6775..4292dabe6775 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 000000000000..aa0251d74c9d --- /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/framegrabber.cxx b/avmedia/source/quicktime/framegrabber.cxx index 5da2aa2f2836..5da2aa2f2836 100644..100755 --- a/avmedia/source/quicktime/framegrabber.cxx +++ b/avmedia/source/quicktime/framegrabber.cxx diff --git a/avmedia/source/quicktime/framegrabber.hxx b/avmedia/source/quicktime/framegrabber.hxx index 8fa2b5b5fc95..8fa2b5b5fc95 100644..100755 --- a/avmedia/source/quicktime/framegrabber.hxx +++ b/avmedia/source/quicktime/framegrabber.hxx diff --git a/avmedia/source/quicktime/makefile.mk b/avmedia/source/quicktime/makefile.mk index f3c9f244f357..358fce491847 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/manager.cxx b/avmedia/source/quicktime/manager.cxx index ca8da8e5d8b4..ca8da8e5d8b4 100644..100755 --- a/avmedia/source/quicktime/manager.cxx +++ b/avmedia/source/quicktime/manager.cxx diff --git a/avmedia/source/quicktime/manager.hxx b/avmedia/source/quicktime/manager.hxx index 8c8749683ce7..8c8749683ce7 100644..100755 --- a/avmedia/source/quicktime/manager.hxx +++ b/avmedia/source/quicktime/manager.hxx diff --git a/avmedia/source/quicktime/player.cxx b/avmedia/source/quicktime/player.cxx index 8b623e93c8ce..8b623e93c8ce 100644..100755 --- a/avmedia/source/quicktime/player.cxx +++ b/avmedia/source/quicktime/player.cxx diff --git a/avmedia/source/quicktime/player.hxx b/avmedia/source/quicktime/player.hxx index da9bbfc8ec8b..da9bbfc8ec8b 100644..100755 --- a/avmedia/source/quicktime/player.hxx +++ b/avmedia/source/quicktime/player.hxx diff --git a/avmedia/source/quicktime/quicktimecommon.hxx b/avmedia/source/quicktime/quicktimecommon.hxx index 1c22377efe9a..1c22377efe9a 100644..100755 --- a/avmedia/source/quicktime/quicktimecommon.hxx +++ b/avmedia/source/quicktime/quicktimecommon.hxx diff --git a/avmedia/source/quicktime/quicktimeuno.cxx b/avmedia/source/quicktime/quicktimeuno.cxx index 6301fd655ed3..275c9446e23b 100644..100755 --- 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(RTL_CONSTASCII_USTRINGPARAM( - "/" 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 - // ------------------------ diff --git a/avmedia/source/quicktime/window.cxx b/avmedia/source/quicktime/window.cxx index 9b9c14ae2622..9b9c14ae2622 100644..100755 --- a/avmedia/source/quicktime/window.cxx +++ b/avmedia/source/quicktime/window.cxx diff --git a/avmedia/source/quicktime/window.hxx b/avmedia/source/quicktime/window.hxx index e782e6367af9..e782e6367af9 100644..100755 --- a/avmedia/source/quicktime/window.hxx +++ b/avmedia/source/quicktime/window.hxx diff --git a/avmedia/source/viewer/makefile.mk b/avmedia/source/viewer/makefile.mk index 7771d1eb0528..7771d1eb0528 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 0e8dfe0ca295..f7cd33409cea 100644..100755 --- 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/mediaevent_impl.hxx b/avmedia/source/viewer/mediaevent_impl.hxx index 9f282a90688f..9f282a90688f 100644..100755 --- a/avmedia/source/viewer/mediaevent_impl.hxx +++ b/avmedia/source/viewer/mediaevent_impl.hxx diff --git a/avmedia/source/viewer/mediawindow.cxx b/avmedia/source/viewer/mediawindow.cxx index 3b6c28ef93dd..9e784ca6e19a 100644..100755 --- 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 ); + } } // ------------------------------------------------------------------------- @@ -370,6 +372,7 @@ void MediaWindow::getMediaFilters( FilterNameVector& rFilterNameVector ) "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", @@ -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(RTL_CONSTASCII_USTRINGPARAM( 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 ) ) ); - - if( xPlayer.is() ) - { - bRet = true; + const awt::Size aAwtSize( xPlayer->getPreferredPlayerWindowSize() ); - 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 67036e300c13..67036e300c13 100644..100755 --- a/avmedia/source/viewer/mediawindow.hrc +++ b/avmedia/source/viewer/mediawindow.hrc diff --git a/avmedia/source/viewer/mediawindow.src b/avmedia/source/viewer/mediawindow.src index 1c92b4d913af..1c92b4d913af 100644..100755 --- a/avmedia/source/viewer/mediawindow.src +++ b/avmedia/source/viewer/mediawindow.src diff --git a/avmedia/source/viewer/mediawindow_impl.cxx b/avmedia/source/viewer/mediawindow_impl.cxx index 787a5087129b..c79fea8c033f 100644..100755 --- a/avmedia/source/viewer/mediawindow_impl.cxx +++ b/avmedia/source/viewer/mediawindow_impl.cxx @@ -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 { } @@ -115,11 +111,7 @@ 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 ); } @@ -130,11 +122,7 @@ 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 ); } @@ -184,11 +160,7 @@ 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,6 +179,7 @@ MediaWindowImpl::MediaWindowImpl( Window* pParent, MediaWindow* pMediaWindow, bo mpEmptyBmpEx( NULL ), mpAudioBmpEx( NULL ) { + maChildWindow.SetBackground( Color( COL_BLACK ) ); maChildWindow.SetHelpId( HID_AVMEDIA_PLAYERWINDOW ); maChildWindow.Hide(); @@ -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 ) { @@ -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() ); } // --------------------------------------------------------------------- @@ -346,7 +306,6 @@ void MediaWindowImpl::setPointer( const Pointer& rPointer ) if( xPlayerWindow.is() ) { - long nPointer; switch( rPointer.GetStyle() ) @@ -396,10 +355,10 @@ void MediaWindowImpl::Resize() 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 ); } // --------------------------------------------------------------------- @@ -446,7 +405,7 @@ void MediaWindowImpl::Paint( const Rectangle& ) pLogo = mpEmptyBmpEx; } - else if ( !getPlayerWindow().is() ) + else if( !getPlayerWindow().is() ) { if( !mpAudioBmpEx ) mpAudioBmpEx = new BitmapEx( AVMEDIA_RESID( AVMEDIA_BMP_AUDIOLOGO ) ); @@ -487,8 +446,6 @@ void MediaWindowImpl::Paint( const Rectangle& ) 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 f7cbbd8a02e9..fa44d2158863 100644..100755 --- a/avmedia/source/viewer/mediawindow_impl.hxx +++ b/avmedia/source/viewer/mediawindow_impl.hxx @@ -3,10 +3,13 @@ * * 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" @@ -66,11 +65,7 @@ namespace avmedia // - MediaChildWindow - // -------------------- -#ifdef GSTREAMER class MediaChildWindow : public SystemChildWindow -#else - class MediaChildWindow : public JavaChildWindow -#endif { public: diff --git a/avmedia/source/viewer/mediawindowbase_impl.cxx b/avmedia/source/viewer/mediawindowbase_impl.cxx index 07200c554f33..6c2db96b16a3 100644..100755 --- 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 ) { @@ -141,10 +142,7 @@ void MediaWindowBaseImpl::stopPlayingInternal( bool bStop ) { if( isPlaying() ) { - if( bStop ) - mxPlayer->stop(); - else - mxPlayer->start(); + bStop ? mxPlayer->stop() : mxPlayer->start(); } } diff --git a/avmedia/source/viewer/mediawindowbase_impl.hxx b/avmedia/source/viewer/mediawindowbase_impl.hxx index 0e4b48f0e022..1aa615a5986f 100644..100755 --- 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 000000000000..c80c19bff0d9 --- /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 db9c0a52f288..926e49f5f1a5 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 4f8a20475d79..4f8a20475d79 100644..100755 --- a/avmedia/source/win/framegrabber.cxx +++ b/avmedia/source/win/framegrabber.cxx diff --git a/avmedia/source/win/framegrabber.hxx b/avmedia/source/win/framegrabber.hxx index 0499a5086e49..0499a5086e49 100644..100755 --- a/avmedia/source/win/framegrabber.hxx +++ b/avmedia/source/win/framegrabber.hxx diff --git a/avmedia/source/win/interface.hxx b/avmedia/source/win/interface.hxx index 0e1944c4923e..314a9356c9f0 100644..100755 --- 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 7fdb92378da4..7c6c9e14da6e 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/manager.cxx b/avmedia/source/win/manager.cxx index c10a96233766..c10a96233766 100644..100755 --- a/avmedia/source/win/manager.cxx +++ b/avmedia/source/win/manager.cxx diff --git a/avmedia/source/win/manager.hxx b/avmedia/source/win/manager.hxx index 0dd52627641b..0dd52627641b 100644..100755 --- a/avmedia/source/win/manager.hxx +++ b/avmedia/source/win/manager.hxx diff --git a/avmedia/source/win/player.cxx b/avmedia/source/win/player.cxx index d80472049bf2..d80472049bf2 100644..100755 --- a/avmedia/source/win/player.cxx +++ b/avmedia/source/win/player.cxx diff --git a/avmedia/source/win/player.hxx b/avmedia/source/win/player.hxx index 7f87511209bd..7f87511209bd 100644..100755 --- a/avmedia/source/win/player.hxx +++ b/avmedia/source/win/player.hxx diff --git a/avmedia/source/win/wincommon.hxx b/avmedia/source/win/wincommon.hxx index 0dd7cae023d3..0dd7cae023d3 100644..100755 --- a/avmedia/source/win/wincommon.hxx +++ b/avmedia/source/win/wincommon.hxx diff --git a/avmedia/source/win/window.cxx b/avmedia/source/win/window.cxx index a6f0bd85a15c..a6f0bd85a15c 100644..100755 --- a/avmedia/source/win/window.cxx +++ b/avmedia/source/win/window.cxx diff --git a/avmedia/source/win/window.hxx b/avmedia/source/win/window.hxx index 22a6c295f8d3..22a6c295f8d3 100644..100755 --- a/avmedia/source/win/window.hxx +++ b/avmedia/source/win/window.hxx diff --git a/avmedia/source/win/winuno.cxx b/avmedia/source/win/winuno.cxx index 85a3795c4d6e..90fc361b24de 100644..100755 --- 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(RTL_CONSTASCII_USTRINGPARAM( "/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(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.media.Manager_DirectX" )) ); xFactory = uno::Reference< lang::XSingleServiceFactory >( ::cppu::createSingleFactory( reinterpret_cast< lang::XMultiServiceFactory* >( pServiceManager ), - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "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/util/avmedia.component b/avmedia/util/avmedia.component new file mode 100755 index 000000000000..fa01dc03eb9c --- /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/makefile.mk b/avmedia/util/makefile.mk index bd167e8744cf..6d12706a265d 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 |