[gstreamermm: 56/167] structure class repaired



commit 6491e2cea7899b67fc66f005435922cac5ad4522
Author: Marcin Kolny at Flytronic <marcin kolny flytronic pl>
Date:   Fri Jul 26 14:22:37 2013 +0200

    structure class repaired

 gstreamer/src/structure.ccg |   21 ++-------------------
 gstreamer/src/structure.hg  |   26 --------------------------
 2 files changed, 2 insertions(+), 45 deletions(-)
---
diff --git a/gstreamer/src/structure.ccg b/gstreamer/src/structure.ccg
index 1a939b9..ab07203 100644
--- a/gstreamer/src/structure.ccg
+++ b/gstreamer/src/structure.ccg
@@ -81,7 +81,7 @@ namespace Gst
 
 Structure::Structure(const Glib::ustring& name)
 {
-  gobject_ = gst_structure_empty_new(name.c_str());
+  gobject_ = gst_structure_new_empty(name.c_str());
 }
 
 Structure::operator bool() const
@@ -115,12 +115,6 @@ void Structure::set_field(const Glib::ustring& fieldname, guint value)
   gst_structure_set(gobj(), fieldname.c_str(), G_TYPE_UINT, value, (void*)0);
 }
 
-void Structure::set_field(const Glib::ustring& fieldname, const Fourcc& value)
-{
-  gst_structure_set(gobj(), fieldname.c_str(), GST_TYPE_FOURCC,
-    value.get_fourcc(), (void*)0);
-}
-
 void Structure::set_field(const Glib::ustring& fieldname, double value)
 {
   gst_structure_set(gobj(), fieldname.c_str(), G_TYPE_DOUBLE, value, (void*)0);
@@ -140,7 +134,7 @@ void Structure::set_field(const Glib::ustring& fieldname, const char* value)
  
 void Structure::set_field(const Glib::ustring& fieldname, const Glib::Date& value)
 {
-  gst_structure_set(gobj(), fieldname.c_str(), GST_TYPE_DATE, value.gobj(), (void*)0);
+  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)
@@ -201,17 +195,6 @@ bool Structure::get_field(const Glib::ustring& name, guint& value) const
   return gst_structure_get_uint(gobj(), name.c_str(), &value);
 }
 
-bool Structure::get_field(const Glib::ustring& name, Fourcc& value) const
-{
-  guint32 cvalue = 0;
-  const bool result = gst_structure_get_fourcc(gobj(), name.c_str(), &cvalue);
-  if(result)
-    value = Fourcc(cvalue);
-
-  return result;
-}
-
-
 bool Structure::get_field(const Glib::ustring& name, double& value) const
 {
   return gst_structure_get_double(gobj(), name.c_str(), &value);
diff --git a/gstreamer/src/structure.hg b/gstreamer/src/structure.hg
index 9308cae..b06c214 100644
--- a/gstreamer/src/structure.hg
+++ b/gstreamer/src/structure.hg
@@ -128,19 +128,6 @@ public:
    */
   void set_field(const Glib::ustring& fieldname, guint value);
 
-  /** Sets the field with name @a fieldname to the Gst::Fourcc @a value. If
-   * the field does not exist, it is created. If the field exists, the previous
-   * value is replaced and freed. Please note that when setting fields to
-   * special gstreamermm types such as Gst::Fourcc and Gst::Fraction and
-   * Glib::Date they are converted to the GStreamer GTypes and thus when
-   * attempting to get these fields back as GValues, they will have the
-   * GStreamer GType.
-   *
-   * @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 Fourcc& value);
-
   /** Sets the field with name @a fieldname to the double @a value. If the
    * field does not exist, it is created. If the field exists, the previous
    * value is replaced and freed.
@@ -337,19 +324,6 @@ public:
   bool get_field(const Glib::ustring& fieldname, guint& value) const;
   _IGNORE(gst_structure_get_uint)
 
-  /** Gets the value of field @a fieldname into Gst::Fourcc @a value.
-   * The caller is responsible for making sure the field exists and has the
-   * correct type.
-   *
-   * @param fieldname The name of a field.
-   * @param value An output parameter that will be set with the value.
-   * @return true if @a value could be set correctly. If there was no field
-   * with @a fieldname or the existing field did not contain a Gst::Fourcc,
-   * this function returns false.
-   */
-  bool get_field(const Glib::ustring& fieldname, Fourcc& value) const;
-  _IGNORE(gst_structure_get_fourcc)
-
   /** Gets the value of field @a fieldname into double @a value.
    * The caller is responsible for making sure the field exists and has the
    * correct type.


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