summaryrefslogtreecommitdiff
path: root/avmedia/source/vlc
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 /avmedia/source/vlc
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
Diffstat (limited to 'avmedia/source/vlc')
-rw-r--r--avmedia/source/vlc/vlcuno.cxx15
1 files changed, 15 insertions, 0 deletions
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 )
{