diff options
author | Zolnai Tamás <tamas.zolnai@collabora.com> | 2014-05-06 17:10:59 +0200 |
---|---|---|
committer | Zolnai Tamás <tamas.zolnai@collabora.com> | 2014-05-06 17:25:16 +0200 |
commit | b4b10fc873ba38ea24da23d8a2235d3ab34d8c72 (patch) | |
tree | 6dba7a1d2a69403c3f0ea56d4e452f62a77080fe /avmedia/source/opengl | |
parent | 0ece50a4ce35d87b7402b201b2d099c37fdfc13e (diff) |
Upgrade libgltf
Change-Id: Ib7bc9562602d1d8da4082987302834ac2486d78a
Diffstat (limited to 'avmedia/source/opengl')
-rw-r--r-- | avmedia/source/opengl/oglframegrabber.cxx | 2 | ||||
-rw-r--r-- | avmedia/source/opengl/oglplayer.cxx | 11 | ||||
-rw-r--r-- | avmedia/source/opengl/oglplayer.hxx | 1 | ||||
-rw-r--r-- | avmedia/source/opengl/oglwindow.cxx | 2 |
4 files changed, 7 insertions, 9 deletions
diff --git a/avmedia/source/opengl/oglframegrabber.cxx b/avmedia/source/opengl/oglframegrabber.cxx index 8b061e7ab57c..c4d2408fc8f2 100644 --- a/avmedia/source/opengl/oglframegrabber.cxx +++ b/avmedia/source/opengl/oglframegrabber.cxx @@ -37,7 +37,7 @@ uno::Reference< css::graphic::XGraphic > SAL_CALL OGLFrameGrabber::grabFrame( do throw ( uno::RuntimeException, std::exception ) { boost::scoped_array<sal_uInt8> pBuffer(new sal_uInt8[m_pHandle->viewport.width * m_pHandle->viewport.height * 4]); - gltf_renderer_get_bitmap(m_pHandle, fMediaTime, (char*)pBuffer.get(), m_pHandle->viewport.width, m_pHandle->viewport.height, GL_BGRA); + gltf_renderer_get_bitmap(m_pHandle, fMediaTime, (char*)pBuffer.get(), GL_BGRA); BitmapEx aBitmap = OpenGLHelper::ConvertBGRABufferToBitmapEx(pBuffer.get(), m_pHandle->viewport.width, m_pHandle->viewport.height); return Graphic( aBitmap ).GetXGraphic(); } diff --git a/avmedia/source/opengl/oglplayer.cxx b/avmedia/source/opengl/oglplayer.cxx index 08c9d30e9227..0bed52c9f182 100644 --- a/avmedia/source/opengl/oglplayer.cxx +++ b/avmedia/source/opengl/oglplayer.cxx @@ -25,7 +25,6 @@ namespace avmedia { namespace ogl { OGLPlayer::OGLPlayer() : Player_BASE(m_aMutex) , m_pHandle(NULL) - , m_bIsPlayingTmp(false) { } @@ -102,20 +101,18 @@ void SAL_CALL OGLPlayer::start() throw ( uno::RuntimeException, std::exception ) { osl::MutexGuard aGuard(m_aMutex); gltf_animation_start(m_pHandle); - m_bIsPlayingTmp = true; } void SAL_CALL OGLPlayer::stop() throw ( uno::RuntimeException, std::exception ) { osl::MutexGuard aGuard(m_aMutex); gltf_animation_stop(m_pHandle); - m_bIsPlayingTmp = false; } sal_Bool SAL_CALL OGLPlayer::isPlaying() throw ( uno::RuntimeException, std::exception ) { osl::MutexGuard aGuard(m_aMutex); - return m_bIsPlayingTmp; //(sal_Bool)gltf_animation_is_playing(m_pHandle) + return (sal_Bool)gltf_animation_is_playing(m_pHandle); } double SAL_CALL OGLPlayer::getDuration() throw ( uno::RuntimeException, std::exception ) @@ -139,7 +136,7 @@ double SAL_CALL OGLPlayer::getMediaTime() throw ( ::com::sun::star::uno::Runtime double SAL_CALL OGLPlayer::getRate() throw ( uno::RuntimeException, std::exception ) { osl::MutexGuard aGuard(m_aMutex); - // TODO: Get the speed of stream reading (see com::sun::star::media::XPlayer) + // Seems unused return 1.0; } @@ -179,7 +176,7 @@ sal_Bool SAL_CALL OGLPlayer::isMute() throw ( uno::RuntimeException, std::except awt::Size SAL_CALL OGLPlayer::getPreferredPlayerWindowSize() throw ( uno::RuntimeException, std::exception ) { - return awt::Size( 480, 360 ); // TODO: It will be good for OpenGL too? + return awt::Size( 480, 360 ); } uno::Reference< media::XPlayerWindow > SAL_CALL OGLPlayer::createPlayerWindow( const uno::Sequence< uno::Any >& rArguments ) @@ -215,7 +212,7 @@ uno::Reference< media::XFrameGrabber > SAL_CALL OGLPlayer::createFrameGrabber() m_pHandle->viewport.height = getPreferredPlayerWindowSize().Height; gltf_renderer_set_content(m_pHandle); OGLFrameGrabber *pFrameGrabber = new OGLFrameGrabber( m_pHandle ); - return uno::Reference< media::XFrameGrabber >( pFrameGrabber );; + return uno::Reference< media::XFrameGrabber >( pFrameGrabber ); } OUString SAL_CALL OGLPlayer::getImplementationName() diff --git a/avmedia/source/opengl/oglplayer.hxx b/avmedia/source/opengl/oglplayer.hxx index 6d7077ac8283..1f1efce2440d 100644 --- a/avmedia/source/opengl/oglplayer.hxx +++ b/avmedia/source/opengl/oglplayer.hxx @@ -58,7 +58,6 @@ private: OUString m_sURL; glTFHandle* m_pHandle; OpenGLContext m_aContext; - bool m_bIsPlayingTmp; // Temporarly while libgltf does not implement the corresponding methods }; } // namespace ogl diff --git a/avmedia/source/opengl/oglwindow.cxx b/avmedia/source/opengl/oglwindow.cxx index a1b4a409cf87..31688741e639 100644 --- a/avmedia/source/opengl/oglwindow.cxx +++ b/avmedia/source/opengl/oglwindow.cxx @@ -30,7 +30,9 @@ void SAL_CALL OGLWindow::update() throw (css::uno::RuntimeException, std::except { m_pContext->makeCurrent(); gltf_renderer_set_content(m_pHandle); + gltf_prepare_renderer(m_pHandle); gltf_renderer(m_pHandle); + gltf_complete_renderer(); m_pContext->swapBuffers(); } |