You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by ji...@apache.org on 2019/10/23 16:01:13 UTC
[openoffice] branch AOO42X updated: i127138 Remove the avmedia
Quicktime plugin
This is an automated email from the ASF dual-hosted git repository.
jim pushed a commit to branch AOO42X
in repository https://gitbox.apache.org/repos/asf/openoffice.git
The following commit(s) were added to refs/heads/AOO42X by this push:
new b720c59 i127138 Remove the avmedia Quicktime plugin
b720c59 is described below
commit b720c5921bb1c311441a1fcd511ed90cf46d5fbb
Author: Ariel Constenla-Haile <ar...@apache.org>
AuthorDate: Sun Oct 20 01:27:11 2019 -0300
i127138 Remove the avmedia Quicktime plugin
(cherry picked from commit 845e2aaed316432f79097128de0c3797d5756a54)
---
main/avmedia/Library_avmediaQuickTime.mk | 74 ----
main/avmedia/Module_avmedia.mk | 1 -
main/avmedia/source/inc/mediamisc.hxx | 4 +-
.../source/quicktime/avmediaQuickTime.component | 28 --
main/avmedia/source/quicktime/qt_common.hxx | 65 ---
main/avmedia/source/quicktime/qt_framegrabber.cxx | 142 -------
main/avmedia/source/quicktime/qt_framegrabber.hxx | 67 ---
main/avmedia/source/quicktime/qt_manager.cxx | 92 -----
main/avmedia/source/quicktime/qt_manager.hxx | 60 ---
main/avmedia/source/quicktime/qt_player.cxx | 459 ---------------------
main/avmedia/source/quicktime/qt_player.hxx | 107 -----
main/avmedia/source/quicktime/qt_uno.cxx | 71 ----
main/avmedia/source/quicktime/qt_window.cxx | 348 ----------------
main/avmedia/source/quicktime/qt_window.hxx | 109 -----
main/postprocess/packcomponents/makefile.mk | 1 -
main/scp2/source/ooo/file_library_ooo.scp | 7 -
main/vcl/Library_vcl.mk | 5 -
main/vcl/aqua/source/dtrans/PictToBmpFlt.cxx | 1 -
main/vcl/util/makefile.mk | 5 -
19 files changed, 2 insertions(+), 1644 deletions(-)
diff --git a/main/avmedia/Library_avmediaQuickTime.mk b/main/avmedia/Library_avmediaQuickTime.mk
deleted file mode 100644
index 9769331..0000000
--- a/main/avmedia/Library_avmediaQuickTime.mk
+++ /dev/null
@@ -1,74 +0,0 @@
-#**************************************************************
-#
-# 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
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-#**************************************************************
-
-
-
-$(eval $(call gb_Library_Library,avmediaQuickTime))
-
-$(eval $(call gb_Library_add_package_headers,avmediaQuickTime,avmedia_inc))
-
-$(eval $(call gb_Library_set_componentfile,avmediaQuickTime,avmedia/source/quicktime/avmediaQuickTime))
-
-$(eval $(call gb_Library_set_include,avmediaQuickTime,\
- $$(INCLUDE) \
- -I$(SRCDIR)/avmedia/inc \
- -I$(SRCDIR)/avmedia/source/inc \
-))
-
-ifeq ($(OS),MACOSX)
-$(eval $(call gb_Library_add_cxxflags,avmediaQuickTime,\
- -x objective-c++ \
-))
-endif
-
-$(eval $(call gb_Library_add_api,avmediaQuickTime,\
- offapi \
- udkapi \
-))
-
-$(eval $(call gb_Library_add_linked_libs,avmediaQuickTime,\
- comphelper \
- cppuhelper \
- cppu \
- sal \
- tl \
- vcl \
- $(gb_STDLIBS) \
-))
-
-$(eval $(call gb_Library_add_libs,avmediaQuickTime,\
- -framework Cocoa \
- -framework QTKit \
- -framework QuickTime \
-))
-
-$(eval $(call gb_Library_add_noexception_objects,avmediaQuickTime,\
- avmedia/source/quicktime/qt_manager \
- avmedia/source/quicktime/qt_player \
- avmedia/source/quicktime/qt_window \
-))
-
-$(eval $(call gb_Library_add_exception_objects,avmediaQuickTime,\
- avmedia/source/quicktime/qt_framegrabber \
- avmedia/source/quicktime/qt_uno \
-))
-
-# vim: set noet sw=4 ts=4:
diff --git a/main/avmedia/Module_avmedia.mk b/main/avmedia/Module_avmedia.mk
index b5ddeeb..0fb5bae 100644
--- a/main/avmedia/Module_avmedia.mk
+++ b/main/avmedia/Module_avmedia.mk
@@ -58,7 +58,6 @@ endif
ifeq ($(GUIBASE),aqua)
$(eval $(call gb_Module_add_targets,avmedia,\
Library_avmediaMacAVF \
- Library_avmediaQuickTime \
))
endif
diff --git a/main/avmedia/source/inc/mediamisc.hxx b/main/avmedia/source/inc/mediamisc.hxx
index 5a4a276..1a405d7 100644
--- a/main/avmedia/source/inc/mediamisc.hxx
+++ b/main/avmedia/source/inc/mediamisc.hxx
@@ -36,10 +36,10 @@ class ResMgr;
#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_MacAVF"
#define AVMEDIA_MANAGER_SERVICE_IS_JAVABASED sal_False
-#define AVMEDIA_MANAGER_SERVICE_NAME_FALLBACK1 "com.sun.star.comp.avmedia.Manager_MacAVF"
+#define AVMEDIA_MANAGER_SERVICE_NAME_FALLBACK1 ""
#define AVMEDIA_MANAGER_SERVICE_IS_JAVABASED_FALLBACK1 sal_False
#else
diff --git a/main/avmedia/source/quicktime/avmediaQuickTime.component b/main/avmedia/source/quicktime/avmediaQuickTime.component
deleted file mode 100644
index dbbd6bd..0000000
--- a/main/avmedia/source/quicktime/avmediaQuickTime.component
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--***********************************************************
- *
- * 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
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the 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/main/avmedia/source/quicktime/qt_common.hxx b/main/avmedia/source/quicktime/qt_common.hxx
deleted file mode 100644
index f4102e6..0000000
--- a/main/avmedia/source/quicktime/qt_common.hxx
+++ /dev/null
@@ -1,65 +0,0 @@
-/**************************************************************
- *
- * 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
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- *************************************************************/
-
-
-#ifndef QT_COMMON_HXX
-#define QT_COMMON_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/debug.hxx>
-#include <tools/stream.hxx>
-#include <tools/string.hxx>
-#include <tools/urlobj.hxx>
-#include <cppuhelper/implbase1.hxx>
-#include <cppuhelper/implbase2.hxx>
-#include <cppuhelper/weak.hxx>
-#include <cppuhelper/factory.hxx>
-
-#include <com/sun/star/uno/Reference.h>
-#include <com/sun/star/uno/RuntimeException.hpp>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#include <com/sun/star/lang/XComponent.hpp>
-#include <com/sun/star/registry/XRegistryKey.hpp>
-#include <com/sun/star/lang/XComponent.hpp>
-#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <com/sun/star/awt/Rectangle.hpp>
-#include <com/sun/star/awt/KeyModifier.hpp>
-#include <com/sun/star/awt/MouseButton.hpp>
-#include <com/sun/star/media/XManager.hpp>
-
-#define AVMEDIA_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 // QT_COMMOM_HXX
-
diff --git a/main/avmedia/source/quicktime/qt_framegrabber.cxx b/main/avmedia/source/quicktime/qt_framegrabber.cxx
deleted file mode 100644
index dbbb3f7..0000000
--- a/main/avmedia/source/quicktime/qt_framegrabber.cxx
+++ /dev/null
@@ -1,142 +0,0 @@
-/**************************************************************
- *
- * 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
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- *************************************************************/
-
-
-#include "qt_framegrabber.hxx"
-#include "qt_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;
-
-namespace avmedia { namespace quicktime {
-
-// ----------------
-// - FrameGrabber -
-// ----------------
-
-FrameGrabber::FrameGrabber( const uno::Reference< lang::XMultiServiceFactory >& rxMgr ) :
- mxMgr( rxMgr )
-{
- OSErr result;
-
- NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
- // we have version 7.01 or later, initialize
- 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: 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 )
- throw (uno::RuntimeException)
-{
- 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( (char *)pBitmapData, nSize, STREAM_READ | STREAM_WRITE );
- Graphic aGraphic;
- if ( GraphicConverter::Import( aMemStm, aGraphic, CVT_TIF ) == ERRCODE_NONE )
- {
- xRet = aGraphic.GetXGraphic();
- }
-
- return xRet;
-}
-
-// ------------------------------------------------------------------------------
-
-::rtl::OUString SAL_CALL FrameGrabber::getImplementationName( )
- throw (uno::RuntimeException)
-{
- return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( AVMEDIA_QUICKTIME_FRAMEGRABBER_IMPLEMENTATIONNAME ) );
-}
-
-// ------------------------------------------------------------------------------
-
-sal_Bool SAL_CALL FrameGrabber::supportsService( const ::rtl::OUString& ServiceName )
- throw (uno::RuntimeException)
-{
- return ServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( AVMEDIA_QUICKTIME_FRAMEGRABBER_SERVICENAME ) );
-}
-
-// ------------------------------------------------------------------------------
-
-uno::Sequence< ::rtl::OUString > SAL_CALL FrameGrabber::getSupportedServiceNames( )
- throw (uno::RuntimeException)
-{
- uno::Sequence< ::rtl::OUString > aRet(1);
- aRet[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( AVMEDIA_QUICKTIME_FRAMEGRABBER_SERVICENAME ) );
-
- return aRet;
-}
-
-} // namespace quicktime
-} // namespace avmedia
diff --git a/main/avmedia/source/quicktime/qt_framegrabber.hxx b/main/avmedia/source/quicktime/qt_framegrabber.hxx
deleted file mode 100644
index c59eb6b..0000000
--- a/main/avmedia/source/quicktime/qt_framegrabber.hxx
+++ /dev/null
@@ -1,67 +0,0 @@
-/**************************************************************
- *
- * 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
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- *************************************************************/
-
-
-#ifndef QT_FRAMEGRABBER_HXX
-#define QT_FRAMEGRABBER_HXX
-
-#include "qt_common.hxx"
-
-#include "com/sun/star/media/XFrameGrabber.hdl"
-
-namespace avmedia { namespace quicktime {
-
-// ----------------
-// - FrameGrabber -
-// ----------------
-
-class FrameGrabber : public ::cppu::WeakImplHelper2 < ::com::sun::star::media::XFrameGrabber,
- ::com::sun::star::lang::XServiceInfo >
-{
-public:
-
- FrameGrabber( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& rxMgr );
- ~FrameGrabber();
-
- bool create( const ::rtl::OUString& rURL );
-
- // XFrameGrabber
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic > SAL_CALL grabFrame( double fMediaTime ) throw (::com::sun::star::uno::RuntimeException);
-
- // XServiceInfo
- virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw (::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw (::com::sun::star::uno::RuntimeException);
-
-private:
-
- ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > mxMgr;
- ::rtl::OUString maURL;
- QTMovie* mpMovie;
- sal_Bool mbInitialized;
- long mnVersion;
-};
-
-} // namespace quicktime
-} // namespace avmedia
-
-#endif // QT_FRAMEGRABBER_HXX
-
diff --git a/main/avmedia/source/quicktime/qt_manager.cxx b/main/avmedia/source/quicktime/qt_manager.cxx
deleted file mode 100644
index fdf8240..0000000
--- a/main/avmedia/source/quicktime/qt_manager.cxx
+++ /dev/null
@@ -1,92 +0,0 @@
-/**************************************************************
- *
- * 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
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- *************************************************************/
-
-
-#include "qt_manager.hxx"
-#include "qt_player.hxx"
-
-#include <tools/urlobj.hxx>
-
-using namespace ::com::sun::star;
-
-namespace avmedia { namespace quicktime {
-// ----------------
-// - Manager -
-// ----------------
-
-Manager::Manager( const uno::Reference< lang::XMultiServiceFactory >& rxMgr ) :
- mxMgr( rxMgr )
-{
- OSL_TRACE( "avmediaquicktime: Manager::Manager" );
-}
-
-// ------------------------------------------------------------------------------
-
-Manager::~Manager()
-{
-}
-
-// ------------------------------------------------------------------------------
-
-uno::Reference< media::XPlayer > SAL_CALL Manager::createPlayer( const ::rtl::OUString& rURL )
- throw (uno::RuntimeException)
-{
- Player* pPlayer( new Player( mxMgr ) );
- uno::Reference< media::XPlayer > xRet( pPlayer );
- INetURLObject aURL( rURL );
-
- OSL_TRACE( "avmediaquicktime: Manager::createPlayer" );
-
- if( !pPlayer->create( aURL.GetMainURL( INetURLObject::DECODE_UNAMBIGUOUS ) ) )
- xRet = uno::Reference< media::XPlayer >();
-
- return xRet;
-}
-
-// ------------------------------------------------------------------------------
-
-::rtl::OUString SAL_CALL Manager::getImplementationName( )
- throw (uno::RuntimeException)
-{
- return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( AVMEDIA_QUICKTIME_MANAGER_IMPLEMENTATIONNAME ) );
-}
-
-// ------------------------------------------------------------------------------
-
-sal_Bool SAL_CALL Manager::supportsService( const ::rtl::OUString& ServiceName )
- throw (uno::RuntimeException)
-{
- return ServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( AVMEDIA_QUICKTIME_MANAGER_SERVICENAME ) );
-}
-
-// ------------------------------------------------------------------------------
-
-uno::Sequence< ::rtl::OUString > SAL_CALL Manager::getSupportedServiceNames( )
- throw (uno::RuntimeException)
-{
- uno::Sequence< ::rtl::OUString > aRet(1);
- aRet[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( AVMEDIA_QUICKTIME_MANAGER_SERVICENAME ) );
-
- return aRet;
-}
-
-} // namespace quicktime
-} // namespace avmedia
diff --git a/main/avmedia/source/quicktime/qt_manager.hxx b/main/avmedia/source/quicktime/qt_manager.hxx
deleted file mode 100644
index 9cceb4a..0000000
--- a/main/avmedia/source/quicktime/qt_manager.hxx
+++ /dev/null
@@ -1,60 +0,0 @@
-/**************************************************************
- *
- * 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
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- *************************************************************/
-
-
-#ifndef QT_MANAGER_HXX
-#define QT_MANAGER_HXX
-
-#include "qt_common.hxx"
-
-#include "com/sun/star/media/XManager.hdl"
-
-// -----------
-// - Manager -
-// -----------
-
-namespace avmedia { namespace quicktime {
-
-class Manager : public ::cppu::WeakImplHelper2 < ::com::sun::star::media::XManager,
- ::com::sun::star::lang::XServiceInfo >
-{
-public:
-
- Manager( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& rxMgr );
- ~Manager();
-
- // XManager
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::media::XPlayer > SAL_CALL createPlayer( const ::rtl::OUString& aURL ) throw (::com::sun::star::uno::RuntimeException);
-
- // XServiceInfo
- virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw (::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw (::com::sun::star::uno::RuntimeException);
-private:
-
- ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > mxMgr;
-};
-
-} // namespace quicktime
-} // namespace avmedia
-
-#endif // QT_MANAGER_HXX
-
diff --git a/main/avmedia/source/quicktime/qt_player.cxx b/main/avmedia/source/quicktime/qt_player.cxx
deleted file mode 100644
index fcb88c5..0000000
--- a/main/avmedia/source/quicktime/qt_player.cxx
+++ /dev/null
@@ -1,459 +0,0 @@
-/**************************************************************
- *
- * 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
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- *************************************************************/
-
-
-#include <math.h>
-
-#include "qt_player.hxx"
-#include "qt_framegrabber.hxx"
-#include "qt_window.hxx"
-
-using namespace ::com::sun::star;
-
-namespace avmedia { namespace quicktime {
-
-// ----------------
-// - Player -
-// ----------------
-
-Player::Player( const uno::Reference< lang::XMultiServiceFactory >& rxMgr ) :
- mxMgr( rxMgr ),
- mpMovie( nil ),
- /* GST
- mbFakeVideo (sal_False ),
- */
- mnUnmutedVolume( 0 ),
- mnStopTime( DBL_MAX ), //max double
- mbMuted( false ),
- mbLooping( false ),
- mbInitialized( false ),
- mnWindowID( 0 ),
- mnDuration( 0 ),
- mnWidth( 0 ),
- mnHeight( 0 ),
- mnVersion( 0 ),
- maSizeCondition( osl_createCondition() )
-{
- OSErr result;
-
- 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: 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 )
- {
- OSL_TRACE( "NSMovie create failed with error %ld (%s)",
- (long)[pErr code],
- [[pErr localizedDescription] UTF8String]
- );
- }
- [pool release];
- }
-
- return bRet;
-}
-
-// ------------------------------------------------------------------------------
-
-void SAL_CALL Player::start( )
- throw (uno::RuntimeException)
-{
- OSL_TRACE ("Player::start");
-
- if( mpMovie )
- {
- [mpMovie play];
- }
-}
-
-// ------------------------------------------------------------------------------
-
-void SAL_CALL Player::stop( )
- throw (uno::RuntimeException)
-{
- OSL_TRACE ("Player::stop");
- if( mpMovie )
- {
- [mpMovie stop];
- }
-}
-
-// ------------------------------------------------------------------------------
-
-sal_Bool SAL_CALL Player::isPlaying()
- throw (uno::RuntimeException)
-{
- bool bRet = false;
-
- if ( mpMovie )
- {
- if ([mpMovie rate] != 0)
- {
- bRet = true;
- }
- }
-
- return bRet;
-}
-
-// ------------------------------------------------------------------------------
-
-double SAL_CALL Player::getDuration( )
- throw (uno::RuntimeException)
-{
- // 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 )
- throw (uno::RuntimeException)
-{
- OSL_TRACE ("Player::setMediaTime");
-
- if ( mpMovie )
- {
- [mpMovie setCurrentTime: QTMakeTimeWithTimeInterval(fTime)];
- }
-}
-
-// ------------------------------------------------------------------------------
-
-double SAL_CALL Player::getMediaTime( )
- throw (uno::RuntimeException)
-{
- 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::setStopTime( double fTime )
- throw (uno::RuntimeException)
-{
- OSL_TRACE ("Player::setStopTime %f", fTime);
-
- mnStopTime = fTime;
-}
-
-// ------------------------------------------------------------------------------
-
-double SAL_CALL Player::getStopTime( )
- throw (uno::RuntimeException)
-{
- double fRet = mnStopTime;
-
- return fRet;
-}
-
-// ------------------------------------------------------------------------------
-
-void SAL_CALL Player::setRate( double fRate )
- throw (uno::RuntimeException)
-{
- OSL_TRACE ("Player::setRate");
-
- // Quicktime: 0 = stop, 1 = normal speed, 2 = double speed, -1 = normal speed backwards
- if ( mpMovie )
- {
- [mpMovie setRate: fRate];
- }
-}
-
-// ------------------------------------------------------------------------------
-
-double SAL_CALL Player::getRate( )
- throw (uno::RuntimeException)
-{
- // Quicktime: 0 = stop, 1 = normal speed, 2 = double speed, -1 = normal speed backwards
- double rate = 1.0;
-
- OSL_TRACE ("Player::getRate");
-
- if ( mpMovie )
- {
- rate = (double) [mpMovie rate];
- }
-
- return rate;
-}
-
-// ------------------------------------------------------------------------------
-
-void SAL_CALL Player::setPlaybackLoop( sal_Bool bSet )
- throw (uno::RuntimeException)
-{
- OSL_TRACE ("Player::setPlaybackLoop? %s", 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( )
- throw (uno::RuntimeException)
-{
- bool bRet = [[mpMovie attributeForKey:QTMovieLoopsAttribute] boolValue];
-
- OSL_TRACE ("Player::isPlaybackLoop ? %s", bRet?"True":"False" );
-
- return bRet;
-}
-
-// ------------------------------------------------------------------------------
-
-void SAL_CALL Player::setMute( sal_Bool bSet )
- throw (uno::RuntimeException)
-{
- OSL_TRACE( "set mute: %d muted: %d unmuted volume: %lf", bSet, mbMuted, mnUnmutedVolume );
-
- // change the volume to 0 or the unmuted volume
- if( mpMovie && mbMuted != bSet )
- {
- [mpMovie setMuted: bSet ];
- mbMuted = bSet;
- }
-
-}
-
-// ------------------------------------------------------------------------------
-
-sal_Bool SAL_CALL Player::isMute( )
- throw (uno::RuntimeException)
-{
- OSL_TRACE ("Player::isMuted");
-
- return mbMuted;
-}
-
-// ------------------------------------------------------------------------------
-
-void SAL_CALL Player::setVolumeDB( sal_Int16 nVolumeDB )
- throw (uno::RuntimeException)
-{
- // 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 );
- }
-
- OSL_TRACE( "set volume: %d gst volume: %f", nVolumeDB, mnUnmutedVolume );
-
- // change volume
- if( !mbMuted && mpMovie )
- {
- [mpMovie setVolume: mnUnmutedVolume ];
- }
-}
-
-// ------------------------------------------------------------------------------
-
-sal_Int16 SAL_CALL Player::getVolumeDB( )
- throw (uno::RuntimeException)
-{
- 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( )
- throw (uno::RuntimeException)
-{
- 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 )
- throw (uno::RuntimeException)
-{
- uno::Reference< ::media::XPlayerWindow > xRet;
- awt::Size aSize( getPreferredPlayerWindowSize() );
- NSSize nsSize( NSMakeSize(aSize.Width, aSize.Height) );
-
- OSL_TRACE( "Player::createPlayerWindow %d %d length: %d", aSize.Width, aSize.Height, aArguments.getLength() );
-
- if( aSize.Width > 0 && aSize.Height > 0 )
- {
- sal_IntPtr nPtr = NULL;
- 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( )
- throw (::com::sun::star::uno::RuntimeException)
-{
- uno::Reference< media::XFrameGrabber > xRet;
- OSL_TRACE ("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( )
- throw (uno::RuntimeException)
-{
- return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( AVMEDIA_QUICKTIME_PLAYER_IMPLEMENTATIONNAME ) );
-}
-
-// ------------------------------------------------------------------------------
-
-sal_Bool SAL_CALL Player::supportsService( const ::rtl::OUString& ServiceName )
- throw (uno::RuntimeException)
-{
- return ServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( AVMEDIA_QUICKTIME_PLAYER_SERVICENAME ) );
-}
-
-// ------------------------------------------------------------------------------
-
-uno::Sequence< ::rtl::OUString > SAL_CALL Player::getSupportedServiceNames( )
- throw (uno::RuntimeException)
-{
- uno::Sequence< ::rtl::OUString > aRet(1);
- aRet[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( AVMEDIA_QUICKTIME_PLAYER_SERVICENAME ) );
-
- return aRet;
-}
-
-} // namespace quicktime
-} // namespace avmedia
diff --git a/main/avmedia/source/quicktime/qt_player.hxx b/main/avmedia/source/quicktime/qt_player.hxx
deleted file mode 100644
index 9f9274b..0000000
--- a/main/avmedia/source/quicktime/qt_player.hxx
+++ /dev/null
@@ -1,107 +0,0 @@
-/**************************************************************
- *
- * 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
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- *************************************************************/
-
-
-#ifndef QT_PLAYER_HXX
-#define QT_PLAYER_HXX
-
-#include <osl/conditn.h>
-#include "qt_common.hxx"
-
-#include "com/sun/star/media/XPlayer.hdl"
-
-namespace avmedia { namespace quicktime {
-
-/*
-// ----------
-// - Player -
-// ----------
-*/
-
-class Player : public ::cppu::WeakImplHelper2< ::com::sun::star::media::XPlayer,
- ::com::sun::star::lang::XServiceInfo >
-{
-public:
-
- Player( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& rxMgr );
- ~Player();
-
- bool create( const ::rtl::OUString& rURL );
-
-// void processMessage( GstMessage *message );
-
- // XPlayer
- virtual void SAL_CALL start( ) throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL stop( ) throw (::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL isPlaying( ) throw (::com::sun::star::uno::RuntimeException);
- virtual double SAL_CALL getDuration( ) throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL setMediaTime( double fTime ) throw (::com::sun::star::uno::RuntimeException);
- virtual double SAL_CALL getMediaTime( ) throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL setStopTime( double fTime ) throw (::com::sun::star::uno::RuntimeException);
- virtual double SAL_CALL getStopTime( ) throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL setRate( double fRate ) throw (::com::sun::star::uno::RuntimeException);
- virtual double SAL_CALL getRate( ) throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL setPlaybackLoop( sal_Bool bSet ) throw (::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL isPlaybackLoop( ) throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL setMute( sal_Bool bSet ) throw (::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL isMute( ) throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL setVolumeDB( sal_Int16 nVolumeDB ) throw (::com::sun::star::uno::RuntimeException);
- virtual sal_Int16 SAL_CALL getVolumeDB( ) throw (::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::awt::Size SAL_CALL getPreferredPlayerWindowSize( ) throw (::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::media::XPlayerWindow > SAL_CALL createPlayerWindow( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments ) throw (::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::media::XFrameGrabber > SAL_CALL createFrameGrabber( ) throw (::com::sun::star::uno::RuntimeException);
- // XServiceInfo
- virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw (::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw (::com::sun::star::uno::RuntimeException);
-
- QTMovie* getMovie();
-
-private:
- ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > mxMgr;
-
- ::rtl::OUString maURL;
-
- QTMovie *mpMovie; // the Movie object
- /* GST
- sal_Bool mbFakeVideo;
- */
- float mnUnmutedVolume;
- double mnStopTime;
-
- sal_Bool mbMuted;
- sal_Bool mbLooping;
- sal_Bool mbInitialized;
-
- long mnWindowID;
- long mnDuration;
- int mnWidth;
- int mnHeight;
-
- long mnVersion;
- oslCondition maSizeCondition;
-};
-
-} // namespace quicktime
-} // namespace avmedia
-
-#endif // QT_PLAYER_HXX
-
diff --git a/main/avmedia/source/quicktime/qt_uno.cxx b/main/avmedia/source/quicktime/qt_uno.cxx
deleted file mode 100644
index 1046f2b..0000000
--- a/main/avmedia/source/quicktime/qt_uno.cxx
+++ /dev/null
@@ -1,71 +0,0 @@
-/**************************************************************
- *
- * 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
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- *************************************************************/
-
-#include "qt_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 ) );
-}
-
-// ------------------------------------------
-// - component_getImplementationEnvironment -
-// ------------------------------------------
-
-extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( const sal_Char ** ppEnvTypeName, uno_Environment ** /* ppEnv */ )
-{
- *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
-}
-
-// ------------------------
-// - component_getFactory -
-// ------------------------
-
-extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( const sal_Char* pImplName, void* pServiceManager, void* /* pRegistryKey */ )
-{
- uno::Reference< lang::XSingleServiceFactory > xFactory;
- void* pRet = 0;
-
- if( rtl_str_compare( pImplName, AVMEDIA_QUICKTIME_MANAGER_IMPLEMENTATIONNAME ) == 0 )
- {
- const ::rtl::OUString aServiceName( ::rtl::OUString::createFromAscii( AVMEDIA_QUICKTIME_MANAGER_SERVICENAME ) );
-
- xFactory = uno::Reference< lang::XSingleServiceFactory >( ::cppu::createSingleFactory(
- reinterpret_cast< lang::XMultiServiceFactory* >( pServiceManager ),
- ::rtl::OUString::createFromAscii( AVMEDIA_QUICKTIME_MANAGER_IMPLEMENTATIONNAME ),
- create_MediaPlayer, uno::Sequence< ::rtl::OUString >( &aServiceName, 1 ) ) );
- }
-
- if( xFactory.is() )
- {
- xFactory->acquire();
- pRet = xFactory.get();
- }
-
- return pRet;
-}
-
diff --git a/main/avmedia/source/quicktime/qt_window.cxx b/main/avmedia/source/quicktime/qt_window.cxx
deleted file mode 100644
index 73887ab..0000000
--- a/main/avmedia/source/quicktime/qt_window.cxx
+++ /dev/null
@@ -1,348 +0,0 @@
-/**************************************************************
- *
- * 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
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- *************************************************************/
-
-
-#include <com/sun/star/awt/SystemPointer.hpp>
-#include <com/sun/star/awt/PosSize.hpp>
-
-#include "qt_window.hxx"
-#include "qt_player.hxx"
-
-using namespace ::com::sun::star;
-
-namespace avmedia { namespace quicktime {
-
-// -----------
-// - statics -
-// -----------
-
-static ::osl::Mutex& ImplGetOwnStaticMutex()
-{
- static ::osl::Mutex* pMutex = NULL;
-
- if( pMutex == NULL )
- {
- ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
-
- if( pMutex == NULL )
- {
- static ::osl::Mutex aMutex;
- pMutex = &aMutex;
- }
- }
-
- return *pMutex;
-}
-
-// ---------------
-// - Window -
-// ---------------
-
-// ------------------------------------------------------------------------------
-
-Window::Window( const uno::Reference< lang::XMultiServiceFactory >& 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];
- }
-
- OSL_TRACE ("Window::Window");
-}
-
-// ------------------------------------------------------------------------------
-
-Window::~Window()
-{
- if( mpMovieView )
- {
- [mpMovieView removeFromSuperview];
- [mpMovieView setMovie:nil];
- [mpMovieView release];
- mpMovieView = nil;
- }
-}
-
-bool Window::create( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments )
-{
- return true;
-}
-
-// XPlayerWindow
-// ------------------------------------------------------------------------------
-
-void SAL_CALL Window::update( )
- throw (uno::RuntimeException)
-{
- ;
-}
-
-// ------------------------------------------------------------------------------
-
-sal_Bool SAL_CALL Window::setZoomLevel( media::ZoomLevel eZoomLevel )
- throw (uno::RuntimeException)
-{
- return false;
-}
-
-// ------------------------------------------------------------------------------
-
-media::ZoomLevel SAL_CALL Window::getZoomLevel( )
- throw (uno::RuntimeException)
-{
- return meZoomLevel;
-}
-
-// ------------------------------------------------------------------------------
-
-void SAL_CALL Window::setPointerType( sal_Int32 nPointerType )
- throw (uno::RuntimeException)
-{
- mnPointerType = nPointerType;
-}
-
-// XWindow
-// ------------------------------------------------------------------------------
-
-void SAL_CALL Window::setPosSize( sal_Int32 X, sal_Int32 Y, sal_Int32 Width, sal_Int32 Height, sal_Int16 Flags )
- throw (uno::RuntimeException)
-{
- if( 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()
- throw (uno::RuntimeException)
-{
- 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 bVisible )
- throw (uno::RuntimeException)
-{
- OSL_TRACE ("Window::setVisible");
-
-}
-
-// ------------------------------------------------------------------------------
-
-void SAL_CALL Window::setEnable( sal_Bool bEnable )
- throw (uno::RuntimeException)
-{
- ;
-}
-
-// ------------------------------------------------------------------------------
-
-void SAL_CALL Window::setFocus( )
- throw (uno::RuntimeException)
-{
- OSL_TRACE ("Window::setFocus");
-}
-
-// ------------------------------------------------------------------------------
-
-void SAL_CALL Window::addWindowListener( const uno::Reference< awt::XWindowListener >& xListener )
- throw (uno::RuntimeException)
-{
- maListeners.addInterface( getCppuType( &xListener ), xListener );
-}
-
-// ------------------------------------------------------------------------------
-
-void SAL_CALL Window::removeWindowListener( const uno::Reference< awt::XWindowListener >& xListener )
- throw (uno::RuntimeException)
-{
- maListeners.removeInterface( getCppuType( &xListener ), xListener );
-}
-
-// ------------------------------------------------------------------------------
-
-void SAL_CALL Window::addFocusListener( const uno::Reference< awt::XFocusListener >& xListener )
- throw (uno::RuntimeException)
-{
- maListeners.addInterface( getCppuType( &xListener ), xListener );
-}
-
-// ------------------------------------------------------------------------------
-
-void SAL_CALL Window::removeFocusListener( const uno::Reference< awt::XFocusListener >& xListener )
- throw (uno::RuntimeException)
-{
- maListeners.removeInterface( getCppuType( &xListener ), xListener );
-}
-
-// ------------------------------------------------------------------------------
-
-void SAL_CALL Window::addKeyListener( const uno::Reference< awt::XKeyListener >& xListener )
- throw (uno::RuntimeException)
-{
- maListeners.addInterface( getCppuType( &xListener ), xListener );
-}
-
-// ------------------------------------------------------------------------------
-
-void SAL_CALL Window::removeKeyListener( const uno::Reference< awt::XKeyListener >& xListener )
- throw (uno::RuntimeException)
-{
- maListeners.removeInterface( getCppuType( &xListener ), xListener );
-}
-
-// ------------------------------------------------------------------------------
-
-void SAL_CALL Window::addMouseListener( const uno::Reference< awt::XMouseListener >& xListener )
- throw (uno::RuntimeException)
-{
- maListeners.addInterface( getCppuType( &xListener ), xListener );
-}
-
-// ------------------------------------------------------------------------------
-
-void SAL_CALL Window::removeMouseListener( const uno::Reference< awt::XMouseListener >& xListener )
- throw (uno::RuntimeException)
-{
- maListeners.removeInterface( getCppuType( &xListener ), xListener );
-}
-
-// ------------------------------------------------------------------------------
-
-void SAL_CALL Window::addMouseMotionListener( const uno::Reference< awt::XMouseMotionListener >& xListener )
- throw (uno::RuntimeException)
-{
- maListeners.addInterface( getCppuType( &xListener ), xListener );
-}
-
-// ------------------------------------------------------------------------------
-
-void SAL_CALL Window::removeMouseMotionListener( const uno::Reference< awt::XMouseMotionListener >& xListener )
- throw (uno::RuntimeException)
-{
- maListeners.removeInterface( getCppuType( &xListener ), xListener );
-}
-
-// ------------------------------------------------------------------------------
-
-void SAL_CALL Window::addPaintListener( const uno::Reference< awt::XPaintListener >& xListener )
- throw (uno::RuntimeException)
-{
- maListeners.addInterface( getCppuType( &xListener ), xListener );
-}
-
-// ------------------------------------------------------------------------------
-
-void SAL_CALL Window::removePaintListener( const uno::Reference< awt::XPaintListener >& xListener )
- throw (uno::RuntimeException)
-{
- maListeners.removeInterface( getCppuType( &xListener ), xListener );
-}
-
-
-// XComponent
-// ------------------------------------------------------------------------------
-
-void SAL_CALL Window::dispose( )
- throw (uno::RuntimeException)
-{
-}
-
-// ------------------------------------------------------------------------------
-
-void SAL_CALL Window::addEventListener( const uno::Reference< lang::XEventListener >& xListener )
- throw (uno::RuntimeException)
-{
- maListeners.addInterface( getCppuType( &xListener ), xListener );
-}
-
-// ------------------------------------------------------------------------------
-
-void SAL_CALL Window::removeEventListener( const uno::Reference< lang::XEventListener >& xListener )
- throw (uno::RuntimeException)
-{
- maListeners.removeInterface( getCppuType( &xListener ), xListener );
-}
-
-// XServiceInfo
-// ------------------------------------------------------------------------------
-
-::rtl::OUString SAL_CALL Window::getImplementationName( )
- throw (uno::RuntimeException)
-{
- return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( AVMEDIA_QUICKTIME_WINDOW_IMPLEMENTATIONNAME ) );
-}
-
-// ------------------------------------------------------------------------------
-
-sal_Bool SAL_CALL Window::supportsService( const ::rtl::OUString& ServiceName )
- throw (uno::RuntimeException)
-{
- return ServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( AVMEDIA_QUICKTIME_WINDOW_SERVICENAME ) );
-}
-
-// ------------------------------------------------------------------------------
-
-uno::Sequence< ::rtl::OUString > SAL_CALL Window::getSupportedServiceNames( )
- throw (uno::RuntimeException)
-{
- uno::Sequence< ::rtl::OUString > aRet(1);
- aRet[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( AVMEDIA_QUICKTIME_WINDOW_SERVICENAME ) );
-
- return aRet;
-}
-
-} // namespace quicktime
-} // namespace avmedia
diff --git a/main/avmedia/source/quicktime/qt_window.hxx b/main/avmedia/source/quicktime/qt_window.hxx
deleted file mode 100644
index 9babf0d..0000000
--- a/main/avmedia/source/quicktime/qt_window.hxx
+++ /dev/null
@@ -1,109 +0,0 @@
-/**************************************************************
- *
- * 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
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- *************************************************************/
-
-
-#ifndef QT_WINDOW_HXX
-#define QT_WINDOW_HXX
-
-#include "qt_common.hxx"
-#include <cppuhelper/interfacecontainer.h>
-
-#include "com/sun/star/media/XPlayerWindow.hdl"
-
-namespace avmedia { namespace quicktime {
-
-// ---------------
-// - Window -
-// ---------------
-
-class Player;
-
-class Window : public ::cppu::WeakImplHelper2 < ::com::sun::star::media::XPlayerWindow,
- ::com::sun::star::lang::XServiceInfo >
-{
-public:
-
- Window( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_rxMgr,
- Player& i_rPlayer,
- NSView* i_pParentView
- );
- ~Window();
-
- bool create( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments );
- void processGraphEvent();
- void updatePointer();
-
- // XPlayerWindow
- virtual void SAL_CALL update( ) throw (::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL setZoomLevel( ::com::sun::star::media::ZoomLevel ZoomLevel ) throw (::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::media::ZoomLevel SAL_CALL getZoomLevel( ) throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL setPointerType( sal_Int32 nPointerType ) throw (::com::sun::star::uno::RuntimeException);
-
- // XWindow
- virtual void SAL_CALL setPosSize( sal_Int32 X, sal_Int32 Y, sal_Int32 Width, sal_Int32 Height, sal_Int16 Flags ) throw (::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::awt::Rectangle SAL_CALL getPosSize( ) throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL setVisible( sal_Bool Visible ) throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL setEnable( sal_Bool Enable ) throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL setFocus( ) throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL addWindowListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL removeWindowListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL addFocusListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XFocusListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL removeFocusListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XFocusListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL addKeyListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XKeyListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL removeKeyListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XKeyListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL addMouseListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XMouseListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL removeMouseListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XMouseListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL addMouseMotionListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XMouseMotionListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL removeMouseMotionListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XMouseMotionListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL addPaintListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XPaintListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL removePaintListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XPaintListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
-
- // XComponent
- virtual void SAL_CALL dispose( ) throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& aListener ) throw (::com::sun::star::uno::RuntimeException);
-
- // XServiceInfo
- virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw (::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw (::com::sun::star::uno::RuntimeException);
-
-private:
-
- ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > mxMgr;
-
- ::osl::Mutex maMutex;
- ::cppu::OMultiTypeInterfaceContainerHelper maListeners;
- ::com::sun::star::media::ZoomLevel meZoomLevel;
- Player& mrPlayer;
- int mnPointerType;
-
- 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 // QT_WINDOW_HXX
-
diff --git a/main/postprocess/packcomponents/makefile.mk b/main/postprocess/packcomponents/makefile.mk
index 1b81bd4..c4588cf 100644
--- a/main/postprocess/packcomponents/makefile.mk
+++ b/main/postprocess/packcomponents/makefile.mk
@@ -313,7 +313,6 @@ my_components += \
.IF "$(OS)" == "MACOSX"
my_components += \
component/avmedia/source/macavf/avmediaMacAVF \
- component/avmedia/source/quicktime/avmediaQuickTime \
component/fpicker/source/aqua/fps_aqua \
component/lingucomponent/source/spellcheck/macosxspell/MacOSXSpell \
macab1 \
diff --git a/main/scp2/source/ooo/file_library_ooo.scp b/main/scp2/source/ooo/file_library_ooo.scp
index 378e640..d8eda0b 100644
--- a/main/scp2/source/ooo/file_library_ooo.scp
+++ b/main/scp2/source/ooo/file_library_ooo.scp
@@ -592,13 +592,6 @@ File gid_File_Lib_MacOSXSpell
Dir = SCP2_OOO_BIN_DIR;
End
-File gid_File_Lib_avmediaQuickTime
- TXT_FILE_BODY;
- Styles = (PACKED);
- Name = LIBNAME(avmediaQuickTime);
- Dir = SCP2_OOO_BIN_DIR;
-End
-
File gid_File_Lib_avmediaMacAVF
TXT_FILE_BODY;
Styles = (PACKED);
diff --git a/main/vcl/Library_vcl.mk b/main/vcl/Library_vcl.mk
index f26ecb6..fe9b9fe 100644
--- a/main/vcl/Library_vcl.mk
+++ b/main/vcl/Library_vcl.mk
@@ -510,11 +510,6 @@ $(eval $(call gb_Library_add_libs,vcl,\
-framework Carbon \
-framework CoreFoundation \
))
-# ??? what about this
-#ifneq ($(MACOSX_DEPLOYMENT_TARGET),10.7)
-ifneq ($(MACOSX_DEPLOYMENT_TARGET),$(filter $(MACOSX_DEPLOYMENT_TARGET), 10.7 10.8))
-$(eval $(call gb_Library_add_ldflags,vcl, $$(LDFLAGS) -framework QuickTime ))
-endif
endif
ifeq ($(OS),WNT)
diff --git a/main/vcl/aqua/source/dtrans/PictToBmpFlt.cxx b/main/vcl/aqua/source/dtrans/PictToBmpFlt.cxx
index 17d4ffd..76887f0 100644
--- a/main/vcl/aqua/source/dtrans/PictToBmpFlt.cxx
+++ b/main/vcl/aqua/source/dtrans/PictToBmpFlt.cxx
@@ -31,7 +31,6 @@
#define DEPRECATED_ATTRIBUTE
#include <Carbon/Carbon.h>
-// #include <QuickTime/QuickTime.h>
#include <postmac.h>
#include "PictToBmpFlt.hxx"
diff --git a/main/vcl/util/makefile.mk b/main/vcl/util/makefile.mk
index b6d6328..ae7dd6b 100644
--- a/main/vcl/util/makefile.mk
+++ b/main/vcl/util/makefile.mk
@@ -195,11 +195,6 @@ SHL1STDLIBS+= \
$(BASEBMPLIB) \
-lAppleRemote$(DLLPOSTFIX)
-# the QuickTime API has been removed in OSX SDK 10.7
-.IF "${MACOSX_DEPLOYMENT_TARGET:s/.//}"<"107"
-SHL1STDLIBS+= -framework QuickTime
-.ENDIF
-
LIB1FILES+= \
$(SLB)$/sala11y.lib
.ENDIF