[gstreamermm] VideoSink: Wrap center_rect() method.



commit 6517c6eaaac3ed0e6fbc49a2462c14dd053039a7
Author: José Alburquerque <jaalburqu svn gnome org>
Date:   Mon Dec 7 15:34:36 2009 -0500

    	VideoSink: Wrap center_rect() method.
    
    	* gstreamer/src/videosink.hg (center_rect): Wrap static method.
    	(propery_show_preroll_frame): Wrap property.
    	* gstreamer/src/cddabasesrc.ccg (probe_devices_vfunc): Use
    	Glib::OWNERSHIP_NONE in virtual function when constructing the
    	ArrayHandle<> so that the underlying data is not deleted with the
    	resulting ArrayHandle.
    	* gstreamer/src/childproxy.ccg: Typo.

 ChangeLog                     |   12 ++++++++++++
 gstreamer/src/cddabasesrc.ccg |    2 +-
 gstreamer/src/childproxy.ccg  |    2 +-
 gstreamer/src/videosink.hg    |   24 +++++++++++++++++++++++-
 4 files changed, 37 insertions(+), 3 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 0dd287f..087c167 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2009-12-07  José Alburquerque  <jaalburqu svn gnome org>
+
+	VideoSink: Wrap center_rect() method.
+
+	* gstreamer/src/videosink.hg (center_rect): Wrap static method.
+	(propery_show_preroll_frame): Wrap property.
+	* gstreamer/src/cddabasesrc.ccg (probe_devices_vfunc): Use
+	Glib::OWNERSHIP_NONE in virtual function when constructing the
+	ArrayHandle<> so that the underlying data is not deleted with the
+	resulting ArrayHandle.
+	* gstreamer/src/childproxy.ccg: Typo.
+
 2009-12-04  José Alburquerque  <jaalburqu svn gnome org>
 
 	CddaBaseSrc: Wrap virtual functions.
diff --git a/gstreamer/src/cddabasesrc.ccg b/gstreamer/src/cddabasesrc.ccg
index 7fd9c06..795175b 100644
--- a/gstreamer/src/cddabasesrc.ccg
+++ b/gstreamer/src/cddabasesrc.ccg
@@ -147,7 +147,7 @@ Glib::ArrayHandle<std::string> Gst::CddaBaseSrc::probe_devices_vfunc()
   );
 
   if(base && base->probe_devices)
-    return Glib::ArrayHandle<std::string>((*base->probe_devices)(gobj()), Glib::OWNERSHIP_DEEP);
+    return Glib::ArrayHandle<std::string>((*base->probe_devices)(gobj()), Glib::OWNERSHIP_NONE);
 
   typedef Glib::ArrayHandle<std::string> RType;
   return RType(0, Glib::OWNERSHIP_NONE);
diff --git a/gstreamer/src/childproxy.ccg b/gstreamer/src/childproxy.ccg
index c6b3722..fb5df2d 100644
--- a/gstreamer/src/childproxy.ccg
+++ b/gstreamer/src/childproxy.ccg
@@ -26,7 +26,7 @@ bool ChildProxy::lookup(const Glib::RefPtr<Gst::Object>& object,
 {
   GstObject* gst_object = 0;
   bool const result = gst_child_proxy_lookup(Glib::unwrap(object),
-    name.c_str(), &gst_object, & pspec);
+    name.c_str(), &gst_object, &pspec);
   target = Glib::wrap(gst_object);
   return result;
 }
diff --git a/gstreamer/src/videosink.hg b/gstreamer/src/videosink.hg
index 69f6530..f226de5 100644
--- a/gstreamer/src/videosink.hg
+++ b/gstreamer/src/videosink.hg
@@ -24,6 +24,24 @@ _DEFS(gstreamermm,gst)
 namespace Gst
 {
 
+/** Helper structure for the Gst::VideoSink class representing a rectangular
+ * area.
+ */
+struct VideoRectangle
+{
+  /// The X coordinate of the rectangle's top-left point.
+  int x;
+
+  /// The Y coordinate of rectangle's top-left point.
+  int y;
+
+  /// The width of the rectangle.
+  int w;
+
+  /// The height of the rectangle.
+  int h;
+};
+
 /** Gst::VideoSink - Base class for video sinks.
  * Provides useful functions and a base class for video sinks.
  *
@@ -46,7 +64,11 @@ public:
    */
   _MEMBER_GET(width, width, int, gint)
 
-  //TODO: _WRAP_METHOD(void center_rect(...), gst_video_sink_center_rect)
+#m4 _CONVERSION(`const Gst::VideoRectangle&', `GstVideoRectangle', `reinterpret_cast<const $2&>($3)')
+#m4 _CONVERSION(`Gst::VideoRectangle&', `GstVideoRectangle*', `reinterpret_cast<GstVideoRectangle*>(&$3)')
+  _WRAP_METHOD(static void center_rect(const Gst::VideoRectangle& src, const Gst::VideoRectangle& dst, Gst::VideoRectangle& result, bool scaling = false), gst_video_sink_center_rect)
+
+  _WRAP_PROPERTY("show-preroll-frame", bool)
 };
 
 } // namespace Gst



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