diff options
author | Minh Ngo <nlminhtl@gmail.com> | 2013-09-14 18:19:32 +0300 |
---|---|---|
committer | Minh Ngo <nlminhtl@gmail.com> | 2013-09-14 18:22:22 +0300 |
commit | 1bb7981525c671ebe78263114fe4a454b7e0ae42 (patch) | |
tree | 80d2d17f91a735f8a7a5ddcbcfc6c6065d2f30a6 /avmedia/source/vlc | |
parent | 6fe1efc01d6f9dc333a74a4e76e554b182651f60 (diff) |
Media zoom for Avmedia/vlc
Change-Id: I2870b3fbeaa6fbb623f21dfde9a33a6048c60b85
Diffstat (limited to 'avmedia/source/vlc')
-rw-r--r-- | avmedia/source/vlc/vlcwindow.cxx | 27 | ||||
-rw-r--r-- | avmedia/source/vlc/vlcwindow.hxx | 1 |
2 files changed, 24 insertions, 4 deletions
diff --git a/avmedia/source/vlc/vlcwindow.cxx b/avmedia/source/vlc/vlcwindow.cxx index b0048757b3f0..6bdaa67c3284 100644 --- a/avmedia/source/vlc/vlcwindow.cxx +++ b/avmedia/source/vlc/vlcwindow.cxx @@ -17,14 +17,27 @@ void SAL_CALL VLCWindow::update() throw (css::uno::RuntimeException) { } -::sal_Bool SAL_CALL VLCWindow::setZoomLevel( css::media::ZoomLevel ) throw (css::uno::RuntimeException) +::sal_Bool SAL_CALL VLCWindow::setZoomLevel( css::media::ZoomLevel eZoomLevel ) throw (css::uno::RuntimeException) { - return false; + sal_Bool bRet = false; + + if( media::ZoomLevel_NOT_AVAILABLE != meZoomLevel && + media::ZoomLevel_NOT_AVAILABLE != eZoomLevel ) + { + if( eZoomLevel != meZoomLevel ) + { + meZoomLevel = eZoomLevel; + } + + bRet = true; + } + + return bRet; } css::media::ZoomLevel SAL_CALL VLCWindow::getZoomLevel() throw (css::uno::RuntimeException) { - return css::media::ZoomLevel_NOT_AVAILABLE; + return meZoomLevel; } void SAL_CALL VLCWindow::setPointerType( ::sal_Int32 ) throw (css::uno::RuntimeException) @@ -70,7 +83,13 @@ void SAL_CALL VLCWindow::setPosSize( sal_Int32, sal_Int32, sal_Int32, sal_Int32, awt::Rectangle SAL_CALL VLCWindow::getPosSize() throw (uno::RuntimeException) { - return awt::Rectangle(); + awt::Rectangle aRet; + + aRet.X = aRet.Y = 0; + aRet.Width = 320; + aRet.Height = 240; + + return aRet; } void SAL_CALL VLCWindow::setVisible( sal_Bool ) diff --git a/avmedia/source/vlc/vlcwindow.hxx b/avmedia/source/vlc/vlcwindow.hxx index 2aa3e47de9f8..ef06576dcbef 100644 --- a/avmedia/source/vlc/vlcwindow.hxx +++ b/avmedia/source/vlc/vlcwindow.hxx @@ -27,6 +27,7 @@ namespace vlc { class VLCWindow : public ::cppu::WeakImplHelper2 < ::com::sun::star::media::XPlayerWindow, ::com::sun::star::lang::XServiceInfo > { + ::com::sun::star::media::ZoomLevel meZoomLevel; public: VLCWindow(); |