[gstreamermm] Gst::BaseSink: update basesink class



commit e5ec5ef067381d97b39a30a8690129b6bf6c3b7b
Author: Marcin Kolny <marcin kolny gmail com>
Date:   Thu May 5 22:28:11 2016 +0200

    Gst::BaseSink: update basesink class
    
        * gstreamer/src/basesink.{ccg|hg}: add missing functions, remove
          unnecessary implementation of vfuncs.
        * gstreamer/src/gst_vfuncs.defs: add vfunc declarations.

 gstreamer/src/basesink.ccg    |  274 +++-------------------------------------
 gstreamer/src/basesink.hg     |  114 +++++++----------
 gstreamer/src/gst_vfuncs.defs |   45 ++++++-
 3 files changed, 109 insertions(+), 324 deletions(-)
---
diff --git a/gstreamer/src/basesink.ccg b/gstreamer/src/basesink.ccg
index 9bbffa2..cb7284b 100644
--- a/gstreamer/src/basesink.ccg
+++ b/gstreamer/src/basesink.ccg
@@ -1,6 +1,6 @@
 /* gstreamermm - a C++ wrapper for gstreamer
  *
- * Copyright 2008 The gstreamermm Development Team
+ * Copyright 2008-2016 The gstreamermm Development Team
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -17,95 +17,13 @@
  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
-#include <gstreamermm/pad.h>
-#include <gstreamermm/bufferlist.h>
-
 _PINCLUDE(gstreamermm/private/element_p.h)
 
-namespace Gst
-{
-
-bool BaseSink::query_latency(bool& live, bool& upstream_live, ClockTime& min_latency, ClockTime& 
max_latency) const
-{
-  gboolean gst_live = 0;
-  gboolean gst_upstream_live = 0;
-
-  const bool result =
-    gst_base_sink_query_latency(const_cast<GstBaseSink*>(gobj()),
-    &gst_live, &gst_upstream_live, static_cast<GstClockTime*>(&min_latency),
-    static_cast<GstClockTime*>(&max_latency));
-
-  live = gst_live;
-  upstream_live = gst_upstream_live;
-
-  return result;
-}
-
-ClockReturn BaseSink::wait_clock(ClockTime time)
-{
-  return static_cast<ClockReturn>(gst_base_sink_wait_clock(const_cast<GstBaseSink*>(gobj()), 
static_cast<GstClockTime>(time), nullptr));
-}
-
-FlowReturn BaseSink::wait(ClockTime time)
-{
-  return static_cast<FlowReturn>(gst_base_sink_wait(const_cast<GstBaseSink*>(gobj()), 
static_cast<GstClockTime>(time), 0));
-}
-
-gboolean BaseSink_Class::start_vfunc_callback(GstBaseSink* self)
-{
-  Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
-      Glib::ObjectBase::_get_current_wrapper((GObject*)self));
-
-  // Non-gtkmmproc-generated custom classes implicitly call the default
-  // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
-  // generated classes can use this optimisation, which avoids the unnecessary
-  // parameter conversions if there is no possibility of the virtual function
-  // being overridden:
-  if(obj_base && obj_base->is_derived_())
-  {
-    CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
-    if(obj) // This can be NULL during destruction.
-    {
-      #ifdef GLIBMM_EXCEPTIONS_ENABLED
-      try // Trap C++ exceptions which would normally be lost because this is a C callback.
-      {
-      #endif //GLIBMM_EXCEPTIONS_ENABLED
-        // Call the virtual member method, which derived classes might override.
-        return static_cast<int>(obj->start_vfunc());
-      #ifdef GLIBMM_EXCEPTIONS_ENABLED
-      }
-      catch(...)
-      {
-        Glib::exception_handlers_invoke();
-      }
-      #endif //GLIBMM_EXCEPTIONS_ENABLED
-    }
-  }
+namespace Gst {
   
-  BaseClassType *const base = static_cast<BaseClassType*>(
-      g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The 
original underlying C class).
-  );
-
-  // Call the original underlying C function:
-  if(base && base->start)
-    return (*base->start)(self);
-
-  return true;
-}
-bool Gst::BaseSink::start_vfunc() 
-{
-  BaseClassType *const base = static_cast<BaseClassType*>(
-      g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class 
(The original underlying C class).
-  );
-
-  if(base && base->start)
-    return (*base->start)(gobj());
-
-  return true;
-}
-gboolean BaseSink_Class::stop_vfunc_callback(GstBaseSink* self)
+gboolean BaseSink_Class::query_vfunc_callback(GstBaseSink* self, GstQuery* query)
 {
-  Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
+  const auto obj_base = static_cast<Glib::ObjectBase*>(
       Glib::ObjectBase::_get_current_wrapper((GObject*)self));
 
   // Non-gtkmmproc-generated custom classes implicitly call the default
@@ -115,203 +33,53 @@ gboolean BaseSink_Class::stop_vfunc_callback(GstBaseSink* self)
   // being overridden:
   if(obj_base && obj_base->is_derived_())
   {
-    CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
+    const auto obj = dynamic_cast<CppObjectType* const>(obj_base);
     if(obj) // This can be NULL during destruction.
     {
-      #ifdef GLIBMM_EXCEPTIONS_ENABLED
       try // Trap C++ exceptions which would normally be lost because this is a C callback.
       {
-      #endif //GLIBMM_EXCEPTIONS_ENABLED
         // Call the virtual member method, which derived classes might override.
-        return static_cast<int>(obj->stop_vfunc());
-      #ifdef GLIBMM_EXCEPTIONS_ENABLED
+       auto qurery_wrapper = Glib::wrap(query, false);
+        int retval = static_cast<int>(obj->base_sink_query_vfunc(qurery_wrapper));
+       qurery_wrapper.release();
       }
       catch(...)
       {
         Glib::exception_handlers_invoke();
       }
-      #endif //GLIBMM_EXCEPTIONS_ENABLED
     }
   }
-  
-  BaseClassType *const base = static_cast<BaseClassType*>(
-      g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The 
original underlying C class).
-  );
 
-  // Call the original underlying C function:
-  if(base && base->stop)
-    return (*base->stop)(self);
-
-  return true;
-}
-bool Gst::BaseSink::stop_vfunc() 
-{
-  BaseClassType *const base = static_cast<BaseClassType*>(
-      g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class 
(The original underlying C class).
-  );
-
-  if(base && base->stop)
-    return (*base->stop)(gobj());
-
-  return true;
-}
-gboolean BaseSink_Class::unlock_vfunc_callback(GstBaseSink* self)
-{
-  Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
-      Glib::ObjectBase::_get_current_wrapper((GObject*)self));
-
-  // Non-gtkmmproc-generated custom classes implicitly call the default
-  // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
-  // generated classes can use this optimisation, which avoids the unnecessary
-  // parameter conversions if there is no possibility of the virtual function
-  // being overridden:
-  if(obj_base && obj_base->is_derived_())
-  {
-    CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
-    if(obj) // This can be NULL during destruction.
-    {
-      #ifdef GLIBMM_EXCEPTIONS_ENABLED
-      try // Trap C++ exceptions which would normally be lost because this is a C callback.
-      {
-      #endif //GLIBMM_EXCEPTIONS_ENABLED
-        // Call the virtual member method, which derived classes might override.
-        return static_cast<int>(obj->unlock_vfunc());
-      #ifdef GLIBMM_EXCEPTIONS_ENABLED
-      }
-      catch(...)
-      {
-        Glib::exception_handlers_invoke();
-      }
-      #endif //GLIBMM_EXCEPTIONS_ENABLED
-    }
-  }
-  
   BaseClassType *const base = static_cast<BaseClassType*>(
       g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The 
original underlying C class).
   );
 
   // Call the original underlying C function:
-  if(base && base->unlock)
-    return (*base->unlock)(self);
-
-  return true;
-}
-bool Gst::BaseSink::unlock_vfunc() 
-{
-  BaseClassType *const base = static_cast<BaseClassType*>(
-      g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class 
(The original underlying C class).
-  );
-
-  if(base && base->unlock)
-    return (*base->unlock)(gobj());
-
-  return true;
-}
-
-gboolean BaseSink_Class::activate_pull_vfunc_callback(GstBaseSink* self, gboolean active)
-{
-  Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
-      Glib::ObjectBase::_get_current_wrapper((GObject*)self));
-
-  // Non-gtkmmproc-generated custom classes implicitly call the default
-  // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
-  // generated classes can use this optimisation, which avoids the unnecessary
-  // parameter conversions if there is no possibility of the virtual function
-  // being overridden:
-  if(obj_base && obj_base->is_derived_())
+  if(base && base->query)
   {
-    CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
-    if(obj) // This can be NULL during destruction.
-    {
-      #ifdef GLIBMM_EXCEPTIONS_ENABLED
-      try // Trap C++ exceptions which would normally be lost because this is a C callback.
-      {
-      #endif //GLIBMM_EXCEPTIONS_ENABLED
-        // Call the virtual member method, which derived classes might override.
-        return static_cast<int>(obj->activate_pull_vfunc(active
-));
-      #ifdef GLIBMM_EXCEPTIONS_ENABLED
-      }
-      catch(...)
-      {
-        Glib::exception_handlers_invoke();
-      }
-      #endif //GLIBMM_EXCEPTIONS_ENABLED
-    }
+    gboolean retval = (*base->query)(self, query);
+    return retval;
   }
-  
-  BaseClassType *const base = static_cast<BaseClassType*>(
-      g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The 
original underlying C class).
-  );
 
-  // Call the original underlying C function:
-  if(base && base->activate_pull)
-    return (*base->activate_pull)(self, active);
-
-  return true;
+  typedef gboolean RType;
+  return RType();
 }
-bool Gst::BaseSink::activate_pull_vfunc(bool active) 
+
+bool Gst::BaseSink::base_sink_query_vfunc(const Glib::RefPtr<Gst::Query>& query)
 {
-  BaseClassType *const base = static_cast<BaseClassType*>(
+  const auto base = static_cast<BaseClassType*>(
       g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class 
(The original underlying C class).
   );
 
-  if(base && base->activate_pull)
-    return (*base->activate_pull)(gobj(),static_cast<int>(active));
-
-  return true;
-}
-gboolean BaseSink_Class::unlock_stop_vfunc_callback(GstBaseSink* self)
-{
-  Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
-      Glib::ObjectBase::_get_current_wrapper((GObject*)self));
-
-  // Non-gtkmmproc-generated custom classes implicitly call the default
-  // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
-  // generated classes can use this optimisation, which avoids the unnecessary
-  // parameter conversions if there is no possibility of the virtual function
-  // being overridden:
-  if(obj_base && obj_base->is_derived_())
-  {
-    CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
-    if(obj) // This can be NULL during destruction.
+  if(base && base->query)
     {
-      #ifdef GLIBMM_EXCEPTIONS_ENABLED
-      try // Trap C++ exceptions which would normally be lost because this is a C callback.
-      {
-      #endif //GLIBMM_EXCEPTIONS_ENABLED
-        // Call the virtual member method, which derived classes might override.
-        return static_cast<int>(obj->unlock_stop_vfunc());
-      #ifdef GLIBMM_EXCEPTIONS_ENABLED
-      }
-      catch(...)
-      {
-        Glib::exception_handlers_invoke();
-      }
-      #endif //GLIBMM_EXCEPTIONS_ENABLED
-    }
+    bool retval((*base->query)(gobj(),Glib::unwrap(query)));
+    return retval;
   }
-  
-  BaseClassType *const base = static_cast<BaseClassType*>(
-      g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The 
original underlying C class).
-  );
 
-  // Call the original underlying C function:
-  if(base && base->unlock_stop)
-    return (*base->unlock_stop)(self);
-
-  return true;
+  typedef bool RType;
+  return RType();
 }
-bool Gst::BaseSink::unlock_stop_vfunc() 
-{
-  BaseClassType *const base = static_cast<BaseClassType*>(
-      g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class 
(The original underlying C class).
-  );
 
-  if(base && base->unlock_stop)
-    return (*base->unlock_stop)(gobj());
 
-  return true;
 }
-
-} // namespace Gst
diff --git a/gstreamer/src/basesink.hg b/gstreamer/src/basesink.hg
index 2b147a1..f3351e0 100644
--- a/gstreamer/src/basesink.hg
+++ b/gstreamer/src/basesink.hg
@@ -1,6 +1,6 @@
 /* gstreamermm - a C++ wrapper for gstreamer
  *
- * Copyright 2008 The gstreamermm Development Team
+ * Copyright 2008-2016 The gstreamermm Development Team
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -120,11 +120,11 @@ class BufferList;
  * information can then be used by upstream elements to reduce their processing
  * rate, for example.
  *
- * Since GStreamer 0.10.15 the async property can be used to instruct the sink
+ * The async property can be used to instruct the sink
  * to never perform an ASYNC state change. This feature is mostly usable when
  * dealing with non-synchronized streams or sparse streams.
  *
- * Last reviewed on 2007-08-29 (0.10.15)
+ * Last reviewed on 2016-04-29 (1.8.0)
  *
  * @ingroup GstBaseClasses
  */
