gnomemm r1988 - in gstreamermm/trunk: . gstreamer gstreamer/src tests



Author: jaalburqu
Date: Mon Jan 12 21:14:26 2009
New Revision: 1988
URL: http://svn.gnome.org/viewvc/gnomemm?rev=1988&view=rev

Log:
2009-01-12  Josà Alburquerque  <jaalburqu svn gnome org>

	* gstreamer/gstreamermm.h:
	* gstreamer/src/Makefile_list_of_hg.am_fragment:
	* gstreamer/src/ghostpad.ccg:
	* gstreamer/src/ghostpad.hg: Re-added ghostpad.hg (Bug #539108 has
	been resolved).
	* tests/Makefile.am: Re-added ghost pad test.

Modified:
   gstreamermm/trunk/ChangeLog
   gstreamermm/trunk/gstreamer/gstreamermm.h
   gstreamermm/trunk/gstreamer/src/Makefile_list_of_hg.am_fragment
   gstreamermm/trunk/gstreamer/src/ghostpad.ccg
   gstreamermm/trunk/gstreamer/src/ghostpad.hg
   gstreamermm/trunk/tests/Makefile.am

Modified: gstreamermm/trunk/gstreamer/gstreamermm.h
==============================================================================
--- gstreamermm/trunk/gstreamer/gstreamermm.h	(original)
+++ gstreamermm/trunk/gstreamer/gstreamermm.h	Mon Jan 12 21:14:26 2009
@@ -19,7 +19,7 @@
 #include <gstreamermm/event.h>
 #include <gstreamermm/filter.h>
 #include <gstreamermm/format.h>
-//TODO: #include <gstreamermm/ghostpad.h> (when bug #539108 is fixed)
+#include <gstreamermm/ghostpad.h>
 #include <gstreamermm/index.h>
 #include <gstreamermm/indexfactory.h>
 #include <gstreamermm/interface.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	Mon Jan 12 21:14:26 2009
@@ -6,8 +6,8 @@
 files_win32_hg =
 files_general_hg = bin.hg buffer.hg bus.hg caps.hg childproxy.hg clock.hg \
 	element.hg elementfactory.hg enums.hg error.hg event.hg filter.hg \
-	format.hg index.hg indexfactory.hg interface.hg iterator.hg \
-	message.hg pad.hg padtemplate.hg parse.hg pipeline.hg \
+	format.hg index.hg ghostpad.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 segment.hg \
 	structure.hg systemclock.hg taglist.hg tagsetter.hg task.hg \
 	urihandler.hg value.hg xml.hg \
@@ -17,8 +17,6 @@
    	colorbalance.hg colorbalancechannel.hg mixer.hg mixeroptions.hg \
 	mixertrack.hg navigation.hg xoverlay.hg
 
-#TODO: Add ghostpad.hg when bug #539108 is fixed (and patch in bug is applied)
-
 files_general_deprecated_hg =
 
 # To add a plugin, add the C++ class name (which must be the plugin name as

Modified: gstreamermm/trunk/gstreamer/src/ghostpad.ccg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/ghostpad.ccg	(original)
+++ gstreamermm/trunk/gstreamer/src/ghostpad.ccg	Mon Jan 12 21:14:26 2009
@@ -31,18 +31,24 @@
   : _CONSTRUCT("name", name.c_str(),
       "direction", (GstPadDirection) target->get_direction())
 {
-  if (!gst_ghost_pad_construct(gobj(), name.c_str(), target->gobj()))
+  if (!gst_ghost_pad_construct(gobj()) ||
+    !gst_ghost_pad_set_target(gobj(), target->gobj()))
+  {
     g_warning("Gst::GhostPad::GhostPad(const Glib::ustring&,"
-      " const Glib::RefPtr<Gst::Pad>&): Unsuccessful construction of ghost pad.");
+      " const Glib::RefPtr<Gst::Pad>&): "
+      "Unsuccessful construction of ghost pad (name = %s, target = %s).",
+      name.c_str(), target->get_name().c_str());
+  }
 }
 
 GhostPad::GhostPad(const Glib::ustring& name, PadDirection direction)
   : _CONSTRUCT("name", name.c_str(), "direction", (GstPadDirection) direction)
 {
-  if (!gst_ghost_pad_construct_no_target(gobj(), name.c_str(), (GstPadDirection) direction))
+  if (!gst_ghost_pad_construct(gobj()))
   {
     g_warning("Gst::GhostPad::GhostPad(const Glib::ustring&, PadDirection):"
-    " Unsuccessful construction of ghost pad.");
+    " Unsuccessful construction of ghost pad (name = %s, direction = %d).",
+    name.c_str(), direction);
   }
 }
 
