[Libreoffice-commits] core.git: avmedia/Library_avmediavlc.mk avmedia/source configure.ac

Michael Meeks michael.meeks at collabora.com
Thu Jan 8 02:04:16 PST 2015


 avmedia/Library_avmediavlc.mk |    4 ++++
 avmedia/source/vlc/vlcuno.cxx |   15 +++++++++++++++
 configure.ac                  |    2 +-
 3 files changed, 20 insertions(+), 1 deletion(-)

New commits:
commit 8f4044afa2426befb3f86dda21963576dbb19a9f
Author: Michael Meeks <michael.meeks at collabora.com>
Date:   Thu Jan 8 10:03:08 2015 +0000

    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

diff --git a/avmedia/Library_avmediavlc.mk b/avmedia/Library_avmediavlc.mk
index 12b006c..15363ee 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 312b85a..e82b4a3 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 9ab1ef3..cb12418 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,


More information about the Libreoffice-commits mailing list