@@ -134,55 +134,12 @@ class BaseSink
   _CLASS_GOBJECT(BaseSink, GstBaseSink, GST_BASE_SINK, Element, GstElement)
 
 public:
-  _WRAP_METHOD_DOCS_ONLY(gst_base_sink_query_latency)
-  bool query_latency(bool& live, bool& upstream_live, Gst::ClockTime& min_latency,
-    Gst::ClockTime& max_latency) const;
+  _WRAP_METHOD(bool query_latency(bool& live, bool& upstream_live, Gst::ClockTime& min_latency, 
Gst::ClockTime& max_latency) const, gst_base_sink_query_latency)
   _WRAP_METHOD(Gst::ClockTime get_latency() const, gst_base_sink_get_latency)
   _WRAP_METHOD(Gst::FlowReturn do_preroll(const Glib::RefPtr<Gst::MiniObject>& obj), 
gst_base_sink_do_preroll)
   _WRAP_METHOD(Gst::FlowReturn wait_preroll(), gst_base_sink_wait_preroll)
-  _WRAP_METHOD(Gst::ClockReturn wait_clock(Gst::ClockTime time, Gst::ClockTimeDiff& jitter), 
gst_base_sink_wait_clock)
-  _WRAP_METHOD(Gst::FlowReturn wait(Gst::ClockTime time, Gst::ClockTimeDiff& jitter), gst_base_sink_wait)
-
-  /** This function will block until time is reached.  It is usually called by
-   * subclasses that use their own internal synchronisation.
-   *
-   * If time is not valid, no sycnhronisation is done and Gst::CLOCK_BADTIME is
-   * returned. Likewise, if synchronisation is disabled in the element or there
-   * is no clock, no synchronisation is done and Gst::CLOCK_BADTIME is
-   * returned.
-   *
-   * This function should only be called with the PREROLL_LOCK held, like when
-   * receiving an EOS event in the event vmethod or when receiving a buffer in
-   * the render vmethod.
-   *
-   * The time argument should be the running_time of when this method should
-   * return and is not adjusted with any latency or offset configured in the
-   * sink.
-   *
-   * Since 0.10.20.
-   *
-   * @param time The running_time to be reached.
-   * @return Gst::ClockReturn.
-   */
-  Gst::ClockReturn wait_clock(Gst::ClockTime time);
-
-
-  /** This function will block until time is reached.  It is usually called by
-   * subclasses that use their own internal synchronisation but want to let the
-   * EOS be handled by the base class.
-   *
-   * This function should only be called with the PREROLL_LOCK held, like when
-   * receiving an EOS event in the event vmethod.
-   *
-   * The time argument should be the running_time of when the EOS should happen
-   * and will be adjusted with any latency and offset configured in the sink.
-   * 
-   * Since 0.10.15.
-   * 
-   * @param time The running time to be reached.
-   * @return Gst::FlowReturn.
-   */
-  Gst::FlowReturn wait(Gst::ClockTime time);
+  _WRAP_METHOD(Gst::ClockReturn wait_clock(Gst::ClockTime time, Gst::ClockTimeDiff& jitter{?}), 
gst_base_sink_wait_clock)
+  _WRAP_METHOD(Gst::FlowReturn wait(Gst::ClockTime time, Gst::ClockTimeDiff& jitter{?}), gst_base_sink_wait)
 
   _WRAP_METHOD(void set_sync(bool sync), gst_base_sink_set_sync)
   _WRAP_METHOD(bool get_sync() const, gst_base_sink_get_sync)