@@ -51,11 +57,13 @@
     : _CONSTRUCT("name", name.c_str(), "direction",
         (GstPadDirection) target->get_direction(), "template", templ->gobj())
 {
-  if (!gst_ghost_pad_construct_from_template(gobj(), name.c_str(), target->gobj(), templ->gobj()))
+  if (!gst_ghost_pad_construct(gobj()) ||
+    !gst_ghost_pad_set_target(gobj(), target->gobj()))
   {
     g_warning("Gst::GhostPad::GhostPad(const Glib::ustring&,"
       " const Glib::RefPtr<Gst::Pad>&, const Glib::RefPtr<Gst::PadTemplate>&):"
-        " Unsuccessful construction of ghost pad.");
+        " Unsuccessful construction of ghost pad (name = %s, target = %s).",
+        name.c_str(), target->get_name().c_str());
   }
 }
 
@@ -63,11 +71,12 @@
     : _CONSTRUCT("name", name.c_str(), "direction", 
         (GstPadDirection) templ->get_direction(), "template", templ->gobj())
 {
-  if (!gst_ghost_pad_construct_no_target_from_template(gobj(), name.c_str(), templ->gobj()))
+  if (!gst_ghost_pad_construct(gobj()))
   {
     g_warning("Gst::GhostPad::GhostPad(const Glib::ustring&,"
-      " const Glib::RefPtr<Gst::PadTemplate>&): Unsuccessful construction of ghost"
-        " pad.");
+      " const Glib::RefPtr<Gst::PadTemplate>&): "
+      "Unsuccessful construction of ghost pad (name = %s, templ = %s).",
+      name.c_str(), templ->get_name().c_str());
   }
 }
 

Modified: gstreamermm/trunk/gstreamer/src/ghostpad.hg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/ghostpad.hg	(original)
+++ gstreamermm/trunk/gstreamer/src/ghostpad.hg	Mon Jan 12 21:14:26 2009
@@ -85,7 +85,7 @@
    * @param templ The Gst::PadTemplate to use on the ghostpad.
    * @return A new Gst::GhostPad, or an empty RefPtr in case of an error.
    */
-  _WRAP_CREATE(const Glib::ustring& name, const Glib::RefPtr<Pad>& target, const Glib::RefPtr<PadTemplate>& templ)
+  _WRAP_CREATE(const Glib::ustring& name, const Glib::RefPtr<Gst::Pad>& target, const Glib::RefPtr<Gst::PadTemplate>& templ)
 
   /** Create a new ghostpad based on @a templ, without setting a target. The
    * direction will be taken from @a templ.
@@ -94,12 +94,12 @@
    * @param templ The Gst::PadTemplate to create the ghostpad from.
    * @return A new Gst::GhostPad, or an empty RefPtr in case of an error.
    */
-  _WRAP_CREATE(const Glib::ustring& name, const Glib::RefPtr<PadTemplate>& templ)
+  _WRAP_CREATE(const Glib::ustring& name, const Glib::RefPtr<Gst::PadTemplate>& templ)
 
-  _WRAP_METHOD(bool set_target(const Glib::RefPtr<Pad>& newtarget), gst_ghost_pad_set_target)
+  _WRAP_METHOD(bool set_target(const Glib::RefPtr<Gst::Pad>& newtarget), gst_ghost_pad_set_target)
 
-  _WRAP_METHOD(Glib::RefPtr<Pad> get_target(), gst_ghost_pad_get_target)
-  _WRAP_METHOD(Glib::RefPtr<const Pad> get_target() const, gst_ghost_pad_get_target)
+  _WRAP_METHOD(Glib::RefPtr<Gst::Pad> get_target(), gst_ghost_pad_get_target)
+  _WRAP_METHOD(Glib::RefPtr<const Gst::Pad> get_target() const, gst_ghost_pad_get_target, constversion)
 };
 
 } // namespace Gst

Modified: gstreamermm/trunk/tests/Makefile.am
==============================================================================
--- gstreamermm/trunk/tests/Makefile.am	(original)
+++ gstreamermm/trunk/tests/Makefile.am	Mon Jan 12 21:14:26 2009
@@ -8,9 +8,9 @@
                   test-message-wrap test-event-wrap test-query-wrap \
 		  test-structure test-caps-structures test-interface \
 		  test-create-bus test-taglist test-tagsetter test-pad \
-		  test-init-check test-init test-init-check-noargs \
-		  test-init-noargs test-iterator test-property-caps \
-		  test-plugin-gen test-plugin-signals
+		  test-ghost-pad test-init-check test-init \
+		  test-init-check-noargs test-init-noargs test-iterator \
+		  test-property-caps test-plugin-gen test-plugin-signals
 
 #TODO: Add test-ghost-pad to tests when bug #539108 is fixed.
 
@@ -62,8 +62,8 @@
 test_pad_SOURCES=test-pad.cc
 test_pad_LDFLAGS= GSTREAMERMM_LIBS@
 
-#TODO: test_ghost_pad_SOURCES=test-ghost-pad.cc
-#TODO: test_ghost_pad_LDFLAGS= GSTREAMERMM_LIBS@
+test_ghost_pad_SOURCES=test-ghost-pad.cc
+test_ghost_pad_LDFLAGS= GSTREAMERMM_LIBS@
 
 test_init_check_SOURCES=test-init-check.cc
 test_init_check_LDFLAGS= GSTREAMERMM_LIBS@



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