gnomemm r1658 - in gstreamermm/trunk: . gstreamer/gstreamermm gstreamer/src gstreamerbase gstreamerbase/src tests
- From: jaalburqu svn gnome org
- To: svn-commits-list gnome org
- Subject: gnomemm r1658 - in gstreamermm/trunk: . gstreamer/gstreamermm gstreamer/src gstreamerbase gstreamerbase/src tests
- Date: Fri, 1 Aug 2008 03:53:24 +0000 (UTC)
Author: jaalburqu
Date: Fri Aug 1 03:53:23 2008
New Revision: 1658
URL: http://svn.gnome.org/viewvc/gnomemm?rev=1658&view=rev
Log:
2008-07-31 Josà Alburquerque <jaalburqu svn gnome org>
* Makefile.am:
* configure.ac:
* gstreamer/gstreamermm/Makefile.am:
* gstreamerbase/gstreamerbasemm-0.10.pc.in:
* tests/Makefile.am: Added gstreamer-audio-0.10 to gstreamerbasemm
dependencies. Removed libgstreamerbasemm-0.10.la from gstreamermm
library list and include it for tests. Build gstreamer branch before
gstreamerbase branch.
* gstreamer/src/task.hg: Hid private slot variable from docs.
* gstreamer/src/plugin.ccg:
* gstreamer/src/plugin.hg: Added code to be able to register static
plugins as Eric Jonas asked about in "Gstreamer with C++" thread on
gtkmm-list on 7/21/2008. This code is dependent on the acceptance of
bug #545787.
* gstreamerbase/src/Makefile_list_of_hg.am_fragment:
* gstreamerbase/src/audioclock.ccg:
* gstreamerbase/src/audioclock.hg: Added GstBase::AudioClock. Bug
#545782 needs to be resolved before it can be completely included.
Added:
gstreamermm/trunk/gstreamerbase/src/audioclock.ccg
gstreamermm/trunk/gstreamerbase/src/audioclock.hg
Modified:
gstreamermm/trunk/ChangeLog
gstreamermm/trunk/Makefile.am
gstreamermm/trunk/configure.ac
gstreamermm/trunk/gstreamer/gstreamermm/Makefile.am
gstreamermm/trunk/gstreamer/src/plugin.ccg
gstreamermm/trunk/gstreamer/src/plugin.hg
gstreamermm/trunk/gstreamer/src/task.hg
gstreamermm/trunk/gstreamerbase/gstreamerbasemm-0.10.pc.in
gstreamermm/trunk/gstreamerbase/src/Makefile_list_of_hg.am_fragment
gstreamermm/trunk/tests/Makefile.am
Modified: gstreamermm/trunk/Makefile.am
==============================================================================
--- gstreamermm/trunk/Makefile.am (original)
+++ gstreamermm/trunk/Makefile.am Fri Aug 1 03:53:23 2008
@@ -1,5 +1,5 @@
-SUBDIRS=tools gstreamerbase gstreamer tests @EXAMPLE_SUBDIR@ @DEMO_SUBDIR@ @DOCS_SUBDIR@
+SUBDIRS=tools gstreamer gstreamerbase tests @EXAMPLE_SUBDIR@ @DEMO_SUBDIR@ @DOCS_SUBDIR@
DIST_SUBDIRS=$(SUBDIRS) scripts
EXTRA_DIST= build_shared/Makefile_build.am_fragment \
Modified: gstreamermm/trunk/configure.ac
==============================================================================
--- gstreamermm/trunk/configure.ac (original)
+++ gstreamermm/trunk/configure.ac Fri Aug 1 03:53:23 2008
@@ -142,6 +142,7 @@
PKG_CHECK_MODULES(GSTREAMERBASEMM, \
glibmm-2.4 >= ${gstreamermm_min_glibmm_version} \
gstreamer-plugins-base-0.10 >= ${gstreamermm_min_gst_version} \
+ gstreamer-audio-0.10 >= ${gstreamermm_min_gst_version} \
gstreamer-interfaces-0.10 >= ${gstreamermm_min_gst_version} \
)
AC_SUBST(GSTREAMERBASEMM_CFLAGS)
Modified: gstreamermm/trunk/gstreamer/gstreamermm/Makefile.am
==============================================================================
--- gstreamermm/trunk/gstreamer/gstreamermm/Makefile.am (original)
+++ gstreamermm/trunk/gstreamer/gstreamermm/Makefile.am Fri Aug 1 03:53:23 2008
@@ -26,6 +26,5 @@
lib_LTLIBRARIES = libgstreamermm-0.10.la
libgstreamermm_0_10_la_SOURCES = $(files_built_cc) $(files_extra_cc)
libgstreamermm_0_10_la_LDFLAGS = $(common_ldflags)
-libgstreamermm_0_10_la_LIBADD = $(top_builddir)/gstreamerbase/gstreamerbasemm/libgstreamerbasemm-0.10.la \
- $(GSTREAMERMM_LIBS)
+libgstreamermm_0_10_la_LIBADD = $(GSTREAMERMM_LIBS)
Modified: gstreamermm/trunk/gstreamer/src/plugin.ccg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/plugin.ccg (original)
+++ gstreamermm/trunk/gstreamer/src/plugin.ccg Fri Aug 1 03:53:23 2008
@@ -21,3 +21,47 @@
#include <gst/gstenumtypes.h>
_PINCLUDE(gstreamermm/private/object_p.h)
+
+gboolean Plugin_Init_gstreamermm_callback(GstPlugin* plugin, void* data)
+{
+ Gst::Plugin::SlotInit* the_slot = static_cast<Gst::Plugin::SlotInit*>(data);
+ bool result = false;
+
+ #ifdef GLIBMM_EXCEPTIONS_ENABLED
+ try
+ {
+ #endif //GLIBMM_EXCEPTIONS_ENABLED
+ result = (*the_slot)(Glib::wrap(plugin, true));
+ #ifdef GLIBMM_EXCEPTIONS_ENABLED
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ #endif //GLIBMM_EXCEPTIONS_ENABLED
+
+ delete the_slot;
+ return result;
+}
+
+namespace Gst
+{
+
+//TODO: Include if bug #545787 is accepted; remove if not.
+/*
+bool Plugin::register_static(int major_version, int minor_version,
+ const Glib::ustring& name, const Glib::ustring& description,
+ const SlotInit& init_slot, const Glib::ustring& version,
+ const Glib::ustring& license, const Glib::ustring& source,
+ const Glib::ustring& package, const Glib::ustring& origin)
+{
+ SlotInit* slot_copy = new SlotInit(init_slot);
+
+ return gst_plugin_register_static_full(major_version, minor_version,
+ name.c_str(), const_cast<char*>(description.c_str()),
+ &Plugin_Init_gstreamermm_callback, version.c_str(), license.c_str(),
+ source.c_str(), package.c_str(), origin.c_str(), slot_copy);
+}
+*/
+
+} //namespace Gst
Modified: gstreamermm/trunk/gstreamer/src/plugin.hg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/plugin.hg (original)
+++ gstreamermm/trunk/gstreamer/src/plugin.hg Fri Aug 1 03:53:23 2008
@@ -65,6 +65,13 @@
public:
/** For example,
+ * bool on_plugin_init(const Glib::RefPtr<Gst::Plugin>& plugin);.
+ * The init function should return true if plugin was initialized
+ * successfully, false otherwise.
+ */
+ typedef sigc::slot< bool, const Glib::RefPtr<Plugin>& > SlotInit;
+
+ /** For example,
* bool on_plugin_filter(const Glib::RefPtr<Gst::Plugin>& plugin);.
* The filter function should return true if plugin is a match, false
* otherwise.
@@ -96,6 +103,15 @@
#m4 _CONVERSION(`Glib::ListHandle< Glib::RefPtr<Plugin> >',`GList*',`($3).data()')
_WRAP_METHOD(static void free(Glib::ListHandle< Glib::RefPtr<Plugin> >), gst_plugin_list_free)
+//TODO: Include if bug #545787 is accepted; remove if not.
+/*
+ bool register_static(int major_version, int minor_version,
+ const Glib::ustring& name, const Glib::ustring& description,
+ const SlotInit& init_slot, const Glib::ustring& version,
+ const Glib::ustring& license, const Glib::ustring& source,
+ const Glib::ustring& package, const Glib::ustring& origin);
+*/
+
_IGNORE(gst_plugin_name_filter)
};
Modified: gstreamermm/trunk/gstreamer/src/task.hg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/task.hg (original)
+++ gstreamermm/trunk/gstreamer/src/task.hg Fri Aug 1 03:53:23 2008
@@ -89,8 +89,10 @@
_WRAP_METHOD(bool start(), gst_task_start)
_WRAP_METHOD(bool stop(), gst_task_stop)
-protected:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+private:
SlotTask* slot;
+#endif
};
} // namespace Gst
Modified: gstreamermm/trunk/gstreamerbase/gstreamerbasemm-0.10.pc.in
==============================================================================
--- gstreamermm/trunk/gstreamerbase/gstreamerbasemm-0.10.pc.in (original)
+++ gstreamermm/trunk/gstreamerbase/gstreamerbasemm-0.10.pc.in Fri Aug 1 03:53:23 2008
@@ -5,7 +5,7 @@
Name: gstreamerbasemm
Description: C++ wrapper for gstreamer-base-plugins module
-Requires: glibmm-2.4 gstreamer-plugins-base-0.10 gstreamer-interfaces-0.10
+Requires: glibmm-2.4 gstreamer-plugins-base-0.10 gstreamer-audio-0.10 gstreamer-interfaces-0.10
Version: @VERSION@
Libs: -L${libdir} -lgstreamerbasemm-0.10
Cflags: -I${includedir}/gstreamerbasemm-0.10 -I${libdir}/gstreamerbasemm-0.10/include
Modified: gstreamermm/trunk/gstreamerbase/src/Makefile_list_of_hg.am_fragment
==============================================================================
--- gstreamermm/trunk/gstreamerbase/src/Makefile_list_of_hg.am_fragment (original)
+++ gstreamermm/trunk/gstreamerbase/src/Makefile_list_of_hg.am_fragment Fri Aug 1 03:53:23 2008
@@ -6,6 +6,8 @@
files_win32_hg =
files_general_hg = colorbalance.hg colorbalancechannel.hg xoverlay.hg
+#TODO: Add audioclock.hg when bug #545782 is resolved.
+
files_general_deprecated_hg =
include $(top_srcdir)/build_shared/Makefile_build_gensrc.am_fragment
Added: gstreamermm/trunk/gstreamerbase/src/audioclock.ccg
==============================================================================
--- (empty file)
+++ gstreamermm/trunk/gstreamerbase/src/audioclock.ccg Fri Aug 1 03:53:23 2008
@@ -0,0 +1,62 @@
+// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+
+/* gstreamermm - a C++ wrapper for gstreamer
+ *
+ * Copyright 2008 The gstreamermm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gst/audio/gstaudioclock.h>
+
+_PINCLUDE(gstreamermm/private/systemclock_p.h)
+
+static GstClockTime AudioClock_GetTime_gstreamermm_callback(GstClock* clock, void* data)
+{
+ GstBase::AudioClock::SlotGetTime* the_slot = static_cast<GstBase::AudioClock::SlotGetTime*>(data);
+
+ #ifdef GLIBMM_EXCEPTIONS_ENABLED
+ try
+ {
+ #endif //GLIBMM_EXCEPTIONS_ENABLED
+ return (*the_slot)(Glib::wrap(clock, true));
+ #ifdef GLIBMM_EXCEPTIONS_ENABLED
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+
+ return 0; // arbitrary value
+ #endif //GLIBMM_EXCEPTIONS_ENABLED
+}
+
+namespace GstBase
+{
+
+AudioClock::AudioClock(const Glib::ustring& name, const SlotGetTime& time_slot)
+ : _CONSTRUCT("name", name.c_str())
+{
+ slot = new SlotGetTime(time_slot);
+ gst_audio_clock_construct(gobj(), &AudioClock_GetTime_gstreamermm_callback, (void*) &slot);
+}
+
+AudioClock::~AudioClock()
+{
+ delete slot;
+}
+
+} //namespace GstBase
+
Added: gstreamermm/trunk/gstreamerbase/src/audioclock.hg
==============================================================================
--- (empty file)
+++ gstreamermm/trunk/gstreamerbase/src/audioclock.hg Fri Aug 1 03:53:23 2008
@@ -0,0 +1,76 @@
+// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+
+/* gstreamermm - a C++ wrapper for gstreamer
+ *
+ * Copyright 2008 The gstreamermm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gstreamermm/systemclock.h>
+
+_DEFS(gstreamerbasemm,gstbase)
+
+namespace GstBase
+{
+
+/** GstBase::AudioClock â Helper object for implementing audio clocks.
+ * GstBase::AudioClock makes it easy for elements to implement a Gst::Clock,
+ * they simply need to provide a slot that returns the current clock time.
+ *
+ * This object is internally used to implement the clock in
+ * GstBase::BaseAudioSink.
+ *
+ * Last reviewed on 2006-09-27 (0.10.12).
+ */
+class AudioClock : public Gst::SystemClock
+{
+ _CLASS_GOBJECT(AudioClock, GstAudioClock, GST_AUDIO_CLOCK, Gst::SystemClock, GstSystemClock)
+ _CUSTOM_DTOR()
+
+public:
+ /** For example,
+ * Gst::ClockTime on_get_time(const Glib::RefPtr<Gst::Clock>& clock);.
+ * This function will be called whenever the current clock time needs to be
+ * calculated. If this function returns Gst::CLOCK_TIME_NONE, the last
+ * reported time will be returned by the clock.
+ *
+ * @param clock The GstBase::AudioClock.
+ */
+ typedef sigc::slot< Gst::ClockTime, const Glib::RefPtr<Gst::Clock>& > SlotGetTime;
+
+protected:
+ AudioClock(const Glib::ustring& name, const SlotGetTime& time_slot);
+
+public:
+ /** Create a new GstBase::AudioClock instance. Whenever the clock time should
+ * be calculated it will call @a time_slot. When @a time_slot returns
+ * Gst::CLOCK_TIME_NONE, the clock will return the last reported time.
+ *
+ * param name The name of the clock.
+ * param time_slot A slot that returns the time.
+ *
+ * @return a new GstBase::AudioClock.
+ */
+ _WRAP_CREATE(const Glib::ustring& name, const SlotGetTime& time_slot);
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+private:
+ SlotGetTime* slot;
+#endif
+};
+
+} // namespace GstBase
+
Modified: gstreamermm/trunk/tests/Makefile.am
==============================================================================
--- gstreamermm/trunk/tests/Makefile.am (original)
+++ gstreamermm/trunk/tests/Makefile.am Fri Aug 1 03:53:23 2008
@@ -1,7 +1,8 @@
INCLUDES= -I$(top_builddir)/gstreamer -I$(top_srcdir)/gstreamer \
-I$(top_builddir)/gstreamerbase -I$(top_srcdir)/gstreamerbase @GSTREAMERMM_CFLAGS@
-LDADD=$(top_builddir)/gstreamer/gstreamermm/libgstreamermm-0.10.la
+LDADD=$(top_builddir)/gstreamer/gstreamermm/libgstreamermm-0.10.la \
+ $(top_builddir)/gstreamerbase/gstreamerbasemm/libgstreamerbasemm-0.10.la
noinst_PROGRAMS = test-caps test-create-element test-pipeline-add-element \
test-link-elements test-create-bin test-miniobject-wrap \
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]