@@ -193,7 +150,7 @@ public:
   _WRAP_METHOD(void set_qos_enabled(bool enabled), gst_base_sink_set_qos_enabled)
   _WRAP_METHOD(bool is_qos_enabled() const, gst_base_sink_is_qos_enabled)
 
-  _WRAP_METHOD(void set_async_enabled(bool enabled), gst_base_sink_set_async_enabled) 
+  _WRAP_METHOD(void set_async_enabled(bool enabled), gst_base_sink_set_async_enabled)
   _WRAP_METHOD(bool is_async_enabled() const, gst_base_sink_is_async_enabled)
 
   _WRAP_METHOD(void set_ts_offset(Gst::ClockTimeDiff offset), gst_base_sink_set_ts_offset)
@@ -220,6 +177,8 @@ public:
    */
   _MEMBER_GET_GOBJECT(sink_pad, sinkpad, Gst::Pad, GstPad*)
 
+  // TODO: wrap preroll?
+
   _WRAP_PROPERTY("async", bool)
   _WRAP_PROPERTY("max-lateness", gint64)
   _WRAP_PROPERTY("qos", bool)
@@ -250,26 +209,33 @@ public:
 
   /** Start processing. Ideal for opening resources in the subclass.
    */
-  virtual bool start_vfunc();
+  _WRAP_VFUNC(bool start(), "start", return_value true)
 
   /** Stop processing. Subclasses should use this to close resources.
    */
