diff options
-rw-r--r-- | avmedia/Library_avmediavlc.mk | 4 | ||||
-rw-r--r-- | avmedia/source/vlc/vlcuno.cxx | 15 | ||||
-rw-r--r-- | configure.ac | 2 |
3 files changed, 20 insertions, 1 deletions
diff --git a/avmedia/Library_avmediavlc.mk b/avmedia/Library_avmediavlc.mk index 12b006c8936c..15363ee46282 100644 --- a/avmedia/Library_avmediavlc.mk +++ b/avmedia/Library_avmediavlc.mk @@ -16,6 +16,10 @@ $(eval $(call gb_Library_set_include,avmediavlc,\ -I$(SRCDIR)/avmedia/source/inc \ )) +$(eval $(call gb_Library_use_custom_headers,avmediavlc,\ + officecfg/registry \ +)) + $(eval $(call gb_Library_use_sdk_api,avmediavlc)) $(eval $(call gb_Library_use_externals,avmediavlc,\ diff --git a/avmedia/source/vlc/vlcuno.cxx b/avmedia/source/vlc/vlcuno.cxx index 312b85abe0a5..e82b4a39f8de 100644 --- a/avmedia/source/vlc/vlcuno.cxx +++ b/avmedia/source/vlc/vlcuno.cxx @@ -17,6 +17,10 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <comphelper/processfactory.hxx> +#include <comphelper/configuration.hxx> +#include <officecfg/Office/Common.hxx> + #include "vlccommon.hxx" #include "vlcmanager.hxx" @@ -28,6 +32,12 @@ using namespace ::com::sun::star; static uno::Reference< uno::XInterface > SAL_CALL create_MediaPlayer( const uno::Reference< lang::XMultiServiceFactory >& rxFact ) { SAL_INFO("avmedia", "create VLC Media player !\n"); + + // Experimental for now - code is neither elegant nor well tested. + uno::Reference< uno::XComponentContext > xContext = comphelper::getProcessComponentContext(); + if (!xContext.is() || !officecfg::Office::Common::Misc::ExperimentalMode::get(xContext)) + return NULL; + static uno::Reference< uno::XInterface > manager( *new ::avmedia::vlc::Manager( rxFact ) ); return manager; } @@ -37,6 +47,11 @@ extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL avmediavlc_component_getFactory( uno::Reference< lang::XSingleServiceFactory > xFactory; void* pRet = 0; + // Experimental for now - code is neither elegant nor well tested. + uno::Reference< uno::XComponentContext > xContext = comphelper::getProcessComponentContext(); + if (!xContext.is() || !officecfg::Office::Common::Misc::ExperimentalMode::get(xContext)) + return NULL; + SAL_INFO("avmedia", "Create VLC Media component: '" << pImplName << "'\n"); if( rtl_str_compare( pImplName, IMPL_NAME ) == 0 ) { diff --git a/configure.ac b/configure.ac index 9ab1ef383989..cb124185404d 100644 --- a/configure.ac +++ b/configure.ac @@ -1198,7 +1198,7 @@ AC_ARG_ENABLE(gstreamer-0-10, AC_ARG_ENABLE(vlc, AS_HELP_STRING([--enable-vlc], - [Enable building with the VLC avmedia backend.]), + [Enable building with the (experimental) VLC avmedia backend.]), ,enable_vlc=no) AC_ARG_ENABLE(neon, |