summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--avmedia/Module_avmedia.mk3
-rw-r--r--avmedia/source/macavf/macavfcommon.hxx14
-rw-r--r--avmedia/source/macavf/player.mm16
-rw-r--r--avmedia/source/macavf/window.mm6
-rw-r--r--postprocess/Rdb_services.mk4
-rw-r--r--scp2/source/ooo/file_library_ooo.scp2
6 files changed, 20 insertions, 25 deletions
diff --git a/avmedia/Module_avmedia.mk b/avmedia/Module_avmedia.mk
index 06bbef7a1bd1..bd0382d13770 100644
--- a/avmedia/Module_avmedia.mk
+++ b/avmedia/Module_avmedia.mk
@@ -44,15 +44,12 @@ endif
endif
ifeq ($(OS),MACOSX)
-ifeq ($(CPUNAME),X86_64)
-# The macavf code is a bit x86_64 dependent...
ifneq (1060,$(MACOSX_SDK_VERSION))
$(eval $(call gb_Module_add_targets,avmedia,\
Library_avmediaMacAVF \
))
endif
endif
-endif
ifneq ($(ENABLE_DIRECTX),)
$(eval $(call gb_Module_add_targets,avmedia,\
diff --git a/avmedia/source/macavf/macavfcommon.hxx b/avmedia/source/macavf/macavfcommon.hxx
index 7082724ac27e..618a5667509f 100644
--- a/avmedia/source/macavf/macavfcommon.hxx
+++ b/avmedia/source/macavf/macavfcommon.hxx
@@ -20,12 +20,13 @@
#ifndef INCLUDED_AVMEDIA_SOURCE_MACAVF_MACAVFCOMMON_HXX
#define INCLUDED_AVMEDIA_SOURCE_MACAVF_MACAVFCOMMON_HXX
-#ifdef MACOSX
#include <premac.h>
#import <Cocoa/Cocoa.h>
#import <AVFoundation/AVFoundation.h>
#include <postmac.h>
-#endif
+
+#include <boost/unordered_map.hpp>
+
#include <osl/mutex.hxx>
#include <rtl/ustring.hxx>
#include <tools/debug.hxx>
@@ -64,7 +65,16 @@
// MacAVObserver handles the notifications used in the AVFoundation framework
+namespace avmedia { namespace macavf {
+class MacAVObserverHandler;
+} }
+
+typedef boost::unordered_map<NSObject*,avmedia::macavf::MacAVObserverHandler*> HandlersForObject;
+
@interface MacAVObserverObject : NSObject
+{
+ HandlersForObject maHandlersForObject;
+}
- (void)observeValueForKeyPath:(NSString*)pKeyPath ofObject:(id)pObject change:(NSDictionary*)pChangeDict context:(void*)pContext;
- (void)onNotification:(NSNotification*)pNotification;
@end
diff --git a/avmedia/source/macavf/player.mm b/avmedia/source/macavf/player.mm
index 6c348e0ef4be..14f8a073336a 100644
--- a/avmedia/source/macavf/player.mm
+++ b/avmedia/source/macavf/player.mm
@@ -25,18 +25,8 @@
using namespace ::com::sun::star;
-#ifdef _LIBCPP_VERSION
-#include <unordered_map>
-typedef std::unordered_map<NSObject*,avmedia::macavf::MacAVObserverHandler*> HandlersForObject;
-#else
-#include <ext/hash_map>
-typedef std::hash_map<NSObject*,avmedia::macavf::MacAVObserverHandler*> HandlersForObject;
-#endif
-
@implementation MacAVObserverObject
-{
- HandlersForObject maHandlersForObject;
-}
+
- (void)observeValueForKeyPath:(NSString*)pKeyPath ofObject:(id)pObject change:(NSDictionary*)pChangeDict context:(void*)pContext
{
(void) pObject;
@@ -387,7 +377,7 @@ awt::Size SAL_CALL Player::getPreferredPlayerWindowSize()
NSArray* pVideoTracks = [pMovie tracksWithMediaType:AVMediaTypeVideo];
if ([pVideoTracks count] > 0)
{
- AVAssetTrack* pFirstVideoTrack =(AVAssetTrack*)pVideoTracks[0];
+ AVAssetTrack* pFirstVideoTrack = (AVAssetTrack*) [pVideoTracks objectAtIndex:0];
const CGSize aPrefSize = [pFirstVideoTrack naturalSize];
aSize = awt::Size( aPrefSize.width, aPrefSize.height );
}
@@ -405,7 +395,7 @@ uno::Reference< ::media::XPlayerWindow > SAL_CALL Player::createPlayerWindow( co
OSL_TRACE( "Player::createPlayerWindow %dx%d argsLength: %d", aSize.Width, aSize.Height, aArguments.getLength() );
// get the parent view
- sal_IntPtr nNSViewPtr = NULL;
+ sal_IntPtr nNSViewPtr = 0;
aArguments[0] >>= nNSViewPtr;
NSView* pParentView = reinterpret_cast<NSView*>(nNSViewPtr);
diff --git a/avmedia/source/macavf/window.mm b/avmedia/source/macavf/window.mm
index af54f0cad40a..ea1132bedba9 100644
--- a/avmedia/source/macavf/window.mm
+++ b/avmedia/source/macavf/window.mm
@@ -60,7 +60,8 @@ Window::Window( const uno::Reference< lang::XMultiServiceFactory >& i_rxMgr, Pla
[pAVPlayer pause];
mpPlayerLayer = [AVPlayerLayer playerLayerWithPlayer:pAVPlayer];
[mpPlayerLayer retain];
- [mpPlayerLayer setFrame:[mpView frame]];
+ NSRect viewFrame = [mpView frame];
+ [mpPlayerLayer setFrame:CGRectMake(viewFrame.origin.x, viewFrame.origin.y, viewFrame.size.width, viewFrame.size.height)];
[mpPlayerLayer setHidden:YES];
[mpPlayerLayer setVideoGravity:AVLayerVideoGravityResizeAspectFill];
[mpPlayerLayer addObserver:getObserver() forKeyPath:@"readyForDisplay" options:0 context:this];
@@ -142,7 +143,8 @@ void SAL_CALL Window::setPosSize( sal_Int32 X, sal_Int32 Y, sal_Int32 Width, sal
aRect.size.height = Height;
[mpView setFrameSize: aRect.size];
- [mpPlayerLayer setFrame: [mpView frame]];
+ NSRect viewFrame = [mpView frame];
+ [mpPlayerLayer setFrame:CGRectMake(viewFrame.origin.x, viewFrame.origin.y, viewFrame.size.width, viewFrame.size.height)];
}
// ------------------------------------------------------------------------------
diff --git a/postprocess/Rdb_services.mk b/postprocess/Rdb_services.mk
index 750fafeabd33..9ebe6d282e44 100644
--- a/postprocess/Rdb_services.mk
+++ b/postprocess/Rdb_services.mk
@@ -122,9 +122,7 @@ $(eval $(call gb_Rdb_add_components,services,\
writerperfect/source/writer/wpftwriter \
$(if $(filter MACOSX,$(OS)), \
$(if $(filter 1060,$(MACOSX_SDK_VERSION)),, \
- $(if $(filter X86_64,$(CPUNAME)), \
- $(call gb_Helper_optional,AVMEDIA,avmedia/source/macavf/avmediaMacAVF) \
- ) \
+ $(call gb_Helper_optional,AVMEDIA,avmedia/source/macavf/avmediaMacAVF) \
) \
$(if $(filter TRUE,$(ENABLE_MACOSX_SANDBOX)),, \
$(call gb_Helper_optional,AVMEDIA,avmedia/source/quicktime/avmediaQuickTime) \
diff --git a/scp2/source/ooo/file_library_ooo.scp b/scp2/source/ooo/file_library_ooo.scp
index fa610872e05c..6c27cf290584 100644
--- a/scp2/source/ooo/file_library_ooo.scp
+++ b/scp2/source/ooo/file_library_ooo.scp
@@ -108,13 +108,11 @@ File gid_File_Lib_avmediaQuickTime
End
#if MAXOSX_SDK_VERSION >= 1070
-#ifdef X86_64
File gid_File_Lib_avmediaMacAVF
PACKED_LIB_FILE_BODY;
Name = LIBNAME(avmediaMacAVF);
End
#endif
-#endif
#endif