-  virtual bool stop_vfunc();
+  _WRAP_VFUNC(bool stop(), "stop", return_value true)
 
   /** Unlock any pending access to the resource. Subclasses should unblock any
    * blocked function ASAP.
    */
-  virtual bool unlock_vfunc();
+  _WRAP_VFUNC(bool unlock(), "unlock", return_value true)
 
 #m4 _CONVERSION(`GstEvent*', `const Glib::RefPtr<Gst::Event>&', `Glib::wrap($3, true)')
   /** Override this to handle events arriving on the sink pad.
    */
   _WRAP_VFUNC(bool event(const Glib::RefPtr<Gst::Event>& event), "event", return_value true)
 
+  /** Override this to implement custom logic to wait for the event time (for events
+   * like EOS and GAP). Subclasses should always first chain up to the default
+   * implementation.
+   */
+  _WRAP_VFUNC(FlowReturn wait_event(const Glib::RefPtr<Gst::Event>& event), "wait_event")
+
   /** Called to present the preroll buffer if desired.
    */
   _WRAP_VFUNC(FlowReturn preroll(const Glib::RefPtr<Gst::Buffer>& buffer), "preroll")
 
+
   /** Called when a buffer should be presented or output, at the correct moment
    * if the Gst::BaseSink has been set to sync to the clock.
    */
