[Libreoffice-commits] core.git: Branch 'feature/vlc' - avmedia/Library_avmediavlc.mk avmedia/Module_avmedia.mk avmedia/source postprocess/Rdb_services.mk Repository.mk scp2/InstallModule_ooo.mk scp2/source
Michael Meeks
michael.meeks at suse.com
Wed May 29 04:28:17 PDT 2013
Repository.mk | 1
avmedia/Library_avmediavlc.mk | 45 +++++++++++++++++++++++++
avmedia/Module_avmedia.mk | 6 +++
avmedia/source/vlc/avmediavlc.component | 14 ++++++++
avmedia/source/vlc/vlccommon.hxx | 46 ++++++++++++++++++++++++++
avmedia/source/vlc/vlcuno.cxx | 56 ++++++++++++++++++++++++++++++++
postprocess/Rdb_services.mk | 3 +
scp2/InstallModule_ooo.mk | 1
scp2/source/ooo/file_library_ooo.scp | 3 +
scp2/source/ooo/module_hidden_ooo.scp | 1
10 files changed, 176 insertions(+)
New commits:
commit b96de744c22c1aeaa2e2f67cdfea22bd5665fb8d
Author: Michael Meeks <michael.meeks at suse.com>
Date: Wed May 29 12:27:08 2013 +0100
initial vlc component build / conditionals and hookup.
Change-Id: I12e4a368e18a58099160ee65eebe837744e11378
diff --git a/Repository.mk b/Repository.mk
index 723d7a3..669a893 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -522,6 +522,7 @@ $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,OOO, \
$(eval $(call gb_Helper_register_libraries,PLAINLIBS_OOO, \
avmediagst \
avmediagst_0_10 \
+ avmediavlc \
avmediawin \
bluez_bluetooth \
cached1 \
diff --git a/avmedia/Library_avmediavlc.mk b/avmedia/Library_avmediavlc.mk
new file mode 100644
index 0000000..f4b1b24
--- /dev/null
+++ b/avmedia/Library_avmediavlc.mk
@@ -0,0 +1,45 @@
+# -*- Mode: makefile; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_Library_Library,avmediavlc))
+
+$(eval $(call gb_Library_set_componentfile,avmediavlc,avmedia/source/vlc/avmediavlc))
+
+$(eval $(call gb_Library_set_include,avmediavlc,\
+ $$(INCLUDE) \
+ -I$(SRCDIR)/avmedia/source/inc \
+ $(VLC_CFLAGS) \
+))
+$(eval $(call gb_Library_add_libs,avmediavlc,$(VLC_LIBS)))
+
+$(eval $(call gb_Library_use_external,avmediavlc,boost_headers))
+
+$(eval $(call gb_Library_use_sdk_api,avmediavlc))
+
+ifeq ($(OS),WNT)
+$(eval $(call gb_Library_add_defs,avmediavlc,\
+ -DWINNT
+))
+endif
+
+$(eval $(call gb_Library_use_libraries,avmediavlc,\
+ comphelper \
+ cppu \
+ cppuhelper \
+ sal \
+ tl \
+ vcl \
+ $(gb_UWINAPI) \
+))
+
+$(eval $(call gb_Library_add_exception_objects,avmediavlc,\
+ avmedia/source/vlc/vlcuno \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/avmedia/Module_avmedia.mk b/avmedia/Module_avmedia.mk
index 3579081..68d2e74 100644
--- a/avmedia/Module_avmedia.mk
+++ b/avmedia/Module_avmedia.mk
@@ -26,6 +26,12 @@ $(eval $(call gb_Module_add_targets,avmedia,\
))
endif
+ifeq ($(ENABLE_VLC),TRUE)
+$(eval $(call gb_Module_add_targets,avmedia,\
+ Library_avmediavlc \
+))
+endif
+
ifeq ($(OS),MACOSX)
ifneq ($(CPUNAME),X86_64)
$(eval $(call gb_Module_add_targets,avmedia,\
diff --git a/avmedia/source/vlc/avmediavlc.component b/avmedia/source/vlc/avmediavlc.component
new file mode 100644
index 0000000..95e99a9
--- /dev/null
+++ b/avmedia/source/vlc/avmediavlc.component
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+-->
+<component loader="com.sun.star.loader.SharedLibrary" prefix="avmediavlc" xmlns="http://openoffice.org/2010/uno-components">
+ <implementation name="com.sun.star.comp.media.Manager_VLC">
+ <service name="com.sun.star.comp.avmedia.Manager_VLC"/>
+ </implementation>
+</component>
diff --git a/avmedia/source/vlc/vlccommon.hxx b/avmedia/source/vlc/vlccommon.hxx
new file mode 100644
index 0000000..e9cc864
--- /dev/null
+++ b/avmedia/source/vlc/vlccommon.hxx
@@ -0,0 +1,46 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef _VLCCOMMON_HXX
+#define _VLCCOMMON_HXX
+
+#include <vlc/libvlc.h>
+
+#include <osl/mutex.hxx>
+#include <tools/stream.hxx>
+#include <tools/urlobj.hxx>
+#include <cppuhelper/implbase1.hxx>
+#include <cppuhelper/implbase2.hxx>
+#include <cppuhelper/weak.hxx>
+#include <cppuhelper/factory.hxx>
+
+#include <com/sun/star/uno/Reference.h>
+#include <com/sun/star/uno/RuntimeException.hpp>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/lang/XComponent.hpp>
+#include <com/sun/star/registry/XRegistryKey.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/awt/Rectangle.hpp>
+#include <com/sun/star/awt/KeyModifier.hpp>
+#include <com/sun/star/awt/MouseButton.hpp>
+#include <com/sun/star/media/XManager.hpp>
+
+#endif // _VLCCOMMOM_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/avmedia/source/vlc/vlcuno.cxx b/avmedia/source/vlc/vlcuno.cxx
new file mode 100644
index 0000000..e907a1b
--- /dev/null
+++ b/avmedia/source/vlc/vlcuno.cxx
@@ -0,0 +1,56 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include "vlccommon.hxx"
+
+using namespace ::com::sun::star;
+
+#define IMPL_NAME "com.sun.star.comp.media.Manager_VLC"
+#define SERVICE_NAME "com.sun.star.comp.avmedia.Manager_VLC"
+
+static uno::Reference< uno::XInterface > SAL_CALL create_MediaPlayer( const uno::Reference< lang::XMultiServiceFactory >& rxFact )
+{
+ fprintf (stderr, "create VLC Media player !\n");
+ (void) rxFact;
+ return uno::Reference< uno::XInterface >(); // *new ::avmedia::vlc::Manager( rxFact ) );
+}
+
+extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL avmediavlc_component_getFactory( const sal_Char* pImplName, void* pServiceManager, void* /*pRegistryKey*/ )
+{
+ uno::Reference< lang::XSingleServiceFactory > xFactory;
+ void* pRet = 0;
+
+ if( rtl_str_compare( pImplName, IMPL_NAME ) == 0 )
+ {
+ const OUString aServiceName( SERVICE_NAME );
+ xFactory = uno::Reference< lang::XSingleServiceFactory >( ::cppu::createSingleFactory(
+ reinterpret_cast< lang::XMultiServiceFactory* >( pServiceManager ),
+ IMPL_NAME, create_MediaPlayer, uno::Sequence< OUString >( &aServiceName, 1 ) ) );
+ }
+
+ if( xFactory.is() )
+ {
+ xFactory->acquire();
+ pRet = xFactory.get();
+ }
+
+ return pRet;
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/postprocess/Rdb_services.mk b/postprocess/Rdb_services.mk
index d68df0e..91e280e 100644
--- a/postprocess/Rdb_services.mk
+++ b/postprocess/Rdb_services.mk
@@ -204,6 +204,9 @@ $(eval $(call gb_Rdb_add_components,services,\
$(if $(ENABLE_GSTREAMER_0_10), \
avmedia/source/gstreamer/avmediagstreamer_0_10 \
) \
+ $(if $(ENABLE_VLC), \
+ avmedia/source/gstreamer/avmediavlc \
+ ) \
$(if $(ENABLE_KAB), \
connectivity/source/drivers/kab/kab1 \
) \
diff --git a/scp2/InstallModule_ooo.mk b/scp2/InstallModule_ooo.mk
index 40cdafc..8a4fdf4 100644
--- a/scp2/InstallModule_ooo.mk
+++ b/scp2/InstallModule_ooo.mk
@@ -25,6 +25,7 @@ $(eval $(call gb_InstallModule_define_if_set,scp2/ooo,\
ENABLE_EVOAB2 \
ENABLE_GSTREAMER \
ENABLE_GSTREAMER_0_10 \
+ ENABLE_VLC \
ENABLE_GTK \
ENABLE_GTK3 \
ENABLE_KAB \
diff --git a/scp2/source/ooo/file_library_ooo.scp b/scp2/source/ooo/file_library_ooo.scp
index 03243b8..1bbebb1 100644
--- a/scp2/source/ooo/file_library_ooo.scp
+++ b/scp2/source/ooo/file_library_ooo.scp
@@ -925,6 +925,9 @@ SPECIAL_LIB_FILE( gid_File_Lib_AVMediaGStreamer, avmediagst )
#if defined ENABLE_GSTREAMER_0_10
SPECIAL_LIB_FILE( gid_File_Lib_AVMediaGStreamer_0_10, avmediagst_0_10 )
#endif
+#if defined ENABLE_VLC
+SPECIAL_LIB_FILE( gid_File_Lib_AVMediaVLC, avmediavlc )
+#endif
#if defined WNT
#ifdef ENABLE_DIRECTX
SPECIAL_LIB_FILE( gid_File_Lib_AVMediaWin, avmediawin )
diff --git a/scp2/source/ooo/module_hidden_ooo.scp b/scp2/source/ooo/module_hidden_ooo.scp
index 8f06a6e..494c27c 100644
--- a/scp2/source/ooo/module_hidden_ooo.scp
+++ b/scp2/source/ooo/module_hidden_ooo.scp
@@ -162,6 +162,7 @@ Module gid_Module_Root_Files_4
gid_File_Lib_AVMediaWin,
gid_File_Lib_AVMediaGStreamer,
gid_File_Lib_AVMediaGStreamer_0_10,
+ gid_File_Lib_AVMediaVLC,
gid_File_Lib_Sysdtrans,
gid_File_Lib_Acc,
gid_File_Lib_BaseBmp,
More information about the Libreoffice-commits
mailing list