diff options
author | Zolnai Tamás <tamas.zolnai@collabora.com> | 2014-04-28 16:32:33 +0200 |
---|---|---|
committer | Zolnai Tamás <tamas.zolnai@collabora.com> | 2014-04-28 17:26:35 +0200 |
commit | 1736e5d91c76a824ffcb052c5e769444d3a0ed5e (patch) | |
tree | e7e89f3e6bc816bfe3e150e2e4d367ebb033fbfd /avmedia | |
parent | avmedia: make OpenGL window render model when play button is pushed. (diff) | |
download | core-1736e5d91c76a824ffcb052c5e769444d3a0ed5e.tar.gz core-1736e5d91c76a824ffcb052c5e769444d3a0ed5e.zip |
Slideshow: display OpenGL window also during slideshow
Use vcl based player window initialization.
Change-Id: If5c2198fa891e1d3ad218c8b7e1495161c0d6c25
Diffstat (limited to 'avmedia')
-rw-r--r-- | avmedia/source/framework/modeltools.cxx | 6 | ||||
-rw-r--r-- | avmedia/source/opengl/oglplayer.cxx | 6 | ||||
-rw-r--r-- | avmedia/source/opengl/oglwindow.cxx | 2 |
3 files changed, 14 insertions, 0 deletions
diff --git a/avmedia/source/framework/modeltools.cxx b/avmedia/source/framework/modeltools.cxx index 506a36c1d443..c625fbae88be 100644 --- a/avmedia/source/framework/modeltools.cxx +++ b/avmedia/source/framework/modeltools.cxx @@ -9,6 +9,7 @@ #include <avmedia/modeltools.hxx> #include <avmedia/mediaitem.hxx> +#include "mediamisc.hxx" #include <com/sun/star/embed/ElementModes.hpp> #include <com/sun/star/embed/XTransactedObject.hpp> @@ -193,6 +194,11 @@ bool Embed3DModel( const uno::Reference<frame::XModel>& xModel, return false; } +bool IsModel(const OUString& rMimeType) +{ + return rMimeType == AVMEDIA_MIMETYPE_JSON; +} + } // namespace avemdia /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/avmedia/source/opengl/oglplayer.cxx b/avmedia/source/opengl/oglplayer.cxx index a0a27b01328e..5c8bbeae9b59 100644 --- a/avmedia/source/opengl/oglplayer.cxx +++ b/avmedia/source/opengl/oglplayer.cxx @@ -192,6 +192,12 @@ uno::Reference< media::XPlayerWindow > SAL_CALL OGLPlayer::createPlayerWindow( c rArguments[ 2 ] >>= pIntPtr; SystemChildWindow *pChildWindow = reinterpret_cast< SystemChildWindow* >( pIntPtr ); m_aContext.init(pChildWindow); + Size aSize = pChildWindow->GetSizePixel(); + m_aContext.setWinSize(aSize); + m_pHandle->viewport.x = 0; + m_pHandle->viewport.y = 0; + m_pHandle->viewport.width = aSize.Width(); + m_pHandle->viewport.height = aSize.Height(); } OGLWindow* pWindow = new OGLWindow(m_pHandle, &m_aContext); return uno::Reference< media::XPlayerWindow >( pWindow ); diff --git a/avmedia/source/opengl/oglwindow.cxx b/avmedia/source/opengl/oglwindow.cxx index b67456250e46..a1b4a409cf87 100644 --- a/avmedia/source/opengl/oglwindow.cxx +++ b/avmedia/source/opengl/oglwindow.cxx @@ -119,6 +119,8 @@ awt::Rectangle SAL_CALL OGLWindow::getPosSize() void SAL_CALL OGLWindow::setVisible( sal_Bool bSet ) throw (uno::RuntimeException, std::exception) { + if( bSet && !m_bVisible ) + update(); m_bVisible = bSet; } |