[gstreamermm: 136/167] allowed to build chain of parameters



commit dadf8a4a870b106d674059d681f7f9169220b6fd
Author: Marcin Kolny [loganek] <marcin kolny gmail com>
Date:   Mon Aug 5 20:29:25 2013 +0200

    allowed to build chain of parameters

 gstreamer/src/element.hg |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/gstreamer/src/element.hg b/gstreamer/src/element.hg
index 8db2f53..582afe0 100644
--- a/gstreamer/src/element.hg
+++ b/gstreamer/src/element.hg
@@ -388,6 +388,17 @@ public:
 
   Glib::RefPtr<Gst::PadTemplate> get_pad_template(const Glib::ustring &factory_name) const;
 
+  /**
+   * Sets specified property. Allows to create property-chain
+   * (e.g. element->property("location", "test.ogg")->property("num_buffers", 20);
+   */
+  template<typename T>
+  Glib::RefPtr<Gst::Element> property(const Glib::ustring& name, const T& value)
+  {
+      set_property(name, value);
+      return Glib::RefPtr<Gst::Element>(*this);
+  }
+
 protected:
 #m4begin
   _PUSH(SECTION_PCC_CLASS_INIT_VFUNCS)


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