Kaydet (Commit) 8f4044af authored tarafından Michael Meeks's avatar Michael Meeks

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
üst 44d0e286
...@@ -16,6 +16,10 @@ $(eval $(call gb_Library_set_include,avmediavlc,\ ...@@ -16,6 +16,10 @@ $(eval $(call gb_Library_set_include,avmediavlc,\
-I$(SRCDIR)/avmedia/source/inc \ -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_sdk_api,avmediavlc))
$(eval $(call gb_Library_use_externals,avmediavlc,\ $(eval $(call gb_Library_use_externals,avmediavlc,\
......
...@@ -17,6 +17,10 @@ ...@@ -17,6 +17,10 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 . * 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 "vlccommon.hxx"
#include "vlcmanager.hxx" #include "vlcmanager.hxx"
...@@ -28,6 +32,12 @@ using namespace ::com::sun::star; ...@@ -28,6 +32,12 @@ using namespace ::com::sun::star;
static uno::Reference< uno::XInterface > SAL_CALL create_MediaPlayer( const uno::Reference< lang::XMultiServiceFactory >& rxFact ) static uno::Reference< uno::XInterface > SAL_CALL create_MediaPlayer( const uno::Reference< lang::XMultiServiceFactory >& rxFact )
{ {
SAL_INFO("avmedia", "create VLC Media player !\n"); 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 ) ); static uno::Reference< uno::XInterface > manager( *new ::avmedia::vlc::Manager( rxFact ) );
return manager; return manager;
} }
...@@ -37,6 +47,11 @@ extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL avmediavlc_component_getFactory( ...@@ -37,6 +47,11 @@ extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL avmediavlc_component_getFactory(
uno::Reference< lang::XSingleServiceFactory > xFactory; uno::Reference< lang::XSingleServiceFactory > xFactory;
void* pRet = 0; 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"); SAL_INFO("avmedia", "Create VLC Media component: '" << pImplName << "'\n");
if( rtl_str_compare( pImplName, IMPL_NAME ) == 0 ) if( rtl_str_compare( pImplName, IMPL_NAME ) == 0 )
{ {
......
...@@ -1198,7 +1198,7 @@ AC_ARG_ENABLE(gstreamer-0-10, ...@@ -1198,7 +1198,7 @@ AC_ARG_ENABLE(gstreamer-0-10,
AC_ARG_ENABLE(vlc, AC_ARG_ENABLE(vlc,
AS_HELP_STRING([--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) ,enable_vlc=no)
AC_ARG_ENABLE(neon, AC_ARG_ENABLE(neon,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment