diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2018-09-12 12:09:18 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2018-09-12 14:31:44 +0200 |
commit | 801cc9550b38778971a9b3ebf427a6a151c50033 (patch) | |
tree | 3e1b7b253af1a1771b66efc9ddb6ea6ea4a3f5c3 /avmedia | |
parent | dd7b96ee874611a9e965badb166a408881223039 (diff) |
Remove Library_avmediaQuickTime, which is dead
...as a consequence of a4e81b7c313e5cb0e0f23a8605502b4b0b7f599e "No QuickTime in
the 10.12 SDK" and <https://gerrit.libreoffice.org/#/c/60375/> "Support for
building with macOS SDK < 10.12 is long gone"
Change-Id: Ida690370aea5b9559bb2c112dc73f26738facfd0
Reviewed-on: https://gerrit.libreoffice.org/60376
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'avmedia')
-rw-r--r-- | avmedia/Module_avmedia.mk | 10 | ||||
-rw-r--r-- | avmedia/source/inc/mediamisc.hxx | 3 | ||||
-rw-r--r-- | avmedia/source/quicktime/avmediaQuickTime.component | 25 | ||||
-rw-r--r-- | avmedia/source/quicktime/framegrabber.hxx | 60 | ||||
-rw-r--r-- | avmedia/source/quicktime/framegrabber.mm | 126 | ||||
-rw-r--r-- | avmedia/source/quicktime/manager.hxx | 56 | ||||
-rw-r--r-- | avmedia/source/quicktime/manager.mm | 77 | ||||
-rw-r--r-- | avmedia/source/quicktime/player.hxx | 81 | ||||
-rw-r--r-- | avmedia/source/quicktime/player.mm | 360 | ||||
-rw-r--r-- | avmedia/source/quicktime/quicktimecommon.hxx | 57 | ||||
-rw-r--r-- | avmedia/source/quicktime/quicktimeuno.mm | 58 | ||||
-rw-r--r-- | avmedia/source/quicktime/window.hxx | 103 | ||||
-rw-r--r-- | avmedia/source/quicktime/window.mm | 254 | ||||
-rw-r--r-- | avmedia/source/viewer/mediawindow_impl.cxx | 4 |
14 files changed, 1 insertions, 1273 deletions
diff --git a/avmedia/Module_avmedia.mk b/avmedia/Module_avmedia.mk index 20d2dcfec843..a3a3895f3ec7 100644 --- a/avmedia/Module_avmedia.mk +++ b/avmedia/Module_avmedia.mk @@ -37,16 +37,6 @@ $(eval $(call gb_Module_add_targets,avmedia,\ endif ifeq ($(OS),MACOSX) -ifneq ($(ENABLE_MACOSX_SANDBOX),TRUE) -ifneq ($(shell test $(MACOSX_SDK_VERSION) -ge 101200; echo $$?),0) -$(eval $(call gb_Module_add_targets,avmedia,\ - Library_avmediaQuickTime \ -)) -endif -endif -endif - -ifeq ($(OS),MACOSX) $(eval $(call gb_Module_add_targets,avmedia,\ Library_avmediaMacAVF \ )) diff --git a/avmedia/source/inc/mediamisc.hxx b/avmedia/source/inc/mediamisc.hxx index 2c45b58775dc..8289aa09d53b 100644 --- a/avmedia/source/inc/mediamisc.hxx +++ b/avmedia/source/inc/mediamisc.hxx @@ -28,8 +28,7 @@ #define AVMEDIA_MANAGER_SERVICE_NAME "com.sun.star.comp.avmedia.Manager_DirectX" #else #ifdef MACOSX -#define AVMEDIA_MANAGER_SERVICE_NAME "com.sun.star.comp.avmedia.Manager_QuickTime" -#define AVMEDIA_MANAGER_SERVICE_NAME_FALLBACK1 "com.sun.star.comp.avmedia.Manager_MacAVF" +#define AVMEDIA_MANAGER_SERVICE_NAME "com.sun.star.comp.avmedia.Manager_MacAVF" #else #define AVMEDIA_MANAGER_SERVICE_NAME_OLD "com.sun.star.comp.avmedia.Manager_GStreamer_0_10" #define AVMEDIA_MANAGER_SERVICE_NAME "com.sun.star.comp.avmedia.Manager_GStreamer" diff --git a/avmedia/source/quicktime/avmediaQuickTime.component b/avmedia/source/quicktime/avmediaQuickTime.component deleted file mode 100644 index dde87435b0a7..000000000000 --- a/avmedia/source/quicktime/avmediaQuickTime.component +++ /dev/null @@ -1,25 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - --> - -<component loader="com.sun.star.loader.SharedLibrary" environment="@CPPU_ENV@" - prefix="avmediaQuickTime" 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.hxx b/avmedia/source/quicktime/framegrabber.hxx deleted file mode 100644 index 6d5c999eaf2c..000000000000 --- a/avmedia/source/quicktime/framegrabber.hxx +++ /dev/null @@ -1,60 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#ifndef INCLUDED_AVMEDIA_SOURCE_QUICKTIME_FRAMEGRABBER_HXX -#define INCLUDED_AVMEDIA_SOURCE_QUICKTIME_FRAMEGRABBER_HXX - -#include "quicktimecommon.hxx" -#include <cppuhelper/implbase.hxx> - -#include <com/sun/star/media/XFrameGrabber.hpp> - -namespace avmedia { namespace quicktime { - -class FrameGrabber : public ::cppu::WeakImplHelper< css::media::XFrameGrabber, - css::lang::XServiceInfo > -{ -public: - - FrameGrabber( const css::uno::Reference< css::lang::XMultiServiceFactory >& rxMgr ); - virtual ~FrameGrabber(); - - bool create( const OUString& rURL ); - - // XFrameGrabber - virtual css::uno::Reference< css::graphic::XGraphic > SAL_CALL grabFrame( double fMediaTime ) override; - - // XServiceInfo - virtual OUString SAL_CALL getImplementationName( ) override; - virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override; - virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) override; - -private: - css::uno::Reference< css::lang::XMultiServiceFactory > mxMgr; - OUString maURL; - QTMovie* mpMovie; - bool mbInitialized; -}; - -} // namespace quicktime -} // namespace avmedia - -#endif // INCLUDED_AVMEDIA_SOURCE_QUICKTIME_FRAMEGRABBER_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/avmedia/source/quicktime/framegrabber.mm b/avmedia/source/quicktime/framegrabber.mm deleted file mode 100644 index 2ade85f292b9..000000000000 --- a/avmedia/source/quicktime/framegrabber.mm +++ /dev/null @@ -1,126 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#include "framegrabber.hxx" -#include "player.hxx" - -#include <tools/stream.hxx> -#include <vcl/graph.hxx> -#include <vcl/cvtgrf.hxx> -#include <unotools/localfilehelper.hxx> - -#define AVMEDIA_QUICKTIME_FRAMEGRABBER_IMPLEMENTATIONNAME "com.sun.star.comp.avmedia.FrameGrabber_Quicktime" -#define AVMEDIA_QUICKTIME_FRAMEGRABBER_SERVICENAME "com.sun.star.media.FrameGrabber_Quicktime" - -using namespace ::com::sun::star; - -SAL_WNODEPRECATED_DECLARATIONS_PUSH //TODO: 10.9 - -namespace avmedia { namespace quicktime { - - -FrameGrabber::FrameGrabber( const uno::Reference< lang::XMultiServiceFactory >& rxMgr ) : - mxMgr( rxMgr ) -{ - NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; - mpMovie = [QTMovie movie]; - [mpMovie retain]; - mbInitialized = true; - [pool release]; -} - - -FrameGrabber::~FrameGrabber() -{ - if( mbInitialized ) - { - if( mpMovie ) - { - [mpMovie release]; - mpMovie = nil; - } - } -} - - -bool FrameGrabber::create( const ::rtl::OUString& rURL ) -{ - bool bRet = false; - maURL = rURL; - NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; - NSString* aNSStr = [[[NSString alloc] initWithCharacters: reinterpret_cast<unichar const *>(rURL.getStr()) length: rURL.getLength()]stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding] ; - NSURL* aURL = [NSURL URLWithString:aNSStr ]; - - // create the Movie - - mpMovie = [mpMovie initWithURL:aURL error:nil]; - if(mpMovie) - { - [mpMovie retain]; - bRet = true; - } - - [pool release]; - - return bRet; -} - - -uno::Reference< graphic::XGraphic > SAL_CALL FrameGrabber::grabFrame( double fMediaTime ) -{ - uno::Reference< graphic::XGraphic > xRet; - - NSImage* pImage = [mpMovie frameImageAtTime: QTMakeTimeWithTimeInterval(fMediaTime)]; - NSData *pBitmap = [pImage TIFFRepresentation]; - long nSize = [pBitmap length]; - const void* pBitmapData = [pBitmap bytes]; - SvMemoryStream aMemStm( const_cast<void *>(pBitmapData), nSize, StreamMode::READ | StreamMode::WRITE ); - Graphic aGraphic; - if ( GraphicConverter::Import( aMemStm, aGraphic, ConvertDataFormat::TIF ) == ERRCODE_NONE ) - { - xRet = aGraphic.GetXGraphic(); - } - - return xRet; -} - - -::rtl::OUString SAL_CALL FrameGrabber::getImplementationName( ) -{ - return ::rtl::OUString( AVMEDIA_QUICKTIME_FRAMEGRABBER_IMPLEMENTATIONNAME ); -} - - -sal_Bool SAL_CALL FrameGrabber::supportsService( const ::rtl::OUString& ServiceName ) -{ - return ( ServiceName == AVMEDIA_QUICKTIME_FRAMEGRABBER_SERVICENAME ); -} - - -uno::Sequence< ::rtl::OUString > SAL_CALL FrameGrabber::getSupportedServiceNames( ) -{ - return { AVMEDIA_QUICKTIME_FRAMEGRABBER_SERVICENAME }; -} - -} // namespace quicktime -} // namespace avmedia - -SAL_WNODEPRECATED_DECLARATIONS_POP - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/avmedia/source/quicktime/manager.hxx b/avmedia/source/quicktime/manager.hxx deleted file mode 100644 index 45e170d4ec10..000000000000 --- a/avmedia/source/quicktime/manager.hxx +++ /dev/null @@ -1,56 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#ifndef INCLUDED_AVMEDIA_SOURCE_QUICKTIME_MANAGER_HXX -#define INCLUDED_AVMEDIA_SOURCE_QUICKTIME_MANAGER_HXX - -#include "quicktimecommon.hxx" -#include <cppuhelper/implbase.hxx> - -#include <com/sun/star/media/XManager.hpp> - - -namespace avmedia { namespace quicktime { - -class Manager : public ::cppu::WeakImplHelper< css::media::XManager, - css::lang::XServiceInfo > -{ -public: - - Manager( const css::uno::Reference< css::lang::XMultiServiceFactory >& rxMgr ); - virtual ~Manager(); - - // XManager - virtual css::uno::Reference< css::media::XPlayer > SAL_CALL createPlayer( const OUString& aURL ) override; - - // XServiceInfo - virtual OUString SAL_CALL getImplementationName( ) override; - virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override; - virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) override; -private: - - css::uno::Reference< css::lang::XMultiServiceFactory > mxMgr; -}; - -} // namespace quicktime -} // namespace avmedia - -#endif // INCLUDED_AVMEDIA_SOURCE_QUICKTIME_MANAGER_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/avmedia/source/quicktime/manager.mm b/avmedia/source/quicktime/manager.mm deleted file mode 100644 index 4d9ab9617398..000000000000 --- a/avmedia/source/quicktime/manager.mm +++ /dev/null @@ -1,77 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#include "manager.hxx" -#include "player.hxx" -#include <tools/urlobj.hxx> -#include <osl/diagnose.h> -#include <sal/log.hxx> - -using namespace ::com::sun::star; - -namespace avmedia { namespace quicktime { - -Manager::Manager( const uno::Reference< lang::XMultiServiceFactory >& rxMgr ) : - mxMgr( rxMgr ) -{ - SAL_INFO( "avmedia.quicktime", "Manager::Manager" ); -} - - -Manager::~Manager() -{ -} - - -uno::Reference< media::XPlayer > SAL_CALL Manager::createPlayer( const ::rtl::OUString& rURL ) -{ - Player* pPlayer( new Player( mxMgr ) ); - uno::Reference< media::XPlayer > xRet( pPlayer ); - INetURLObject aURL( rURL ); - - SAL_INFO( "avmedia.quicktime", "Manager::createPlayer" ); - - if( !pPlayer->create( aURL.GetMainURL( INetURLObject::DecodeMechanism::Unambiguous ) ) ) - xRet.clear(); - - return xRet; -} - - -::rtl::OUString SAL_CALL Manager::getImplementationName( ) -{ - return ::rtl::OUString( AVMEDIA_QUICKTIME_MANAGER_IMPLEMENTATIONNAME ); -} - - -sal_Bool SAL_CALL Manager::supportsService( const ::rtl::OUString& ServiceName ) -{ - return ( ServiceName == AVMEDIA_QUICKTIME_MANAGER_SERVICENAME ); -} - - -uno::Sequence< ::rtl::OUString > SAL_CALL Manager::getSupportedServiceNames( ) -{ - return { AVMEDIA_QUICKTIME_MANAGER_SERVICENAME }; -} - -} // namespace quicktime -} // namespace avmedia - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/avmedia/source/quicktime/player.hxx b/avmedia/source/quicktime/player.hxx deleted file mode 100644 index 5e4269cbef17..000000000000 --- a/avmedia/source/quicktime/player.hxx +++ /dev/null @@ -1,81 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#ifndef INCLUDED_AVMEDIA_SOURCE_QUICKTIME_PLAYER_HXX -#define INCLUDED_AVMEDIA_SOURCE_QUICKTIME_PLAYER_HXX - -#include "quicktimecommon.hxx" -#include <cppuhelper/implbase.hxx> -#include <com/sun/star/media/XPlayer.hpp> - -namespace avmedia { namespace quicktime { - -class Player : public ::cppu::WeakImplHelper< css::media::XPlayer, - css::lang::XServiceInfo > -{ -public: - - Player( const css::uno::Reference< css::lang::XMultiServiceFactory >& rxMgr ); - virtual ~Player(); - - bool create( const OUString& rURL ); - - // XPlayer - virtual void SAL_CALL start( ) override; - virtual void SAL_CALL stop( ) override; - virtual sal_Bool SAL_CALL isPlaying( ) override; - virtual double SAL_CALL getDuration( ) override; - virtual void SAL_CALL setMediaTime( double fTime ) override; - virtual double SAL_CALL getMediaTime( ) override; - virtual void SAL_CALL setPlaybackLoop( sal_Bool bSet ) override; - virtual sal_Bool SAL_CALL isPlaybackLoop( ) override; - virtual void SAL_CALL setMute( sal_Bool bSet ) override; - virtual sal_Bool SAL_CALL isMute( ) override; - virtual void SAL_CALL setVolumeDB( sal_Int16 nVolumeDB ) override; - virtual sal_Int16 SAL_CALL getVolumeDB( ) override; - virtual css::awt::Size SAL_CALL getPreferredPlayerWindowSize( ) override; - virtual css::uno::Reference< css::media::XPlayerWindow > SAL_CALL createPlayerWindow( const css::uno::Sequence< css::uno::Any >& aArguments ) override; - virtual css::uno::Reference< css::media::XFrameGrabber > SAL_CALL createFrameGrabber( ) override; - // XServiceInfo - virtual OUString SAL_CALL getImplementationName( ) override; - virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override; - virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) override; - - QTMovie* getMovie(); - -private: - css::uno::Reference< css::lang::XMultiServiceFactory > mxMgr; - - OUString maURL; - - QTMovie *mpMovie; // the Movie object - - float mnUnmutedVolume; - double mnStopTime; - - bool mbMuted; - bool mbInitialized; -}; - -} // namespace quicktime -} // namespace avmedia - -#endif // INCLUDED_AVMEDIA_SOURCE_QUICKTIME_PLAYER_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/avmedia/source/quicktime/player.mm b/avmedia/source/quicktime/player.mm deleted file mode 100644 index 57499ba8a54a..000000000000 --- a/avmedia/source/quicktime/player.mm +++ /dev/null @@ -1,360 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#include <math.h> - -#include "player.hxx" -#include "framegrabber.hxx" -#include "window.hxx" - -#include <sal/log.hxx> - -using namespace ::com::sun::star; - -SAL_WNODEPRECATED_DECLARATIONS_PUSH //TODO: 10.9 - -namespace avmedia { namespace quicktime { - -Player::Player( const uno::Reference< lang::XMultiServiceFactory >& rxMgr ) : - mxMgr( rxMgr ), - mpMovie( nil ), - mnUnmutedVolume( 0 ), - mnStopTime( DBL_MAX ), //max double - mbMuted( false ), - mbInitialized( false ) -{ - NSApplicationLoad(); - NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; - mbInitialized = true; - [pool release]; -} - - -Player::~Player() -{ - if( mpMovie ) - { - [mpMovie release]; - mpMovie = nil; - } -} - - -QTMovie* Player::getMovie() -{ - OSL_ASSERT( mpMovie ); - return mpMovie; -} - - -bool Player::create( const ::rtl::OUString& rURL ) -{ - bool bRet = false; - // create the Movie - if( mbInitialized ) - { - NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; - - if( mpMovie ) - { - [mpMovie release]; - mpMovie = nil; - } - - NSString* aNSStr = [[[NSString alloc] initWithCharacters: reinterpret_cast<unichar const *>(rURL.getStr()) length: rURL.getLength()]stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding] ; - NSURL* aURL = [NSURL URLWithString:aNSStr ]; - - NSError* pErr = nil; - mpMovie = [QTMovie movieWithURL:aURL error:&pErr]; - if(mpMovie) - { - [mpMovie retain]; - maURL = rURL; - bRet = true; - } - if( pErr ) - { - SAL_INFO ( "avmedia.quicktime", - "NSMovie create failed with error " << (long)[pErr code] << - " (" << [[pErr localizedDescription] UTF8String] << ")" - ); - } - [pool release]; - } - - return bRet; -} - - -void SAL_CALL Player::start( ) -{ - SAL_INFO ( "avmedia.quicktime", "Player::start" ); - - if( mpMovie ) - { - [mpMovie play]; - } -} - - -void SAL_CALL Player::stop( ) -{ - SAL_INFO ( "avmedia.quicktime", "Player::stop" ); - if( mpMovie ) - { - [mpMovie stop]; - } -} - - -sal_Bool SAL_CALL Player::isPlaying() -{ - bool bRet = false; - - if ( mpMovie ) - { - if ([mpMovie rate] != 0) - { - bRet = true; - } - } - - return bRet; -} - - -double SAL_CALL Player::getDuration( ) -{ - // slideshow checks for non-zero duration, so cheat here - double duration = 0.01; - - if ( mpMovie ) // && mnDuration > 0 ) { - { - QTTime structDuration = [mpMovie duration] ; - duration = (double)structDuration.timeValue / (double)structDuration.timeScale; - } - - return duration; -} - - -void SAL_CALL Player::setMediaTime( double fTime ) -{ - SAL_INFO ( "avmedia.quicktime", "Player::setMediaTime" ); - - if ( mpMovie ) - { - [mpMovie setCurrentTime: QTMakeTimeWithTimeInterval(fTime)]; - } -} - - -double SAL_CALL Player::getMediaTime( ) -{ - double position = 0.0; - - if ( mpMovie ) - { - QTTime structDuration = [mpMovie currentTime] ; - position = (double)structDuration.timeValue / (double)structDuration.timeScale; - } - - if(isPlaying() && position>mnStopTime) - { - stop(); - } - - return position; -} - -void SAL_CALL Player::setPlaybackLoop( sal_Bool bSet ) -{ - SAL_INFO ( "avmedia.quicktime", - "Player::setPlaybackLoop ? " << ( bSet?"True":"False" ) ); - - if(bSet) - { - [mpMovie setAttribute:[NSNumber numberWithBool:YES] forKey: QTMovieLoopsAttribute] ; - } - else - { - [mpMovie setAttribute:[NSNumber numberWithBool:NO] forKey: QTMovieLoopsAttribute] ; - } -} - - -sal_Bool SAL_CALL Player::isPlaybackLoop( ) -{ - bool bRet = [[mpMovie attributeForKey:QTMovieLoopsAttribute] boolValue]; - - SAL_INFO ( "avmedia.quicktime", - "Player::isPlaybackLoop ? " << ( bRet?"True":"False" ) ); - - return bRet; -} - - -void SAL_CALL Player::setMute( sal_Bool bSet ) -{ - SAL_INFO ( "avmedia.quicktime", - "set mute: " << bSet << - " muted: " << mbMuted << - " unmuted volume: " << mnUnmutedVolume ); - - // change the volume to 0 or the unmuted volume - if( mpMovie && mbMuted != bool(bSet) ) - { - [mpMovie setMuted: bSet ]; - mbMuted = bSet; - } - -} - - -sal_Bool SAL_CALL Player::isMute( ) -{ - SAL_INFO ( "avmedia.quicktime", "Player::isMuted" ); - - return mbMuted; -} - - -void SAL_CALL Player::setVolumeDB( sal_Int16 nVolumeDB ) -{ - // OOo db volume -40 = QTVolume 0 - // OOo db volume 0 = QTvolume 1 - if(nVolumeDB==-40) - { - mnUnmutedVolume = 0; - } - else - { - mnUnmutedVolume = pow( 10.0, nVolumeDB / 20.0 ); - } - - SAL_INFO ( "avmedia.quicktime", - "set volume: " << nVolumeDB << - " gst volume: " << mnUnmutedVolume ); - - // change volume - if( !mbMuted && mpMovie ) - { - [mpMovie setVolume: mnUnmutedVolume ]; - } -} - - -sal_Int16 SAL_CALL Player::getVolumeDB( ) -{ - sal_Int16 nVolumeDB = 0.0; - - if( mpMovie ) - { - float volume = 0.0; - - volume = [mpMovie volume]; - if(volume>0) //protect from log10(0) - { - nVolumeDB = (sal_Int16) ( 20.0*log10 ( volume ) ); - } - else - { - nVolumeDB = -40 ; // QT zero volume is no volume, -40db - } - } - - return nVolumeDB; -} - - -awt::Size SAL_CALL Player::getPreferredPlayerWindowSize( ) -{ - NSSize nsSize = [[mpMovie attributeForKey:QTMovieNaturalSizeAttribute] sizeValue]; - awt::Size aSize( nsSize.width, nsSize.height ); - return aSize; -} - - -uno::Reference< ::media::XPlayerWindow > SAL_CALL Player::createPlayerWindow( const uno::Sequence< uno::Any >& aArguments ) -{ - uno::Reference< ::media::XPlayerWindow > xRet; - awt::Size aSize( getPreferredPlayerWindowSize() ); - - SAL_INFO ( "avmedia.quicktime", - "Player::createPlayerWindow " << aSize.Width << " x " << aSize.Height << - " length: " << aArguments.getLength() ); - - if( aSize.Width > 0 && aSize.Height > 0 ) - { - sal_IntPtr nPtr = 0; - aArguments[0] >>= nPtr; - NSView* pParentView = reinterpret_cast< NSView * >(nPtr); - - ::avmedia::quicktime::Window* pWindow = new ::avmedia::quicktime::Window( mxMgr, *this, pParentView ); - xRet = pWindow; - } - - return xRet; -} - - -uno::Reference< media::XFrameGrabber > SAL_CALL Player::createFrameGrabber( ) -{ - uno::Reference< media::XFrameGrabber > xRet; - SAL_INFO ( "avmedia.quicktime", "Player::createFrameGrabber" ); - - if( !maURL.isEmpty() ) - { - FrameGrabber* pGrabber = new FrameGrabber( mxMgr ); - - xRet = pGrabber; - - if( !pGrabber->create( maURL ) ) - { - xRet.clear(); - } - } - - return xRet; -} - - -::rtl::OUString SAL_CALL Player::getImplementationName( ) -{ - return ::rtl::OUString( AVMEDIA_QUICKTIME_PLAYER_IMPLEMENTATIONNAME ); -} - - -sal_Bool SAL_CALL Player::supportsService( const ::rtl::OUString& ServiceName ) -{ - return ( ServiceName == AVMEDIA_QUICKTIME_PLAYER_SERVICENAME ); -} - - -uno::Sequence< ::rtl::OUString > SAL_CALL Player::getSupportedServiceNames( ) -{ - return { AVMEDIA_QUICKTIME_PLAYER_SERVICENAME }; -} - -} // namespace quicktime -} // namespace avmedia - -SAL_WNODEPRECATED_DECLARATIONS_POP - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/avmedia/source/quicktime/quicktimecommon.hxx b/avmedia/source/quicktime/quicktimecommon.hxx deleted file mode 100644 index cce2acd48d4d..000000000000 --- a/avmedia/source/quicktime/quicktimecommon.hxx +++ /dev/null @@ -1,57 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#ifndef INCLUDED_AVMEDIA_SOURCE_QUICKTIME_QUICKTIMECOMMON_HXX -#define INCLUDED_AVMEDIA_SOURCE_QUICKTIME_QUICKTIMECOMMON_HXX - -#ifdef MACOSX -#include <premac.h> -#import <Cocoa/Cocoa.h> -#import <QTKit/QTKit.h> -#include <postmac.h> -#endif -#include <osl/mutex.hxx> -#include <rtl/ustring.hxx> -#include <tools/stream.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/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_QUICKTIME_MANAGER_IMPLEMENTATIONNAME "com.sun.star.comp.avmedia.Manager_QuickTime" -#define AVMEDIA_QUICKTIME_MANAGER_SERVICENAME "com.sun.star.media.Manager_QuickTime" - -#define AVMEDIA_QUICKTIME_PLAYER_IMPLEMENTATIONNAME "com.sun.star.comp.avmedia.Player_QuickTime" -#define AVMEDIA_QUICKTIME_PLAYER_SERVICENAME "com.sun.star.media.Player_QuickTime" - -#define AVMEDIA_QUICKTIME_WINDOW_IMPLEMENTATIONNAME "com.sun.star.comp.avmedia.Window_QuickTime" -#define AVMEDIA_QUICKTIME_WINDOW_SERVICENAME "com.sun.star.media.Window_QuickTime" - -#endif // INCLUDED_AVMEDIA_SOURCE_QUICKTIME_QUICKTIMECOMMON_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/avmedia/source/quicktime/quicktimeuno.mm b/avmedia/source/quicktime/quicktimeuno.mm deleted file mode 100644 index eb48c10e6613..000000000000 --- a/avmedia/source/quicktime/quicktimeuno.mm +++ /dev/null @@ -1,58 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#include "quicktimecommon.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::quicktime::Manager( rxFact ) ); -} - -extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL avmediaQuickTime_component_getFactory( const sal_Char* pImplName, void* pServiceManager, void* /* pRegistryKey */ ) -{ - uno::Reference< lang::XSingleServiceFactory > xFactory; - void* pRet = nullptr; - - if( rtl_str_compare( pImplName, AVMEDIA_QUICKTIME_MANAGER_IMPLEMENTATIONNAME ) == 0 ) - { - const ::rtl::OUString aServiceName( AVMEDIA_QUICKTIME_MANAGER_SERVICENAME ); - - xFactory.set( ::cppu::createSingleFactory( - static_cast< lang::XMultiServiceFactory* >( pServiceManager ), - AVMEDIA_QUICKTIME_MANAGER_IMPLEMENTATIONNAME, - create_MediaPlayer, uno::Sequence< OUString >( &aServiceName, 1 ) ) ); - } - - if( xFactory.is() ) - { - xFactory->acquire(); - pRet = xFactory.get(); - } - - return pRet; -} - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/avmedia/source/quicktime/window.hxx b/avmedia/source/quicktime/window.hxx deleted file mode 100644 index a2f51ffb1f95..000000000000 --- a/avmedia/source/quicktime/window.hxx +++ /dev/null @@ -1,103 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#ifndef INCLUDED_AVMEDIA_SOURCE_QUICKTIME_WINDOW_HXX -#define INCLUDED_AVMEDIA_SOURCE_QUICKTIME_WINDOW_HXX - -#include "quicktimecommon.hxx" -#include <cppuhelper/implbase.hxx> -#include <cppuhelper/interfacecontainer.h> - -#include <com/sun/star/media/XPlayerWindow.hpp> - -namespace avmedia { namespace quicktime { - -class Player; - -class Window : public ::cppu::WeakImplHelper< css::media::XPlayerWindow, - css::lang::XServiceInfo > -{ -public: - - Window( const css::uno::Reference< css::lang::XMultiServiceFactory >& i_rxMgr, - Player& i_rPlayer, - NSView* i_pParentView - ); - virtual ~Window(); - - void processGraphEvent(); - void updatePointer(); - - // XPlayerWindow - virtual void SAL_CALL update( ) override; - virtual sal_Bool SAL_CALL setZoomLevel( css::media::ZoomLevel ) override; - virtual css::media::ZoomLevel SAL_CALL getZoomLevel( ) override; - virtual void SAL_CALL setPointerType( sal_Int32 nPointerType ) override; - - // XWindow - virtual void SAL_CALL setPosSize( sal_Int32 , sal_Int32 , sal_Int32 Width, sal_Int32 Height, sal_Int16 Flags ) override; - virtual css::awt::Rectangle SAL_CALL getPosSize( ) override; - virtual void SAL_CALL setVisible( sal_Bool ) override; - virtual void SAL_CALL setEnable( sal_Bool ) override; - virtual void SAL_CALL setFocus( ) override; - virtual void SAL_CALL addWindowListener( const css::uno::Reference< css::awt::XWindowListener >& xListener ) override; - virtual void SAL_CALL removeWindowListener( const css::uno::Reference< css::awt::XWindowListener >& xListener ) override; - virtual void SAL_CALL addFocusListener( const css::uno::Reference< css::awt::XFocusListener >& xListener ) override; - virtual void SAL_CALL removeFocusListener( const css::uno::Reference< css::awt::XFocusListener >& xListener ) override; - virtual void SAL_CALL addKeyListener( const css::uno::Reference< css::awt::XKeyListener >& xListener ) override; - virtual void SAL_CALL removeKeyListener( const css::uno::Reference< css::awt::XKeyListener >& xListener ) override; - virtual void SAL_CALL addMouseListener( const css::uno::Reference< css::awt::XMouseListener >& xListener ) override; - virtual void SAL_CALL removeMouseListener( const css::uno::Reference< css::awt::XMouseListener >& xListener ) override; - virtual void SAL_CALL addMouseMotionListener( const css::uno::Reference< css::awt::XMouseMotionListener >& xListener ) override; - virtual void SAL_CALL removeMouseMotionListener( const css::uno::Reference< css::awt::XMouseMotionListener >& xListener ) override; - virtual void SAL_CALL addPaintListener( const css::uno::Reference< css::awt::XPaintListener >& xListener ) override; - virtual void SAL_CALL removePaintListener( const css::uno::Reference< css::awt::XPaintListener >& xListener ) override; - - // XComponent - virtual void SAL_CALL dispose( ) override; - virtual void SAL_CALL addEventListener( const css::uno::Reference< css::lang::XEventListener >& xListener ) override; - virtual void SAL_CALL removeEventListener( const css::uno::Reference< css::lang::XEventListener >& aListener ) override; - - // XServiceInfo - virtual OUString SAL_CALL getImplementationName( ) override; - virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override; - virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) override; - -private: - - css::uno::Reference< css::lang::XMultiServiceFactory > mxMgr; - - ::osl::Mutex maMutex; - ::cppu::OMultiTypeInterfaceContainerHelper maListeners; - css::media::ZoomLevel meZoomLevel; - Player& mrPlayer; - int mnPointerType; - - NSView* mpParentView; // parent view for our own private movie view - QTMovieView* mpMovieView; // the view containing the movie object, output target and controller - - void ImplLayoutVideoWindow(); -}; - -} // namespace quicktime -} // namespace avmedia - -#endif // INCLUDED_AVMEDIA_SOURCE_QUICKTIME_WINDOW_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/avmedia/source/quicktime/window.mm b/avmedia/source/quicktime/window.mm deleted file mode 100644 index faf71baaedb5..000000000000 --- a/avmedia/source/quicktime/window.mm +++ /dev/null @@ -1,254 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#include <com/sun/star/awt/SystemPointer.hpp> -#include <com/sun/star/awt/PosSize.hpp> - -#include "window.hxx" -#include "player.hxx" - -#include <sal/log.hxx> - -using namespace ::com::sun::star; - -SAL_WNODEPRECATED_DECLARATIONS_PUSH //TODO: 10.9 - -namespace avmedia { namespace quicktime { - -static ::osl::Mutex& ImplGetOwnStaticMutex() -{ - static ::osl::Mutex* pMutex = nullptr; - - if( pMutex == nullptr ) - { - ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); - - if( pMutex == nullptr ) - { - static ::osl::Mutex aMutex; - pMutex = &aMutex; - } - } - - return *pMutex; -} - -Window::Window( const uno::Reference< lang::XMultiServiceFactory >& i_rxMgr, Player& i_rPlayer, NSView* i_pParentView ) : - mxMgr( i_rxMgr ), - maListeners( maMutex ), - meZoomLevel( media::ZoomLevel_NOT_AVAILABLE ), - mrPlayer( i_rPlayer ), - mnPointerType( awt::SystemPointer::ARROW ), - mpParentView( i_pParentView ), - mpMovieView( nil ) -{ - - ::osl::MutexGuard aGuard( ImplGetOwnStaticMutex() ); - - if( mpParentView ) // sanity check - { - - NSRect aViewRect = [mpParentView frame]; - aViewRect.origin.x = aViewRect.origin.y = 0; - mpMovieView = [[QTMovieView alloc] initWithFrame: aViewRect]; - [mpMovieView setMovie: mrPlayer.getMovie() ]; - [mpMovieView setControllerVisible: NO]; - [mpMovieView setPreservesAspectRatio: YES]; - [mpMovieView setAutoresizingMask: NSViewWidthSizable | NSViewHeightSizable]; - [mpParentView addSubview: mpMovieView]; - [mpParentView setAutoresizesSubviews: YES]; - } - - SAL_INFO ( "avmedia.quicktime", "Window::Window" ); -} - -Window::~Window() -{ - if( mpMovieView ) - { - [mpMovieView removeFromSuperview]; - [mpMovieView setMovie:nil]; - [mpMovieView release]; - mpMovieView = nil; - } -} - -// XPlayerWindow - -void SAL_CALL Window::update( ) -{ - ; -} - -sal_Bool SAL_CALL Window::setZoomLevel( media::ZoomLevel ) -{ - return false; -} - -media::ZoomLevel SAL_CALL Window::getZoomLevel( ) -{ - return meZoomLevel; -} - -void SAL_CALL Window::setPointerType( sal_Int32 nPointerType ) -{ - mnPointerType = nPointerType; -} - -// XWindow - -void SAL_CALL Window::setPosSize( sal_Int32 , sal_Int32 , sal_Int32 Width, sal_Int32 Height, sal_Int16 Flags ) -{ - if( mpParentView && mpMovieView ) - { - NSRect aRect = [mpMovieView frame]; - if( (Flags & awt::PosSize::WIDTH) ) - aRect.size.width = Width; - if( (Flags & awt::PosSize::HEIGHT) ) - aRect.size.height = Height; - } -} - -awt::Rectangle SAL_CALL Window::getPosSize() -{ - awt::Rectangle aRet; - - NSRect aRect = [mpMovieView frame]; - aRet.X = aRet.Y = 0; - aRet.Width = aRect.size.width; - aRet.Height = aRect.size.height; - - return aRet; -} - -void SAL_CALL Window::setVisible( sal_Bool ) -{ - SAL_INFO ( "avmedia.quicktime", "Window::setVisible" ); - -} - -void SAL_CALL Window::setEnable( sal_Bool ) -{ - ; -} - -void SAL_CALL Window::setFocus( ) -{ - SAL_INFO ( "avmedia.quicktime", "Window::setFocus" ); -} - -void SAL_CALL Window::addWindowListener( const uno::Reference< awt::XWindowListener >& xListener ) -{ - maListeners.addInterface( cppu::UnoType<decltype(xListener)>::get(), xListener ); -} - -void SAL_CALL Window::removeWindowListener( const uno::Reference< awt::XWindowListener >& xListener ) -{ - maListeners.removeInterface( cppu::UnoType<decltype(xListener)>::get(), xListener ); -} - -void SAL_CALL Window::addFocusListener( const uno::Reference< awt::XFocusListener >& xListener ) -{ - maListeners.addInterface( cppu::UnoType<decltype(xListener)>::get(), xListener ); -} - -void SAL_CALL Window::removeFocusListener( const uno::Reference< awt::XFocusListener >& xListener ) -{ - maListeners.removeInterface( cppu::UnoType<decltype(xListener)>::get(), xListener ); -} - -void SAL_CALL Window::addKeyListener( const uno::Reference< awt::XKeyListener >& xListener ) -{ - maListeners.addInterface( cppu::UnoType<decltype(xListener)>::get(), xListener ); -} - -void SAL_CALL Window::removeKeyListener( const uno::Reference< awt::XKeyListener >& xListener ) -{ - maListeners.removeInterface( cppu::UnoType<decltype(xListener)>::get(), xListener ); -} - -void SAL_CALL Window::addMouseListener( const uno::Reference< awt::XMouseListener >& xListener ) -{ - maListeners.addInterface( cppu::UnoType<decltype(xListener)>::get(), xListener ); -} - -void SAL_CALL Window::removeMouseListener( const uno::Reference< awt::XMouseListener >& xListener ) -{ - maListeners.removeInterface( cppu::UnoType<decltype(xListener)>::get(), xListener ); -} - -void SAL_CALL Window::addMouseMotionListener( const uno::Reference< awt::XMouseMotionListener >& xListener ) -{ - maListeners.addInterface( cppu::UnoType<decltype(xListener)>::get(), xListener ); -} - -void SAL_CALL Window::removeMouseMotionListener( const uno::Reference< awt::XMouseMotionListener >& xListener ) -{ - maListeners.removeInterface( cppu::UnoType<decltype(xListener)>::get(), xListener ); -} - -void SAL_CALL Window::addPaintListener( const uno::Reference< awt::XPaintListener >& xListener ) -{ - maListeners.addInterface( cppu::UnoType<decltype(xListener)>::get(), xListener ); -} - -void SAL_CALL Window::removePaintListener( const uno::Reference< awt::XPaintListener >& xListener ) -{ - maListeners.removeInterface( cppu::UnoType<decltype(xListener)>::get(), xListener ); -} - -// XComponent - -void SAL_CALL Window::dispose( ) -{ -} - -void SAL_CALL Window::addEventListener( const uno::Reference< lang::XEventListener >& xListener ) -{ - maListeners.addInterface( cppu::UnoType<decltype(xListener)>::get(), xListener ); -} - -void SAL_CALL Window::removeEventListener( const uno::Reference< lang::XEventListener >& xListener ) -{ - maListeners.removeInterface( cppu::UnoType<decltype(xListener)>::get(), xListener ); -} - -// XServiceInfo - -::rtl::OUString SAL_CALL Window::getImplementationName( ) -{ - return ::rtl::OUString( AVMEDIA_QUICKTIME_WINDOW_IMPLEMENTATIONNAME ); -} - -sal_Bool SAL_CALL Window::supportsService( const ::rtl::OUString& ServiceName ) -{ - return ( ServiceName == AVMEDIA_QUICKTIME_WINDOW_SERVICENAME ); -} - -uno::Sequence< ::rtl::OUString > SAL_CALL Window::getSupportedServiceNames( ) -{ - return { AVMEDIA_QUICKTIME_WINDOW_SERVICENAME }; -} - -} // namespace quicktime -} // namespace avmedia - -SAL_WNODEPRECATED_DECLARATIONS_POP - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/avmedia/source/viewer/mediawindow_impl.cxx b/avmedia/source/viewer/mediawindow_impl.cxx index 584545869cfd..1ce155272d89 100644 --- a/avmedia/source/viewer/mediawindow_impl.cxx +++ b/avmedia/source/viewer/mediawindow_impl.cxx @@ -196,10 +196,6 @@ uno::Reference<media::XPlayer> MediaWindowImpl::createPlayer(const OUString& rUR #ifdef AVMEDIA_MANAGER_SERVICE_NAME_OLD AVMEDIA_MANAGER_SERVICE_NAME_OLD #endif -// fallback to AVMedia framework on OS X -#ifdef AVMEDIA_MANAGER_SERVICE_NAME_FALLBACK1 - AVMEDIA_MANAGER_SERVICE_NAME_FALLBACK1 -#endif }; for (sal_uInt32 i = 0; !xPlayer.is() && i < SAL_N_ELEMENTS( aServiceManagers ); ++i) |