@@ -286,7 +252,7 @@ public:
    * Called after actually activating the sink pad in pull mode. The default
    * implementation starts a task on the sink pad. 
    */
-  virtual bool activate_pull_vfunc(bool active);
+  _WRAP_VFUNC(bool activate_pull(bool active), "activate_pull", return_value true)
 
   /** Only useful in pull mode, this vmethod will be called in response to
    * Gst::Pad::fixate_caps() being called on the sink pad. Implement if you
@@ -298,26 +264,42 @@ public:
   /** Clear the previous unlock request. Subclasses should clear any state they
    * set during unlock_vfunc(), such as clearing command queues.
    */
-  virtual bool unlock_stop_vfunc();
+  _WRAP_VFUNC(bool unlock_stop(), "unlock_stop", return_value true)
 
 #m4 _CONVERSION(`GstBufferList*', `const Glib::RefPtr<Gst::BufferList>&', `Glib::wrap($3, true)')
   /// Render a BufferList.
-  _WRAP_VFUNC(FlowReturn render_list(const Glib::RefPtr<Gst::BufferList>& buffer_list), render_list)
+  /** Same as render but used with buffer lists instead of buffers.
+   */
+  _WRAP_VFUNC(FlowReturn render_list(const Glib::RefPtr<Gst::BufferList>& buffer_list), "render_list")
+
+  /** Called to prepare the buffer for render and preroll.
+   * This function is called before synchronisation is performed.
+   */
+  _WRAP_VFUNC(FlowReturn prepare(const Glib::RefPtr<Gst::Buffer>& buffer), "prepare")
+
+  /** Called to prepare the buffer list for render_list.
+   * This function is called before synchronisation is performed.
+   */
+  _WRAP_VFUNC(FlowReturn prepare_list(const Glib::RefPtr<Gst::BufferList>& buffer_list), "prepare_list")
+
+  // Cannot use query_vfunc because the name has been used in the Gst::Element class.
+  // We have to provide custom implementation, because query vfunc expects writable
+  // query object.
+  /** Perform a GstQuery on the element.
+   */
+  virtual bool base_sink_query_vfunc(const Glib::RefPtr<Gst::Query>& query);
+
+  /** Configure the allocation query.
+   */
+#m4 _CONVERSION(`GstQuery*', `const Glib::RefPtr<Gst::Query>&', `Glib::wrap($3, true)')
+  _WRAP_VFUNC(bool propose_allocation(const Glib::RefPtr<Gst::Query>& query), "propose_allocation")
 
 protected:
 #m4begin
   _PUSH(SECTION_PCC_CLASS_INIT_VFUNCS)
