[gstreamermm] Wrap missing methods



commit 1efb7b6f00b6cbb74e763a25cd2bff9a829ccf6b
Author: Marcin Kolny <marcin kolny gmail com>
Date:   Wed Sep 14 23:33:16 2016 +0200

    Wrap missing methods

 gstreamer/src/audioinfo.hg    |    7 +++++++
 gstreamer/src/gst_vfuncs.defs |   23 +++++++++++++++++------
 gstreamer/src/sample.ccg      |   10 ++--------
 gstreamer/src/sample.hg       |    8 +++++++-
 gstreamer/src/structure.hg    |    1 +
 gstreamer/src/valuelist.hg    |   28 ++++++++++++++++++++++------
 gstreamer/src/videoinfo.hg    |    9 ++++++++-
 gstreamer/src/videooverlay.hg |   10 +++++++++-
 tools/m4/convert_gst.m4       |    7 ++-----
 9 files changed, 75 insertions(+), 28 deletions(-)
---
diff --git a/gstreamer/src/audioinfo.hg b/gstreamer/src/audioinfo.hg
index 200275b..2d5544e 100644
--- a/gstreamer/src/audioinfo.hg
+++ b/gstreamer/src/audioinfo.hg
@@ -19,6 +19,7 @@
 
 #include <gst/audio/audio-info.h>
 #include <gstreamermm/audioformat.h>
+#include <gstreamermm/audioringbuffer.h>
 
 _DEFS(gstreamermm,gst)
 
@@ -38,6 +39,7 @@ class Caps;
 class AudioInfo
 {
   _CLASS_BOXEDTYPE(AudioInfo, GstAudioInfo, gst_audio_info_new, gst_audio_info_copy, gst_audio_info_free)
+  _IGNORE(gst_audio_info_copy, gst_audio_info_free)
 public:
 
   /** Create AudioInfo from @a caps.
@@ -55,6 +57,11 @@ public:
   _WRAP_METHOD(bool from_caps(const Glib::RefPtr<const Gst::Caps>& caps), gst_audio_info_from_caps)
   _WRAP_METHOD(Glib::RefPtr<Gst::Caps> to_caps() const, gst_audio_info_to_caps)
 
+  _WRAP_METHOD(bool convert(Gst::Format fmt, gint64 src_val, Gst::Format dest_fmt, gint64& dest_val) const, 
gst_audio_info_convert, newin "1,8")
+
+#m4 _CONVERSION(`const Gst::AudioChannelPosition*',`const GstAudioChannelPosition*',`reinterpret_cast<const 
GstAudioChannelPosition*>($3)')
+  _WRAP_METHOD(void set_format(Gst::AudioFormat format, int rate, int channels, const 
Gst::AudioChannelPosition *position), gst_audio_info_set_format, newin "1,8")
+
   _MEMBER_GET(flags, flags, Gst::AudioFlags, GstAudioFlags)
   _MEMBER_SET(flags, flags, Gst::AudioFlags, GstAudioFlags)
 
diff --git a/gstreamer/src/gst_vfuncs.defs b/gstreamer/src/gst_vfuncs.defs
index 09633c6..9d6b17f 100644
--- a/gstreamer/src/gst_vfuncs.defs
+++ b/gstreamer/src/gst_vfuncs.defs
@@ -1424,25 +1424,36 @@
   )
 )
 
-; GstXOverlay
+; GstVideoOverlay
 
-(define-vfunc set_xwindow_id
-  (of-object "GstXOverlay")
+(define-vfunc set_window_handle
+  (of-object "GstVideoOverlay")
   (return-type "void")
   (parameters
-   '("gulong" "xwindow_id")
+   '("guintptr" "handle")
   )
 )
 
 (define-vfunc expose
-  (of-object "GstXOverlay")
+  (of-object "GstVideoOverlay")
   (return-type "void")
 )
 
 (define-vfunc handle_events
-  (of-object "GstXOverlay")
+  (of-object "GstVideoOverlay")
   (return-type "void")
   (parameters
    '("gboolean" "handle_events")
   )
 )
+
+(define-vfunc set_render_rectangle
+  (of-object "GstVideoOverlay")
+  (return-type "void")
+  (parameters
+   '("gint" "x")
+   '("gint" "y")
+   '("gint" "width")
+   '("gint" "height")
+  )
+)
diff --git a/gstreamer/src/sample.ccg b/gstreamer/src/sample.ccg
index 20ee67c..8255c30 100644
--- a/gstreamer/src/sample.ccg
+++ b/gstreamer/src/sample.ccg
@@ -1,12 +1,6 @@
-/*
- * sample.ccg
- *
- *  Created on: Jul 30, 2013
- *      Author: m.kolny
- */
 /* gstreamermm - a C++ wrapper for gstreamer
  *
- * Copyright 2008 The gstreamermm Development Team
+ * Copyright 2008-2016 The gstreamermm Development Team
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -33,4 +27,4 @@ Glib::RefPtr<Gst::Sample> Sample::create(const Glib::RefPtr<Gst::Buffer>& buffer
 
   return Glib::wrap(sample, false);
 }
-}
\ No newline at end of file
+}
diff --git a/gstreamer/src/sample.hg b/gstreamer/src/sample.hg
index 0b71128..e19d132 100644
--- a/gstreamer/src/sample.hg
+++ b/gstreamer/src/sample.hg
@@ -6,7 +6,7 @@
  */
 /* gstreamermm - a C++ wrapper for gstreamer
  *
- * Copyright 2008 The gstreamermm Development Team
+ * Copyright 2008-2016 The gstreamermm Development Team
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -39,6 +39,8 @@ namespace Gst
 /**
  * A Gst::Sample is a small object containing data, a type, timing and
  * extra arbitrary information.
+ *
+ * Last reviewed on 2016-09-14 (1.8.0).
  */
 class Sample : public MiniObject
 {
@@ -52,7 +54,11 @@ public:
   _WRAP_METHOD(Glib::RefPtr<const Gst::Buffer> get_buffer() const, gst_sample_get_buffer, constversion)
   _WRAP_METHOD(Glib::RefPtr<Gst::Caps> get_caps(), gst_sample_get_caps, refreturn)
   _WRAP_METHOD(Glib::RefPtr<const Gst::Caps> get_caps() const, gst_sample_get_caps, constversion)
+  _WRAP_METHOD(Gst::Structure get_info() const, gst_sample_get_info)
+  _WRAP_METHOD(Glib::RefPtr<Gst::Sample> copy() const, gst_sample_copy)
 
+#m4 _CONVERSION(`GstSegment*',`Gst::Segment',`Glib::wrap($3, true)')
+  _WRAP_METHOD(Gst::Segment get_segment() const, gst_sample_get_segment)
 };
 
 }//namespace Gst
