gnomemm r1583 - in gstreamermm/trunk: . gstreamer gstreamer/src tests tools/extra_defs_gen



Author: jaalburqu
Date: Tue Jun 24 00:37:49 2008
New Revision: 1583
URL: http://svn.gnome.org/viewvc/gnomemm?rev=1583&view=rev

Log:
2008-06-23  Josà Alburquerque  <jaalburqu svn gnome org>

	* configure.ac:
	* gstreamer/gstreamermm-0.10.pc.in: Added gstreamer-base-0.10 as
	dependency (to be able to wrap the Gstreamer Library elements --
	http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer-libs/html/).
	* gstreamer/gstreamermm.h:
	* gstreamer/src/Makefile_list_of_hg.am_fragment:
	* gstreamer/src/basesrc.ccg:
	* gstreamer/src/basesrc.hg: Added Gst::BaseSrc (still need to add rest
	of class docs). Added segment.hg (bug #518932 is in tarball release).
	* gstreamer/src/pad.ccg: Used *add_probe_full() methods to add data
	probes (bug #526814 is in tarball release).

	* gstreamer/src/gst_signals.defs:
	* tools/extra_defs_gen/generate_defs_gst.cc: Regenerated signals and
	properties with GstBasSrc included.

	* gstreamer/src/bin.hg: Typo.
	* tests/Makefile.am: Removed superflous lines at end.

Added:
   gstreamermm/trunk/gstreamer/src/basesrc.ccg
   gstreamermm/trunk/gstreamer/src/basesrc.hg
Modified:
   gstreamermm/trunk/ChangeLog
   gstreamermm/trunk/configure.ac
   gstreamermm/trunk/gstreamer/gstreamermm-0.10.pc.in
   gstreamermm/trunk/gstreamer/gstreamermm.h
   gstreamermm/trunk/gstreamer/src/Makefile_list_of_hg.am_fragment
   gstreamermm/trunk/gstreamer/src/bin.hg
   gstreamermm/trunk/gstreamer/src/gst_signals.defs
   gstreamermm/trunk/gstreamer/src/pad.ccg
   gstreamermm/trunk/tests/Makefile.am
   gstreamermm/trunk/tools/extra_defs_gen/generate_defs_gst.cc

Modified: gstreamermm/trunk/configure.ac
==============================================================================
--- gstreamermm/trunk/configure.ac	(original)
+++ gstreamermm/trunk/configure.ac	Tue Jun 24 00:37:49 2008
@@ -129,7 +129,7 @@
 gstreamermm_min_gtkmm_version=2.10
 gstreamermm_min_gst_version=0.10
 
-PKG_CHECK_MODULES(GSTREAMERMM, glibmm-2.4 >= ${gstreamermm_min_glibmm_version} gstreamer-0.10 >= ${gstreamermm_min_gst_version})
+PKG_CHECK_MODULES(GSTREAMERMM, glibmm-2.4 >= ${gstreamermm_min_glibmm_version} gstreamer-0.10 >= ${gstreamermm_min_gst_version} gstreamer-base-0.10 >= ${gstreamermm_min_gst_version})
 AC_SUBST(GSTREAMERMM_CFLAGS)
 AC_SUBST(GSTREAMERMM_LIBS)
 

Modified: gstreamermm/trunk/gstreamer/gstreamermm-0.10.pc.in
==============================================================================
--- gstreamermm/trunk/gstreamer/gstreamermm-0.10.pc.in	(original)
+++ gstreamermm/trunk/gstreamer/gstreamermm-0.10.pc.in	Tue Jun 24 00:37:49 2008
@@ -5,7 +5,7 @@
 
 Name: gstreamermm
 Description: C++ wrapper for GStreamer 
-Requires: glibmm-2.4 gstreamer-0.10 
+Requires: glibmm-2.4 gstreamer-0.10 gstreamer-base-0.10
 Version: @VERSION@
 Libs: -L${libdir} -lgstreamermm-0.10
 Cflags: -I${includedir}/gstreamermm-0.10 -I${libdir}/gstreamermm-0.10/include

Modified: gstreamermm/trunk/gstreamer/gstreamermm.h
==============================================================================
--- gstreamermm/trunk/gstreamer/gstreamermm.h	(original)
+++ gstreamermm/trunk/gstreamer/gstreamermm.h	Tue Jun 24 00:37:49 2008
@@ -1,6 +1,7 @@
 #ifndef _GSTREAMERMM_H_
 #define _GSTREAMERMM_H_
 
+#include <gstreamermm/basesrc.h>
 #include <gstreamermm/bin.h>
 #include <gstreamermm/buffer.h>
 #include <gstreamermm/bus.h>

Modified: gstreamermm/trunk/gstreamer/src/Makefile_list_of_hg.am_fragment
==============================================================================
--- gstreamermm/trunk/gstreamer/src/Makefile_list_of_hg.am_fragment	(original)
+++ gstreamermm/trunk/gstreamer/src/Makefile_list_of_hg.am_fragment	Tue Jun 24 00:37:49 2008
@@ -8,11 +8,9 @@
 	element.hg elementfactory.hg enums.hg error.hg event.hg filter.hg \
 	format.hg ghostpad.hg index.hg indexfactory.hg interface.hg \
 	iterator.hg message.hg pad.hg padtemplate.hg parse.hg pipeline.hg \
-	plugin.hg pluginfeature.hg query.hg registry.hg \
+	plugin.hg pluginfeature.hg query.hg registry.hg segment.hg \
 	structure.hg systemclock.hg tagsetter.hg task.hg urihandler.hg \
-	value.hg xml.hg
-
-#TODO: Add segment.hg when the fix from  bug #518932 is in a tarball (mid-June 2008). 
+	value.hg xml.hg basesrc.hg
 
 files_general_deprecated_hg =
 

Added: gstreamermm/trunk/gstreamer/src/basesrc.ccg
==============================================================================
--- (empty file)
+++ gstreamermm/trunk/gstreamer/src/basesrc.ccg	Tue Jun 24 00:37:49 2008
@@ -0,0 +1,30 @@
+// -*- 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/base/gstbasesrc.h>
+
+_PINCLUDE(glibmm/private/object_p.h)
+_PINCLUDE(gstreamermm/private/element_p.h)
+
+namespace Gst
+{
+} //namespace Gst
+

Added: gstreamermm/trunk/gstreamer/src/basesrc.hg
==============================================================================
--- (empty file)
+++ gstreamermm/trunk/gstreamer/src/basesrc.hg	Tue Jun 24 00:37:49 2008
@@ -0,0 +1,58 @@
+// -*- 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/element.h>
+#include <gstreamermm/pad.h>
+#include <gstreamermm/format.h>
+#include <gstreamermm/clock.h>
+
+_DEFS(gstreamermm,gst)
+
+namespace Gst
+{
+
+/** Gst::BaseSrc â Base class for getrange based source elements.
+ */
+class BaseSrc
+: public Element
+{
+  _CLASS_GOBJECT(BaseSrc, GstBaseSrc, GST_BASE_SRC, Element, GstElement)
+
+public:
+  _WRAP_METHOD(FlowReturn wait_playing(), gst_base_src_wait_playing)
+  _WRAP_METHOD(bool is_live(), gst_base_src_is_live)
+  _WRAP_METHOD(void set_live(bool live), gst_base_src_set_live)
+  _WRAP_METHOD(void set_format(Format format), gst_base_src_set_format)
+  _WRAP_METHOD(bool query_latency(bool& live, ClockTime& min_latency, ClockTime& max_latency), gst_base_src_query_latency)
+  _WRAP_METHOD(bool get_do_timestamp(), gst_base_src_get_do_timestamp)
+  _WRAP_METHOD(void set_do_timestamp(bool timestamp), gst_base_src_set_do_timestamp)
+
+  /** Gets the source Gst::Pad object of the element.
+   */
+  _MEMBER_GET(src_pad, srcpad, Glib::RefPtr<Pad>, GstPad*)
+
+  _WRAP_PROPERTY("blocksize", gulong)
+  _WRAP_PROPERTY("do-timestamp", bool)
+  _WRAP_PROPERTY("num-buffers", int)
+  _WRAP_PROPERTY("typefind", bool)
+};
+
+} //namespace Gst

Modified: gstreamermm/trunk/gstreamer/src/bin.hg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/bin.hg	(original)
+++ gstreamermm/trunk/gstreamer/src/bin.hg	Tue Jun 24 00:37:49 2008
@@ -96,7 +96,7 @@
  * application but is forwarded to the parent of the bin.
  *
  * - OTHERS - posted upwards.
-
+ *
  * A Gst::Bin implements the following default behaviour for answering to a
  * Gst::Query:
  *

Modified: gstreamermm/trunk/gstreamer/src/gst_signals.defs
==============================================================================
--- gstreamermm/trunk/gstreamer/src/gst_signals.defs	(original)
+++ gstreamermm/trunk/gstreamer/src/gst_signals.defs	Tue Jun 24 00:37:49 2008
@@ -14,6 +14,53 @@
 ;; The following signals must also be written out:
 ;; new-uri (GstURIHandler)
 
+;; From GstBaseSrc
+
+(define-property name
+  (of-object "GstBaseSrc")
+  (prop-type "GParamString")
+  (docs "The name of the object")
+  (readable #t)
+  (writable #t)
+  (construct-only #f)
+)
+
+(define-property blocksize
+  (of-object "GstBaseSrc")
+  (prop-type "GParamULong")
+  (docs "Size in bytes to read per buffer (0 = default)")
+  (readable #t)
+  (writable #t)
+  (construct-only #f)
+)
+
+(define-property num-buffers
+  (of-object "GstBaseSrc")
+  (prop-type "GParamInt")
+  (docs "Number of buffers to output before sending EOS")
+  (readable #t)
+  (writable #t)
+  (construct-only #f)
+)
+
+(define-property typefind
+  (of-object "GstBaseSrc")
+  (prop-type "GParamBoolean")
+  (docs "Run typefind before negotiating")
+  (readable #t)
+  (writable #t)
+  (construct-only #f)
+)
+
+(define-property do-timestamp
+  (of-object "GstBaseSrc")
+  (prop-type "GParamBoolean")
+  (docs "Apply current stream time to buffers")
+  (readable #t)
+  (writable #t)
+  (construct-only #f)
+)
+
 ;; From GstBus
 
 (define-signal sync-message

Modified: gstreamermm/trunk/gstreamer/src/pad.ccg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/pad.ccg	(original)
+++ gstreamermm/trunk/gstreamer/src/pad.ccg	Tue Jun 24 00:37:49 2008
@@ -179,27 +179,21 @@
 {
   SlotData* slot_copy = new SlotData(slot);
 
-  //TODO: Use this, when the new API from bug #526814 is in a tarball (mid-June 2008, probably):
-  //return gst_pad_add_data_probe_full(gobj(), G_CALLBACK (Pad_Data_gstreamermm_callback), slot_copy, &Pad_Data_gstreamermm_callback_disconnect);
-  return gst_pad_add_data_probe(gobj(), G_CALLBACK (Pad_Data_gstreamermm_callback), slot_copy);
+  return gst_pad_add_data_probe_full(gobj(), G_CALLBACK (Pad_Data_gstreamermm_callback), slot_copy, &Pad_Data_gstreamermm_callback_disconnect);
 }
 
 gulong Pad::add_buffer_probe(const SlotData& slot)
 {
   SlotData* slot_copy = new SlotData(slot);
 
-  //TODO: Use this, when the new API from bug #526814 is in a tarball (mid-June 2008, probably):
-  //return gst_pad_add_buffer_probe_full(gobj(), G_CALLBACK (Pad_Data_gstreamermm_callback), slot_copy, &Pad_Data_gstreamermm_callback_disconnect);
-  return gst_pad_add_buffer_probe(gobj(), G_CALLBACK (Pad_Data_gstreamermm_callback), slot_copy);
+  return gst_pad_add_buffer_probe_full(gobj(), G_CALLBACK (Pad_Data_gstreamermm_callback), slot_copy, &Pad_Data_gstreamermm_callback_disconnect);
 }
 
 gulong Pad::add_event_probe(const SlotData& slot)
 {
   SlotData* slot_copy = new SlotData(slot);
 
-  //TODO: Use this, when the new API from bug #526814 is in a tarball (mid-June 2008, probably):
-  //return gst_pad_add_event_probe_full(gobj(), G_CALLBACK (Pad_Data_gstreamermm_callback), slot_copy, &Pad_Data_gstreamermm_callback_disconnect);
-  return gst_pad_add_event_probe(gobj(), G_CALLBACK (Pad_Data_gstreamermm_callback), slot_copy);
+  return gst_pad_add_event_probe_full(gobj(), G_CALLBACK (Pad_Data_gstreamermm_callback), slot_copy, &Pad_Data_gstreamermm_callback_disconnect);
 }
 
 } //namespace Gst

Modified: gstreamermm/trunk/tests/Makefile.am
==============================================================================
--- gstreamermm/trunk/tests/Makefile.am	(original)
+++ gstreamermm/trunk/tests/Makefile.am	Tue Jun 24 00:37:49 2008
@@ -63,25 +63,3 @@
 
 test_init_check_SOURCES=test-init-check.cc
 test_init_check_LDFLAGS= GSTREAMERMM_LIBS@
-
-#runtestbasic runtestlangs \
-#runtestsearch runtestmimetypes \
-#runtestgetbuffer
-
-#runtestbasic_SOURCES=test-basic.cc
-#runtestbasic_LDFLAGS= GSTREAMERMM_LIBS@
-
-#runtestlangs_SOURCES=test-langs.cc
-#runtestlangs_LDFLAGS= GSTREAMERMM_LIBS@
-
-#runtestsearch_SOURCES=test-search.cc
-#runtestsearch_LDFLAGS= GSTREAMERMM_LIBS@
-
-#runtestmimetypes_SOURCES=test-mime-types.cc
-#runtestmimetypes_LDFLAGS= GSTREAMERMM_LIBS@
-
-#runtestgetbuffer_SOURCES=test-get-buffer.cc
-#runtestgetbuffer_LDFLAGS= GSTREAMERMM_LIBS@
-
-
-

Modified: gstreamermm/trunk/tools/extra_defs_gen/generate_defs_gst.cc
==============================================================================
--- gstreamermm/trunk/tools/extra_defs_gen/generate_defs_gst.cc	(original)
+++ gstreamermm/trunk/tools/extra_defs_gen/generate_defs_gst.cc	Tue Jun 24 00:37:49 2008
@@ -21,11 +21,13 @@
 
 #include <glib.h>
 #include <gst/gst.h>
+#include <gst/base/gstbasesrc.h>
 
 int main (int argc, char *argv[])
 {
   gst_init (&argc, &argv);
-  std::cout << get_defs(GST_TYPE_BUS)
+  std::cout << get_defs(GST_TYPE_BASE_SRC)
+            << get_defs(GST_TYPE_BUS)
             << get_defs(GST_TYPE_BIN)
             << get_defs(GST_TYPE_BUFFER)
             << get_defs(GST_TYPE_CAPS)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]