summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2015-01-08 10:03:08 +0000
committerMichael Meeks <michael.meeks@collabora.com>2015-01-08 10:05:28 +0000
commit8f4044afa2426befb3f86dda21963576dbb19a9f (patch)
treebe4d9a534d5a158f5aa06eaec33776ba34cf5444
parent44d0e286c8c7a0ddb8e14fb2c3afe5af35311ef7 (diff)
avmedia: disable VLC unless in experimental model.
The code is really not in an ideal state, the key-frame generation is horrible - involving playing the video for three seconds each time etc. While the idea is great - the impl. and libvlc API use needs some love from a VLC expert really. Change-Id: If1787749d9952e30c1d80846e925cf1f65231463
-rw-r--r--avmedia/Library_avmediavlc.mk4
-rw-r--r--avmedia/source/vlc/vlcuno.cxx15
-rw-r--r--configure.ac2
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,