[gstreamermm: 167/167] removed code, which might be generated (patch published here: https://bugzilla.gnome.org/show_bug.cg



commit 53cf95494db8ee3ef04085a52dcf5fa6b0fc203c
Author: Marcin Kolny at Flytronic.pl <marcin kolny flytronic pl>
Date:   Tue Sep 3 11:13:47 2013 +0200

    removed code, which might be generated (patch published here: 
https://bugzilla.gnome.org/show_bug.cgi?id=705699 is needed)

 gstreamer/src/basesrc.ccg |  120 ---------------------------------------------
 gstreamer/src/basesrc.hg  |   16 ++----
 2 files changed, 6 insertions(+), 130 deletions(-)
---
diff --git a/gstreamer/src/basesrc.ccg b/gstreamer/src/basesrc.ccg
index db75098..d583600 100644
--- a/gstreamer/src/basesrc.ccg
+++ b/gstreamer/src/basesrc.ccg
@@ -203,124 +203,4 @@ FlowReturn Gst::BaseSrc::create_vfunc(guint64 offset, guint size, Glib::RefPtr<G
   return RType();
 }
 
-gboolean BaseSrc_Class::start_vfunc_callback(GstBaseSrc* 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
-    }
-  }
-
-  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)
-  {
-    gboolean result = (*base->start)(self);
-    return result;
-  }
-
-
-  return true;
-}
-gboolean BaseSrc_Class::stop_vfunc_callback(GstBaseSrc* 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->stop_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->stop)
-  {
-    gboolean result = (*base->stop)(self);
-    return result;
-  }
-
-
-  return true;
-}
-
-bool Gst::BaseSrc::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)
-  {
-    bool result((*base->start)(gobj()));
-    return result;
-  }
-
-  return true;
-}
-bool Gst::BaseSrc::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)
-  {
-    bool result((*base->stop)(gobj()));
-    return result;
-  }
-
-  return true;
-}
-
 } // namespace Gst
diff --git a/gstreamer/src/basesrc.hg b/gstreamer/src/basesrc.hg
index a888256..9cdc0fa 100644
--- a/gstreamer/src/basesrc.hg
+++ b/gstreamer/src/basesrc.hg
@@ -182,14 +182,14 @@ public:
    */
   _WRAP_VFUNC(bool negotiate(), "negotiate")
 
-  /** Start processing. Subclasses should open resources and prepare to produce
-   * data.
-   */
-  virtual bool start_vfunc();
-
   /** Stop processing. Subclasses should use this to close resources.
    */
-  virtual bool stop_vfunc();
+  _WRAP_VFUNC(bool stop(), "stop", return_value true)
+
+  /** Start processing. Subclasses should open resources and prepare to produce
+    * data.
+    */
+  _WRAP_VFUNC(bool start(), "start", return_value true)
 
 #m4 _CONVERSION(`GstBuffer*', `const Glib::RefPtr<Gst::Buffer>&', `Glib::wrap($3, true)')
 #m4 _CONVERSION(`GstClockTime*', `ClockTime&', `*($3)')
@@ -250,14 +250,10 @@ public:
 protected:
 #m4begin
   _PUSH(SECTION_PCC_CLASS_INIT_VFUNCS)
-  klass->start = &start_vfunc_callback;
-  klass->stop = &stop_vfunc_callback;
   klass->do_seek = &do_seek_vfunc_callback;
   klass->prepare_seek_segment = &prepare_seek_segment_vfunc_callback;
   klass->create = &create_vfunc_callback;
   _SECTION(SECTION_PH_VFUNCS)
-  static gboolean start_vfunc_callback(GstBaseSrc* self);
-  static gboolean stop_vfunc_callback(GstBaseSrc* self);
   static gboolean do_seek_vfunc_callback(GstBaseSrc* self, GstSegment* segment);
   static gboolean prepare_seek_segment_vfunc_callback(GstBaseSrc* self, GstEvent* seek, GstSegment* segment);
   static GstFlowReturn create_vfunc_callback(GstBaseSrc* self, guint64 offset, guint size, GstBuffer** buf);


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