20#include <com/sun/star/awt/SystemPointer.hpp>
21#include <com/sun/star/awt/PosSize.hpp>
33, meZoomLevel( media::ZoomLevel_NOT_AVAILABLE )
34, mrPlayer( i_rPlayer )
35, mnPointerType( awt::SystemPointer::
ARROW )
37, mpPlayerLayer( nullptr )
44 AVAsset* pMovie = [[pAVPlayer currentItem] asset];
45 const int nVideoCount = [pMovie tracksWithMediaType:AVMediaTypeVideo].count;
46 if( nVideoCount <= 0 )
52 mpPlayerLayer = [AVPlayerLayer playerLayerWithPlayer:pAVPlayer];
54 NSRect viewFrame = [
mpView frame];
55 [
mpPlayerLayer setFrame:CGRectMake(viewFrame.origin.x, viewFrame.origin.y, viewFrame.size.width, viewFrame.size.height)];
57 [
mpPlayerLayer setVideoGravity:AVLayerVideoGravityResizeAspectFill];
75 const bool bReadyForDisplay = [
mpPlayerLayer isReadyForDisplay];
105void SAL_CALL
Window::setPosSize( sal_Int32 , sal_Int32 , sal_Int32 Width, sal_Int32 Height, sal_Int16 )
109 NSRect aRect = [
mpView frame];
111 aRect.size.width =
Width;
113 aRect.size.height =
Height;
115 [
mpView setFrameSize: aRect.size];
116 NSRect viewFrame = [
mpView frame];
117 [
mpPlayerLayer setFrame:CGRectMake(viewFrame.origin.x, viewFrame.origin.y, viewFrame.size.width, viewFrame.size.height)];
125 NSRect aRect = [
mpView frame];
127 aRet.Width = aRect.size.width;
128 aRet.Height = aRect.size.height;
sal_Int32 removeInterface(const css::uno::Type &rKey, const css::uno::Reference< css::uno::XInterface > &rxIFace)
sal_Int32 addInterface(const css::uno::Type &rKey, const css::uno::Reference< css::uno::XInterface > &r)
#define AVMEDIA_MACAVF_WINDOW_SERVICENAME
#define AVMEDIA_MACAVF_WINDOW_IMPLEMENTATIONNAME