From 03bd2fd7b97f8f8164039203027f89e82c1c4212 Mon Sep 17 00:00:00 2001 From: David Tardon Date: Fri, 10 Aug 2012 08:11:46 +0200 Subject: [PATCH 3/7] make avmedia build with gstreamer-0.10 Change-Id: I6124904cecdb8ea66477f40b6771a103a8058c10 Signed-off-by: David Tardon --- avmedia/Library_avmediagst_0_10.mk | 65 +++++++++++++++++++++++++++++++++ avmedia/source/gstreamer/gstmanager.cxx | 2 + avmedia/source/gstreamer/gstplayer.cxx | 8 ++-- configure.in | 2 +- 4 files changed, 73 insertions(+), 4 deletions(-) create mode 100644 avmedia/Library_avmediagst_0_10.mk diff --git a/avmedia/Library_avmediagst_0_10.mk b/avmedia/Library_avmediagst_0_10.mk new file mode 100644 index 0000000..9347c2b --- /dev/null +++ b/avmedia/Library_avmediagst_0_10.mk @@ -0,0 +1,65 @@ +# -*- Mode: makefile; tab-width: 4; indent-tabs-mode: t -*- +# Version: MPL 1.1 / GPLv3+ / LGPLv3+ +# +# The contents of this file are subject to the Mozilla Public License Version +# 1.1 (the "License"); you may not use this file except in compliance with +# the License or as specified alternatively below. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License +# for the specific language governing rights and limitations under the +# License. +# +# The Initial Developer of the Original Code is +# Matúš Kukan +# Portions created by the Initial Developer are Copyright (C) 2011 the +# Initial Developer. All Rights Reserved. +# +# Major Contributor(s): +# +# For minor contributions see the git repository. +# +# Alternatively, the contents of this file may be used under the terms of +# either the GNU General Public License Version 3 or later (the "GPLv3+"), or +# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"), +# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable +# instead of those above. + +$(eval $(call gb_Library_Library,avmediagst_0_10)) + +$(eval $(call gb_Library_set_componentfile,avmediagst_0_10,avmedia/source/gstreamer/avmediagstreamer_0_10)) + +$(eval $(call gb_Library_set_include,avmediagst_0_10,\ + $$(INCLUDE) \ + -I$(SRCDIR)/avmedia/source/inc \ + $(GSTREAMER_0_10_CFLAGS) \ +)) +$(eval $(call gb_Library_add_libs,avmediagst_0_10,$(GSTREAMER_0_10_LIBS))) + +$(eval $(call gb_Library_use_api,avmediagst_0_10,\ + offapi \ + udkapi \ +)) + +ifeq ($(GUI),WNT) +$(eval $(call gb_Library_add_defs,avmediagst_0_10,\ + -DWINNT +)) +endif + +$(eval $(call gb_Library_use_libraries,avmediagst_0_10,\ + comphelper \ + cppu \ + cppuhelper \ + sal \ + tl \ + vcl \ + $(gb_STDLIBS) \ +)) + +$(eval $(call gb_Library_add_exception_objects,avmediagst_0_10,\ + avmedia/source/gstreamer/gst_0_10 \ +)) + +# vim: set noet sw=4 ts=4: diff --git a/avmedia/source/gstreamer/gstmanager.cxx b/avmedia/source/gstreamer/gstmanager.cxx index 6b3ffff..f04e5cc 100644 --- a/avmedia/source/gstreamer/gstmanager.cxx +++ b/avmedia/source/gstreamer/gstmanager.cxx @@ -34,11 +34,13 @@ #define AVMEDIA_GST_MANAGER_IMPLEMENTATIONNAME "com.sun.star.comp.avmedia.Manager_GStreamer" #define AVMEDIA_GST_MANAGER_SERVICENAME "com.sun.star.media.Manager" +#if !defined DBG #if OSL_DEBUG_LEVEL > 2 #define DBG OSL_TRACE #else #define DBG(...) #endif +#endif using namespace ::com::sun::star; diff --git a/avmedia/source/gstreamer/gstplayer.cxx b/avmedia/source/gstreamer/gstplayer.cxx index 28e5d34..3654410 100644 --- a/avmedia/source/gstreamer/gstplayer.cxx +++ b/avmedia/source/gstreamer/gstplayer.cxx @@ -50,11 +50,13 @@ # define AVVERSION "gst 1.0: " #endif -#if 1 //OSL_DEBUG_LEVEL > 2 +#if !defined DBG +#if OSL_DEBUG_LEVEL > 2 #define DBG(...) do { fprintf (stderr, "%s", AVVERSION); fprintf (stderr, __VA_ARGS__); fprintf (stderr, "\n"); } while (0); #else #define DBG(...) #endif +#endif using namespace ::com::sun::star; @@ -192,7 +194,7 @@ GstBusSyncReply Player::processSyncMessage( GstMessage *message ) { // DBG( "%p processSyncMessage has handle: %s", this, GST_MESSAGE_TYPE_NAME( message ) ); -#if 1 // OSL_DEBUG_LEVEL > 0 +#if OSL_DEBUG_LEVEL > 0 if ( GST_MESSAGE_TYPE( message ) == GST_MESSAGE_ERROR ) { GError* error; @@ -575,7 +577,7 @@ awt::Size SAL_CALL Player::getPreferredPlayerWindowSize() DBG( "%p Player::getPreferredPlayerWindowSize, member %d x %d", this, mnWidth, mnHeight ); TimeValue aTimeout = { 10, 0 }; -#if 1 // OSL_DEBUG_LEVEL > 2 +#if OSL_DEBUG_LEVEL > 2 osl::Condition::Result aResult = #endif maSizeCondition.wait( &aTimeout ); diff --git a/configure.in b/configure.in index 46b9892..0b60c3f 100644 --- a/configure.in +++ b/configure.in @@ -8971,7 +8971,7 @@ if test "$build_gstreamer_0_10" = "yes"; then if test "x$enable_gstreamer_0_10" != "xno"; then ENABLE_GSTREAMER_0_10="TRUE" AC_MSG_RESULT([yes]) - PKG_CHECK_MODULES( GSTREAMER_0_10, gstreamer-0.10 gstreamer-plugins-base-0.10 ) + PKG_CHECK_MODULES( GSTREAMER_0_10, gstreamer-0.10 gstreamer-plugins-base-0.10 gstreamer-interfaces-0.10 ) else AC_MSG_RESULT([no]) fi -- 1.7.11.4