[gstreamermm] Gst::Caps: fixed truncate method
- From: Marcin Kolny <mkolny src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gstreamermm] Gst::Caps: fixed truncate method
- Date: Thu, 27 Nov 2014 12:57:03 +0000 (UTC)
commit b6fb4b9da227ad5d1a5e6a8b0e8690a85b5f4235
Author: Marcin Kolny <marcin kolny flytronic pl>
Date: Thu Nov 27 13:34:32 2014 +0100
Gst::Caps: fixed truncate method
* gstreamer/src/caps.{ccg|hg}: truncate method takes as a first
argument object instance which is transfer-full parameter. We need
to do increase reference to avoid gobject errors.
gstreamer/src/caps.ccg | 5 +++++
gstreamer/src/caps.hg | 9 ++++++++-
2 files changed, 13 insertions(+), 1 deletions(-)
---
diff --git a/gstreamer/src/caps.ccg b/gstreamer/src/caps.ccg
index 9ba242c..7c65d95 100644
--- a/gstreamer/src/caps.ccg
+++ b/gstreamer/src/caps.ccg
@@ -156,5 +156,10 @@ void Caps::set_features(guint index, const CapsFeatures& features)
gst_caps_set_features(gobj(), index, copy);
}
+Glib::RefPtr<Gst::Caps> Caps::truncate()
+{
+ reference();
+ return Glib::wrap(gst_caps_truncate(gobj()));
+}
} //namespace Gst
diff --git a/gstreamer/src/caps.hg b/gstreamer/src/caps.hg
index 5acdb5c..3a9a367 100644
--- a/gstreamer/src/caps.hg
+++ b/gstreamer/src/caps.hg
@@ -244,7 +244,14 @@ public:
* @return A buffer (possibly the same pointer) that is writable.
*/
Glib::RefPtr<Gst::Caps> create_writable();
- _WRAP_METHOD(Glib::RefPtr<Gst::Caps> truncate(), gst_caps_truncate)
+
+ /** Discard all but the first structure from @a caps. Useful when
+ * fixating.
+ *
+ * @return Truncated caps.
+ */
+ Glib::RefPtr<Gst::Caps> truncate();
+ _IGNORE(gst_caps_truncate)
/**
* Finds the features in caps that has the index index , and returns it.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]