diff options
author | Ivo Hinkelmann <ihi@openoffice.org> | 2009-04-01 11:54:14 +0000 |
---|---|---|
committer | Ivo Hinkelmann <ihi@openoffice.org> | 2009-04-01 11:54:14 +0000 |
commit | 84daf70e3219642a13abdfbf2c030d414ebaac43 (patch) | |
tree | 22179f732a18f434d0ad912c8a15ba00dbd98330 /avmedia | |
parent | a472657291aacedbbe87a38194a744e25ed1ac1d (diff) |
CWS-TOOLING: integrate CWS vcl100
2009-03-26 21:27:56 +0100 pl r270106 : #i10000# fix an include path missing when using configure
2009-03-16 12:18:24 +0100 pl r269518 : #i98963# revert change
2009-03-13 14:56:47 +0100 pl r269483 : #i98980# work around a mysterious crash
2009-03-12 20:02:48 +0100 pl r269440 : resolve some warnings
2009-03-12 19:30:32 +0100 pl r269439 : resolve some warnings
2009-03-12 18:07:47 +0100 pl r269432 : solve some warnings
2009-03-12 09:07:33 +0100 hdu r269358 : #i100134# remove obsolete RCS/CVS keywords from source
2009-03-11 21:18:28 +0100 pl r269355 : #i100134# change sft.h and ttcr.h to c++ headers
2009-03-11 20:19:15 +0100 pl r269353 : #i100134# remove some ugly C style lists
2009-03-11 18:19:35 +0100 hdu r269347 : #i100134# make psprint.fontsubset source C++ and make it compile
2009-03-11 14:44:35 +0100 hdu r269334 : #i99862# fix justification of vocalized hebrew (thanks hennerdrewes)
2009-03-11 13:40:35 +0100 pl r269327 : CWS-TOOLING: rebase CWS vcl100 to trunk@269297 (milestone: DEV300:m43)
2009-03-10 16:49:34 +0100 hdu r269284 : #i1000020# add style-matching heuristics for single-char stylenames
2009-03-10 15:42:53 +0100 hdu r269278 : use fast ASCII-matching for extracting attributes from PSName
2009-03-09 16:29:08 +0100 pl r269200 : #i98980# skip bundles that are not NP plugins
2009-03-09 13:26:14 +0100 hdu r269083 : #i99868# fix text breaking for large nCharExtra
2009-03-09 12:20:01 +0100 hdu r269078 : #i99868# fix text breaking for large nCharExtra
2009-03-06 17:35:27 +0100 pl r269032 : #i98980# mouse events
2009-03-06 17:10:14 +0100 pl r269024 : #i98980# flash animations, initial paint problem
2009-03-05 20:00:21 +0100 pl r268939 : #i98980# more plugin support
2009-03-05 15:35:06 +0100 pl r268914 : #i98980# first twitches of a live plugin
2009-03-05 15:34:10 +0100 pl r268913 : #i98980# access to carbon headers
2009-03-04 15:46:29 +0100 pl r268839 : #i98980# generalize vcl SystemChildWindow from QTMovieView to NSView
2009-03-04 15:40:20 +0100 pl r268838 : #i98980# generalize vcl SystemChildWindow from QTMovieView to NSView
2009-03-04 11:30:49 +0100 hdu r268801 : #i99722# for OSX any anisotropy reported for the display resolution is best ignored
2009-03-02 15:52:21 +0100 pl r268655 : #i99770# fix ambiguous looking if statements (thanks cmc)
2009-03-02 13:28:17 +0100 pl r268649 : #i99770# fix ambiguous looking if statements (thanks cmc)
2009-02-27 15:39:30 +0100 pl r268603 : #i97512# omit degenrate current matrix
2009-02-27 12:37:29 +0100 pl r268579 : #i99716# remove unused code (thanks cmc)
2009-02-27 11:21:18 +0100 pl r268569 : #i99705 remove unused code (thanks cmc)
2009-02-23 10:42:00 +0100 pl r268345 : #i99492# remove a typo (thanks tono)
2009-02-19 12:46:21 +0100 pl r268274 : #i99411# add new mimetype
2009-02-10 12:57:59 +0100 pl r267548 : #i98980# more aqua plugin changes
2009-02-06 16:50:34 +0100 pl r267475 : #i98980# plugin detection
2009-02-06 16:46:48 +0100 pl r267474 : #i98980# make debug compilation work
2009-02-06 12:16:37 +0100 pl r267449 : #98963# add missing wrapper
2009-02-04 20:06:59 +0100 pl r267402 : #i97135# work around a gcc x64 optimizer bug
2009-02-04 13:45:36 +0100 pl r267380 : #159153# do not emit empty glyph vector
2009-02-03 17:47:16 +0100 pl r267338 : #i98533# recent gtk versions do not support GTK_MODULES for accessibility anymore
2009-02-03 10:39:46 +0100 pl r267305 : #i97146# check if the idle formatted view is still valid
2009-01-28 11:23:23 +0100 pl r267045 : #i42227# #i48965# refinement of check markings images
2009-01-27 19:40:01 +0100 pl r267016 : #i42227# #i48965# change menus wrt checkmarks and images
Diffstat (limited to 'avmedia')
-rw-r--r-- | avmedia/source/quicktime/player.cxx | 18 | ||||
-rw-r--r-- | avmedia/source/quicktime/player.hxx | 3 | ||||
-rw-r--r-- | avmedia/source/quicktime/window.cxx | 49 | ||||
-rw-r--r-- | avmedia/source/quicktime/window.hxx | 9 |
4 files changed, 54 insertions, 25 deletions
diff --git a/avmedia/source/quicktime/player.cxx b/avmedia/source/quicktime/player.cxx index e99c51f9217f..e8289570b5ae 100644 --- a/avmedia/source/quicktime/player.cxx +++ b/avmedia/source/quicktime/player.cxx @@ -75,7 +75,6 @@ namespace avmedia { namespace quicktime { Player::Player( const uno::Reference< lang::XMultiServiceFactory >& rxMgr ) : mxMgr( rxMgr ), - mpMovieView( nil ), mpMovie( nil ), /* GST mbFakeVideo (sal_False ), @@ -114,12 +113,6 @@ Player::~Player() { if( mbInitialized ) { - if( mpMovieView ) - { - [mpMovieView setMovie:nil]; - mpMovieView = nil; - } - if( mpMovie ) { [mpMovie release]; @@ -439,15 +432,12 @@ uno::Reference< ::media::XPlayerWindow > SAL_CALL Player::createPlayerWindow( co if( aSize.Width > 0 && aSize.Height > 0 ) { - ::avmedia::quicktime::Window* pWindow = new ::avmedia::quicktime::Window( mxMgr, *this ); - xRet = pWindow; - sal_IntPtr nPtr = NULL; aArguments[0] >>= nPtr; - mpMovieView = reinterpret_cast< QTMovieView * >(nPtr); - [mpMovieView setMovie: mpMovie]; - [mpMovieView setControllerVisible: NO]; - [mpMovieView setFrameSize: nsSize ]; + NSView* pParentView = reinterpret_cast< NSView * >(nPtr); + + ::avmedia::quicktime::Window* pWindow = new ::avmedia::quicktime::Window( mxMgr, *this, pParentView ); + xRet = pWindow; } return xRet; diff --git a/avmedia/source/quicktime/player.hxx b/avmedia/source/quicktime/player.hxx index 5a2741f034b7..b7cab51005f4 100644 --- a/avmedia/source/quicktime/player.hxx +++ b/avmedia/source/quicktime/player.hxx @@ -83,12 +83,13 @@ public: 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() { return mpMovie; } + private: ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > mxMgr; ::rtl::OUString maURL; - QTMovieView *mpMovieView; // the view containing the movie object, output target and controller QTMovie *mpMovie; // the Movie object /* GST sal_Bool mbFakeVideo; diff --git a/avmedia/source/quicktime/window.cxx b/avmedia/source/quicktime/window.cxx index 367d11b0599d..6c8121d75950 100644 --- a/avmedia/source/quicktime/window.cxx +++ b/avmedia/source/quicktime/window.cxx @@ -28,7 +28,8 @@ * ************************************************************************/ -#include <com/sun/star/awt/SystemPointer.hdl> +#include <com/sun/star/awt/SystemPointer.hpp> +#include <com/sun/star/awt/PosSize.hpp> #include "window.hxx" #include "player.hxx" @@ -65,16 +66,33 @@ static ::osl::Mutex& ImplGetOwnStaticMutex() // ------------------------------------------------------------------------------ -Window::Window( const uno::Reference< lang::XMultiServiceFactory >& rxMgr, Player& rPlayer ) : - mxMgr( rxMgr ), +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( rPlayer ), - mnPointerType( awt::SystemPointer::ARROW ) + 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"); } @@ -82,6 +100,13 @@ Window::Window( const uno::Reference< lang::XMultiServiceFactory >& rxMgr, Playe 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 ) @@ -128,7 +153,14 @@ void SAL_CALL Window::setPointerType( sal_Int32 nPointerType ) 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; + } } // ------------------------------------------------------------------------------ @@ -138,9 +170,10 @@ awt::Rectangle SAL_CALL Window::getPosSize() { awt::Rectangle aRet; + NSRect aRect = [mpMovieView frame]; aRet.X = aRet.Y = 0; - aRet.Width = 200; - aRet.Height = 100; + aRet.Width = aRect.size.width; + aRet.Height = aRect.size.height; return aRet; } diff --git a/avmedia/source/quicktime/window.hxx b/avmedia/source/quicktime/window.hxx index cb0699ee15f7..1c23a88754bb 100644 --- a/avmedia/source/quicktime/window.hxx +++ b/avmedia/source/quicktime/window.hxx @@ -51,8 +51,10 @@ class Window : public ::cppu::WeakImplHelper2 < ::com::sun::star::media::XPlayer { public: - Window( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& rxMgr, - Player& rPlayer ); + 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 ); @@ -104,6 +106,9 @@ private: 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(); }; |