diff options
author | Zolnai Tamás <tamas.zolnai@collabora.com> | 2014-06-11 12:36:26 +0200 |
---|---|---|
committer | Zolnai Tamás <tamas.zolnai@collabora.com> | 2014-06-12 21:43:35 +0200 |
commit | fe70101856332663f600df144b39d2638b3d0570 (patch) | |
tree | db4a1ba9353118269eec8738d6c3571bbb1c6d13 /avmedia | |
parent | 3d3fc58a32211cf56c5238f2d9f0e86a1eb7ae7e (diff) |
Introduce HAVE_FEATURE_GLTF to enable/disable gltf related code
When it is a release build then enable it only on Windows and
Linux.
Change-Id: I7c462aeb75e6ab60eeaa0fa42ca7853a6369b742
Diffstat (limited to 'avmedia')
-rw-r--r-- | avmedia/Library_avmedia.mk | 7 | ||||
-rw-r--r-- | avmedia/source/inc/mediamisc.hxx | 5 | ||||
-rw-r--r-- | avmedia/source/viewer/mediawindow_impl.cxx | 9 |
3 files changed, 20 insertions, 1 deletions
diff --git a/avmedia/Library_avmedia.mk b/avmedia/Library_avmedia.mk index 40ba35bbf976..63e9067ec38c 100644 --- a/avmedia/Library_avmedia.mk +++ b/avmedia/Library_avmedia.mk @@ -47,6 +47,12 @@ $(eval $(call gb_Library_use_libraries,avmedia,\ $(gb_UWINAPI) \ )) +ifeq ($(ENABLE_GLTF),TRUE) +$(eval $(call gb_Library_add_exception_objects,avmedia,\ + avmedia/source/framework/modeltools \ +)) +endif + ifneq (,$(filter COLLADA2GLTF,$(BUILD_TYPE))) $(eval $(call gb_Library_set_warnings_not_errors,avmedia)) @@ -74,7 +80,6 @@ $(eval $(call gb_Library_add_exception_objects,avmedia,\ avmedia/source/framework/mediamisc \ avmedia/source/framework/mediaplayer \ avmedia/source/framework/mediatoolbox \ - avmedia/source/framework/modeltools \ avmedia/source/framework/soundhandler \ avmedia/source/viewer/mediaevent_impl \ avmedia/source/viewer/mediawindow \ diff --git a/avmedia/source/inc/mediamisc.hxx b/avmedia/source/inc/mediamisc.hxx index 38a1e9db3f96..06e40665cc76 100644 --- a/avmedia/source/inc/mediamisc.hxx +++ b/avmedia/source/inc/mediamisc.hxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <config_features.h> + #ifndef INCLUDED_AVMEDIA_SOURCE_INC_MEDIAMISC_HXX #define INCLUDED_AVMEDIA_SOURCE_INC_MEDIAMISC_HXX @@ -42,7 +44,10 @@ class ResMgr; // Mime types #define AVMEDIA_MIMETYPE_COMMON "application/vnd.sun.star.media" + +#if HAVE_FEATURE_GLTF #define AVMEDIA_MIMETYPE_JSON "application/vnd.gltf+json" +#endif namespace avmedia diff --git a/avmedia/source/viewer/mediawindow_impl.cxx b/avmedia/source/viewer/mediawindow_impl.cxx index 114ab9b2ddc9..c22bdcb26f0e 100644 --- a/avmedia/source/viewer/mediawindow_impl.cxx +++ b/avmedia/source/viewer/mediawindow_impl.cxx @@ -16,6 +16,9 @@ * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ + +#include <config_features.h> + #include <iostream> #include "mediawindow_impl.hxx" #include "mediaevent_impl.hxx" @@ -83,10 +86,12 @@ MediaChildWindow::MediaChildWindow( Window* pParent ) : { } +#if HAVE_FEATURE_GLTF MediaChildWindow::MediaChildWindow( Window* pParent, SystemWindowData* pData ) : SystemChildWindow( pParent, WB_CLIPCHILDREN, pData ) { } +#endif MediaChildWindow::~MediaChildWindow() { @@ -242,10 +247,12 @@ uno::Reference< media::XPlayer > MediaWindowImpl::createPlayer( const OUString& xPlayer = createPlayer(rURL, aServiceName, xContext); } } +#if HAVE_FEATURE_GLTF else if ( *pMimeType == AVMEDIA_MIMETYPE_JSON ) { xPlayer = createPlayer(rURL, AVMEDIA_OPENGL_MANAGER_SERVICE_NAME, xContext); } +#endif return xPlayer; } @@ -501,12 +508,14 @@ void MediaWindowImpl::onURLChanged() { mpChildWindow.reset(new MediaChildWindow(this) ); } +#if HAVE_FEATURE_GLTF else if ( m_sMimeType == AVMEDIA_MIMETYPE_JSON ) { SystemWindowData aWinData = OpenGLContext::generateWinData(this); mpChildWindow.reset(new MediaChildWindow(this,&aWinData)); mbEventTransparent = false; } +#endif if( !mpChildWindow ) return; mpChildWindow->SetHelpId( HID_AVMEDIA_PLAYERWINDOW ); |