-  klass->start = &start_vfunc_callback;
-  klass->stop = &stop_vfunc_callback;
-  klass->unlock = &unlock_vfunc_callback;
-  klass->activate_pull = &activate_pull_vfunc_callback;
-  klass->unlock_stop = &unlock_stop_vfunc_callback;
+  klass->query = &query_vfunc_callback;
   _SECTION(SECTION_PH_VFUNCS)
-  static gboolean start_vfunc_callback(GstBaseSink* self);
-  static gboolean stop_vfunc_callback(GstBaseSink* self);
-  static gboolean unlock_vfunc_callback(GstBaseSink* self);
-  static gboolean activate_pull_vfunc_callback(GstBaseSink* self, gboolean active);
-  static gboolean unlock_stop_vfunc_callback(GstBaseSink* self);
+  static gboolean query_vfunc_callback(GstBaseSink* self, GstQuery* query);
   _POP()
 #m4end
 };
diff --git a/gstreamer/src/gst_vfuncs.defs b/gstreamer/src/gst_vfuncs.defs
index 6ccf324..d76d323 100644
--- a/gstreamer/src/gst_vfuncs.defs
+++ b/gstreamer/src/gst_vfuncs.defs
@@ -220,11 +220,6 @@
   )
 )
 
-(define-vfunc async_play
-  (of-object "GstBaseSink")
-  (return-type "GstStateChangeReturn")
-)
-
 (define-vfunc activate_pull
   (of-object "GstBaseSink")
   (return-type "gboolean")
@@ -254,6 +249,46 @@
   )
 )
 
+(define-vfunc propose_allocation
+  (of-object "GstBaseSink")
+  (return-type "gboolean")
+  (parameters
+   '("GstQuery*" "query")
+  )
+)
+
+(define-vfunc query
+  (of-object "GstBaseSink")
+  (return-type "gboolean")
+  (parameters
+   '("GstQuery*" "query")
+  )
+)
+
+(define-vfunc wait_event
+  (of-object "GstBaseSink")
+  (return-type "GstFlowReturn")
+  (parameters
+   '("GstEvent*" "event")
+  )
+)
+
+(define-vfunc prepare
+  (of-object "GstBaseSink")
+  (return-type "GstFlowReturn")
+  (parameters
+   '("GstBuffer*" "buffer")
+  )
+)
+
+(define-vfunc prepare_list
+  (of-object "GstBaseSink")
+  (return-type "GstFlowReturn")
+  (parameters
+   '("GstBufferList*" "buffer_list")
+  )
+)
+
 ; GstBaseSrc
 
 (define-vfunc get_caps


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