[gstreamermm: 19/167] fixed buffer, bin, iterator



commit 0f1ba9250a03307ec6d5b9001ab55227be2b747d
Author: Marcin Kolny at Flytronic <marcin kolny flytronic pl>
Date:   Wed Jul 24 16:32:26 2013 +0200

    fixed buffer, bin, iterator

 gstreamer/src/bin.ccg     |    2 +-
 gstreamer/src/bin.hg      |    2 +-
 gstreamer/src/buffer.hg   |   27 +++------------------------
 gstreamer/src/iterator.hg |    4 ++--
 tools/m4/convert_gst.m4   |    4 ++--
 5 files changed, 9 insertions(+), 30 deletions(-)
---
diff --git a/gstreamer/src/bin.ccg b/gstreamer/src/bin.ccg
index 5397548..b01ad71 100644
--- a/gstreamer/src/bin.ccg
+++ b/gstreamer/src/bin.ccg
@@ -47,7 +47,7 @@ Glib::RefPtr<Gst::Bin> Bin::add(const Glib::RefPtr<Gst::Element>& element)
   // bin and GStreamer complains about it.  The extra reference to the element
   // is removed when the bin is destroyed or when the element is removed from
   // the bin (see gst_bin_remove).
-  if(G_LIKELY(GST_OBJECT_IS_FLOATING(celement)))
+  if(G_LIKELY(g_object_is_floating(celement)))
     element->reference();
 
   const bool result = gst_bin_add(gobj(), celement);
diff --git a/gstreamer/src/bin.hg b/gstreamer/src/bin.hg
index 72ca951..a0d5de5 100644
--- a/gstreamer/src/bin.hg
+++ b/gstreamer/src/bin.hg
@@ -252,7 +252,7 @@ public:
    */
   _WRAP_VFUNC(bool remove_element(const Glib::RefPtr<Gst::Element>& element), "remove_element")
 
-#m4 _CONVERSION(`GstMessage*',`const Glib::RefPtr<Gst::Message>&',`Gst::Message::wrap($3, true)')
+#m4 _CONVERSION(`GstMessage*',`const Glib::RefPtr<Gst::Message>&',`Glib::wrap($3, true)')
   /** Method to handle a message from the children.
    */
   _WRAP_VFUNC(void handle_message(const Glib::RefPtr<Gst::Message>& message), "handle_message")
diff --git a/gstreamer/src/buffer.hg b/gstreamer/src/buffer.hg
index 1ca4b5d..bf6d42f 100644
--- a/gstreamer/src/buffer.hg
+++ b/gstreamer/src/buffer.hg
@@ -55,7 +55,7 @@ public:
    */
   Glib::RefPtr<Gst::Buffer> copy() const;
 
-  _WRAP_METHOD(void copy_metadata(const Glib::RefPtr<Gst::Buffer>& source_buffer, BufferCopyFlags flags), 
gst_buffer_copy_metadata)
+  _WRAP_METHOD(void copy_into(const Glib::RefPtr<Gst::Buffer>& source_buffer, BufferCopyFlags flags, gsize 
offset, gsize size), gst_buffer_copy_into)
   _WRAP_METHOD(bool is_metadata_writable() const, gst_buffer_is_metadata_writable)
 
   /** Makes a writable buffer from the given buffer. If the source buffer is
@@ -85,22 +85,8 @@ public:
   //This is const because it always returns a new buffer:
   _WRAP_METHOD(Glib::RefPtr<Gst::Buffer> merge(const Glib::RefPtr<const Gst::Buffer>& other_buffer) const, 
gst_buffer_merge)
 
-  /** Get the data element of this buffer.
-   * @returns A pointer to the data element of this buffer.
-   */
-  _MEMBER_GET(data, data, guint8*, guint8*)
-
-  /** Get the size of this buffer.
-   * @return The size in bytes of the data in this buffer.
-   */
-  _MEMBER_GET(size, size, guint, guint)
-
-  /** Get the timestamp of this buffer.
-   * @return The timestamp in nanoseconds (as a Gst::ClockTime) of the data in
-   * the buffer. Value will be Gst::CLOCK_TIME_NONE if the timestamp is
-   * unknown.
-   */
-  _MEMBER_GET(timestamp, timestamp, ClockTime, GstClockTime)
+  _MEMBER_GET(pts, pts, ClockTime, GstClockTime)
+  _MEMBER_GET(dts, dts, ClockTime, GstClockTime)
 
   /** Get duration of this buffer.
    * @return he duration in nanoseconds (as a Gst::ClockTime) of the data in
@@ -118,13 +104,6 @@ public:
    */
   _MEMBER_GET(offset_end, offset_end, guint64, guint64)
 
-  /** Get the malloc data of this buffer.
-   * @return A pointer to any data allocated for this buffer using g_malloc().
-   * If this is non-null, this memory will be freed at the end of the buffer's
-   * lifecycle (i.e. when its refcount becomes zero).
-   */
-  _MEMBER_GET(malloc_data, malloc_data, guint8*, guint8*)
-
   //gst_buffer_stamp is depricated so ignore it.
   _IGNORE(gst_buffer_stamp)
 };
diff --git a/gstreamer/src/iterator.hg b/gstreamer/src/iterator.hg
index d999d09..191fb6d 100644
--- a/gstreamer/src/iterator.hg
+++ b/gstreamer/src/iterator.hg
@@ -116,7 +116,7 @@ protected:
   IteratorBase<CppType>& operator=(const IteratorBase<CppType>& other);
 
 #ifndef DOXYGEN_SHOULD_SKIP_THIS
-  void* current;         // The current element the iterator is referencing.
+  GValue* current;         // The current element the iterator is referencing.
   IteratorResult current_result; // The current result of a next() call.
 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
 
@@ -275,7 +275,7 @@ template<class CppType>
 IteratorResult IteratorBase<CppType>::next()
 {
   current_result =
-    static_cast<Gst::IteratorResult>(gst_iterator_next(cobj(), &current));
+    static_cast<Gst::IteratorResult>(gst_iterator_next(cobj(), current));
 
   // Set current to null if iterator is done:
   if(current_result == Gst::ITERATOR_DONE)
diff --git a/tools/m4/convert_gst.m4 b/tools/m4/convert_gst.m4
index 550e7ad..5ce0caa 100644
--- a/tools/m4/convert_gst.m4
+++ b/tools/m4/convert_gst.m4
@@ -133,8 +133,8 @@ _CONVERSION(`GstIterator*',`Gst::Iterator<const Gst::Pad>',`Gst::Iterator<const
 _CONVERSION(`GstIterator*',`Gst::IteratorBasic<const Gst::QueryTypeDefinition>',`Gst::IteratorBasic<const 
Gst::QueryTypeDefinition>($3)')
 
 dnl Message
-_CONVERSION(`GstMessage*',`Glib::RefPtr<Gst::Message>',`Gst::Message::wrap($3)')
-_CONVERSION(`GstMessage*',`Glib::RefPtr<const Gst::Message>',`Gst::Message::wrap($3)')
+_CONVERSION(`GstMessage*',`Glib::RefPtr<Gst::Message>',`Glib::wrap($3)')
+_CONVERSION(`GstMessage*',`Glib::RefPtr<const Gst::Message>',`Glib::wrap($3)')
 _CONVERSION(`const Glib::RefPtr<Gst::Message>&',`GstMessage*', `Glib::unwrap($3)')
 
 dnl MiniObject


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