[gstreamermm] support glib native types instead of GstClockTime, since cannot support both easily



commit b126d0a3c463f3c7c20490bae3b23600922f1f0b
Author: Tomasz Lakota <tomasz lakota flytronic pl>
Date:   Mon Apr 14 17:03:13 2014 +0200

    support glib native types instead of GstClockTime, since cannot support both easily
    
    Signed-off-by: Marcin Kolny <marcin kolny flytronic pl>

 gstreamer/src/structure.ccg |   12 +++++++++---
 gstreamer/src/structure.hg  |   13 +++++++++++--
 2 files changed, 20 insertions(+), 5 deletions(-)
---
diff --git a/gstreamer/src/structure.ccg b/gstreamer/src/structure.ccg
index ab07203..9f2b952 100644
--- a/gstreamer/src/structure.ccg
+++ b/gstreamer/src/structure.ccg
@@ -137,10 +137,16 @@ void Structure::set_field(const Glib::ustring& fieldname, const Glib::Date& valu
   gst_structure_set(gobj(), fieldname.c_str(), G_TYPE_DATE, value.gobj(), (void*)0);
 }
 
-void Structure::set_field(const Glib::ustring& fieldname, const ClockTime& value)
+void Structure::set_field(const Glib::ustring& fieldname, gint64 value)
 {
-  gst_structure_set(gobj(), fieldname.c_str(), GST_TYPE_CLOCK_TIME,
-    (GstClockTime) value, (void*)0);
+  gst_structure_set(gobj(), fieldname.c_str(), G_TYPE_INT64,
+    (gint64) value, (void*)0);
+}
+
+void Structure::set_field(const Glib::ustring& fieldname, guint64 value)
+{
+  gst_structure_set(gobj(), fieldname.c_str(), G_TYPE_INT64,
+    (guint64) value, (void*)0);
 }
 
 void Structure::set_field(const Glib::ustring& fieldname, GType enumtype, int value)
diff --git a/gstreamer/src/structure.hg b/gstreamer/src/structure.hg
index 33ee170..240fc40 100644
--- a/gstreamer/src/structure.hg
+++ b/gstreamer/src/structure.hg
@@ -170,14 +170,23 @@ public:
    */
   void set_field(const Glib::ustring& fieldname, const Glib::Date& value);
 
-  /** Sets the field with name @a fieldname to the Gst::ClockTime @a value. If
+  /** Sets the field with name @a fieldname to the @a value. If
    * the field does not exist, it is created. If the field exists, the previous
    * value is replaced and freed.
    *
    * @param fieldname The name of the field to set.
    * @param value The value to set the field to.
    */
-  void set_field(const Glib::ustring& fieldname, const ClockTime& value);
+  void set_field(const Glib::ustring& fieldname, guint64 value);
+
+  /** Sets the field with name @a fieldname to the @a value. If
+   * the field does not exist, it is created. If the field exists, the previous
+   * value is replaced and freed.
+   *
+   * @param fieldname The name of the field to set.
+   * @param value The value to set the field to.
+   */
+  void set_field(const Glib::ustring& fieldname, gint64 value);
 
   /** Sets the field with name @a fieldname to the value @a value of the enum
    * type @a enum_type. If the field does not exist, it is created. If the


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