diff --git a/gstreamer/src/structure.hg b/gstreamer/src/structure.hg
index df96c7f..49eb5f1 100644
--- a/gstreamer/src/structure.hg
+++ b/gstreamer/src/structure.hg
@@ -116,6 +116,7 @@ public:
   _WRAP_METHOD(bool is_subset(const Gst::Structure& superset) const, gst_structure_is_subset)
   _WRAP_METHOD(bool can_intersect(const Gst::Structure& struct2) const, gst_structure_can_intersect)
   _WRAP_METHOD(void fixate(), gst_structure_fixate)
+  _WRAP_METHOD(bool get_flagset(const Glib::ustring& fieldname, guint& value_flags, guint& value_mask) 
const, gst_structure_get_flagset)
 
   _WRAP_METHOD(bool has_field(const Glib::ustring& fieldname) const, gst_structure_has_field)
   _IGNORE(gst_structure_id_has_field)
diff --git a/gstreamer/src/valuelist.hg b/gstreamer/src/valuelist.hg
index 9d99721..82eb897 100644
--- a/gstreamer/src/valuelist.hg
+++ b/gstreamer/src/valuelist.hg
@@ -29,9 +29,7 @@ namespace Gst
 
 class ValueList : public Glib::ValueBase
 {
-
 public:
-
   /** Default constructor.
    */
   ValueList();
@@ -42,16 +40,34 @@ public:
 
 public:
 
-  _WRAP_METHOD_DOCS_ONLY(gst_value_list_get_size)
+  /** Gets the number of values contained in @a value.
+   *
+   * @param value A Value of type Gst::TYPE_LIST.
+   * @return The number of values.
+   */
   guint size() const;
   
-  _WRAP_METHOD_DOCS_ONLY(gst_value_list_get_value)
+  /** Gets the value that is a member of the list contained in @a value and
+   * has the index @a index.
+   *
+   * @param value A Value of type Gst::TYPE_LIST.
+   * @param index Index of value to get from the list.
+   * @return The value at the given index.
+   */
   bool get(guint index, Glib::ValueBase& value) const;
 
-  _WRAP_METHOD_DOCS_ONLY(gst_value_list_append)
+  /** Appends @a append_value to the GstValueList in @a value.
+   *
+   * @param value A Value of type Gst::TYPE_LIST.
+   * @param append_value The value to append.
+   */
   Gst::ValueList& append(const Glib::ValueBase& value);
 
-  _WRAP_METHOD_DOCS_ONLY(gst_value_list_prepend)
+  /** Prepends @a prepend_value to the GstValueList in @a value.
+   *
+   * @param value A Value of type Gst::TYPE_LIST.
+   * @param prepend_value The value to prepend.
+   */
   Gst::ValueList& prepend(const Glib::ValueBase& value);
 
 };
diff --git a/gstreamer/src/videoinfo.hg b/gstreamer/src/videoinfo.hg
index b102bfc..5519f3a 100644
--- a/gstreamer/src/videoinfo.hg
+++ b/gstreamer/src/videoinfo.hg
@@ -1,6 +1,6 @@
 /* gstreamermm - a C++ wrapper for gstreamer
  *
- * Copyright 2008-2015 The gstreamermm Development Team
+ * Copyright 2008-2016 The gstreamermm Development Team
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -34,6 +34,13 @@ namespace Gst
   _WRAP_ENUM(VideoMultiviewFlags, GstVideoMultiviewFlags)
   _WRAP_ENUM(VideoFlags, GstVideoFlags)
 
+/** Information describing image properties. This information can be filled
+ * in from Gst::Caps with from_caps(). The information is also used
+ * to store the specific video info when mapping a video frame with
+ * VideoFrame::map().
+ *
+ * Last reviewed on 2016-09-14 (1.8.0).
+ */
 class VideoInfo
 {
   _CLASS_GENERIC(VideoInfo, GstVideoInfo)
diff --git a/gstreamer/src/videooverlay.hg b/gstreamer/src/videooverlay.hg
index b2d1376..f4a00d3 100644
--- a/gstreamer/src/videooverlay.hg
+++ b/gstreamer/src/videooverlay.hg
@@ -97,7 +97,7 @@ namespace Gst
  */
 class VideoOverlay : public Glib::Interface
 {
-  _CLASS_INTERFACE(VideoOverlay, GstVideoOverlay, GST_VIDEO_OVERLAY, GstVideoOverlayClass)
+  _CLASS_INTERFACE(VideoOverlay, GstVideoOverlay, GST_VIDEO_OVERLAY, GstVideoOverlayInterface)
 
 public:
   _WRAP_METHOD(void set_window_handle(guintptr window_handle), gst_video_overlay_set_window_handle)
@@ -107,6 +107,9 @@ public:
   _WRAP_METHOD(void handle_events(bool handle_events), gst_video_overlay_handle_events)
   _WRAP_METHOD(bool set_render_rectangle(int x, int y, int width, int height), 
gst_video_overlay_set_render_rectangle)
 
+  /** Virtual method to configure the window handle.
+   */
+  _WRAP_VFUNC(void set_window_handle(guintptr handle), "set_window_handle")
 
   /** Virtual method to handle expose events.
    */
@@ -115,6 +118,11 @@ public:
   /** Virtual method to handle events.
    */
   _WRAP_VFUNC(void handle_events(bool handle_events), "handle_events")
+
+  /** Virtual method to set the render rectangle.
+   */
+  _WRAP_VFUNC(void set_render_rectangle(int x, int y, int width, int height), "set_render_rectangle")
+
 };
 
 } // namespace Gst
diff --git a/tools/m4/convert_gst.m4 b/tools/m4/convert_gst.m4
index 4c7a1ce..fa296ed 100644
--- a/tools/m4/convert_gst.m4
+++ b/tools/m4/convert_gst.m4
@@ -301,10 +301,7 @@ _CONVERSION(`const Glib::RefPtr<Gst::Sample>&',`GstSample*', `Glib::unwrap($3)')
 _CONVERSION(`Glib::RefPtr<Gst::Sample>', `GstSample*', `Glib::unwrap($3)')
 
 dnl Segment
-_CONVERSION(`GstSegment*',`Glib::RefPtr<Gst::Segment>',`Glib::wrap($3)')
-_CONVERSION(`GstSegment*',`Glib::RefPtr<const Gst::Segment>',`Glib::wrap($3)')
-_CONVERSION(`const GstSegment*',`Glib::RefPtr<const Gst::Segment>',`Glib::wrap(const_cast<GstSegment*>($3))'
-_CONVERSION(`const Glib::RefPtr<Gst::Segment>&',`GstSegment*', `Glib::unwrap($3)')
+_CONVERSION(`GstSegment*',`Gst::Segment',`Glib::wrap($3)')
 _CONVERSION(`const Gst::Segment&',`const GstSegment*', `$3.gobj()')
 
 dnl Structure
@@ -312,7 +309,7 @@ _CONVERSION(`Gst::Structure&',`GstStructure*',`$3.gobj()')
 _CONVERSION(`const Gst::Structure&',`GstStructure*',`const_cast<GstStructure*>($3.gobj())')
 _CONVERSION(`GstStructure*', `Gst::Structure', `Glib::wrap($3)')
 _CONVERSION(`const Gst::Structure&',`const GstStructure*',`$3.gobj()')
-_CONVERSION(`const GstStructure*',`Gst::Structure', `Glib::wrap($3, false)')
+_CONVERSION(`const GstStructure*',`Gst::Structure', `Glib::wrap(const_cast<GstStructure*>($3), false)')
 _CONVERSION(`const GstStructure*',`const Gst::Structure&', `Glib::wrap(const_cast<GstStructure*>($3), 
false)')
 _CONVERSION(`Gst::Structure&&',`GstStructure*',`($3) ? $3.release() : nullptr')
 


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