// Generated by gmmproc 2.39.93 -- DO NOT MODIFY!


#include <glibmm.h>

#include <gstreamermm/basetransform.h>
#include <gstreamermm/private/basetransform_p.h>


/* gstreamermm - a C++ wrapper for gstreamer
 *
 * Copyright 2008 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
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free
 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */

#include <gstreamermm/pad.h>
#include <gstreamermm/caps.h>
#include <gstreamermm/buffer.h>


namespace Gst
{

const Glib::ustring BaseTransform::SINK_NAME = GST_BASE_TRANSFORM_SINK_NAME;
const Glib::ustring BaseTransform::SRC_NAME = GST_BASE_TRANSFORM_SRC_NAME;

GstFlowReturn BaseTransform_Class::prepare_output_buffer_vfunc_callback(GstBaseTransform* self, GstBuffer* input, GstBuffer** buffer)
{
  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.
    {
      try // Trap C++ exceptions which would normally be lost because this is a C callback.
      {
        Glib::RefPtr<Gst::Buffer> cpp_buffer;
        // Call the virtual member method, which derived classes might override.
        const GstFlowReturn result =
          static_cast<GstFlowReturn>(obj->prepare_output_buffer_vfunc(
          Glib::wrap(input, true), cpp_buffer));
          *buffer = cpp_buffer ? cpp_buffer->gobj_copy() : 0;
        return result;
      }
      catch(...)
      {
        Glib::exception_handlers_invoke();
      }
    }
  }
  
  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->prepare_output_buffer)
    return (*base->prepare_output_buffer)(self, input, buffer);


  typedef GstFlowReturn RType;
  return RType();
}
FlowReturn Gst::BaseTransform::prepare_output_buffer_vfunc(const Glib::RefPtr<Gst::Buffer>& input, Glib::RefPtr<Gst::Buffer>& buffer)
{
  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->prepare_output_buffer)
  {
    GstBuffer* gst_buffer;
    const Gst::FlowReturn result =
      static_cast<Gst::FlowReturn>((*base->prepare_output_buffer)(gobj(),
      Glib::unwrap(input), &gst_buffer));
    buffer = Glib::wrap(gst_buffer, false); // Don't take copy because callback returns a newly created copy.
    return result;
  }

  typedef FlowReturn RType;
  return RType();
}

} //namespace Gst

namespace
{
} // anonymous namespace


namespace Glib
{

Glib::RefPtr<Gst::BaseTransform> wrap(GstBaseTransform* object, bool take_copy)
{
  return Glib::RefPtr<Gst::BaseTransform>( dynamic_cast<Gst::BaseTransform*> (Glib::wrap_auto ((GObject*)(object), take_copy)) );
  //We use dynamic_cast<> in case of multiple inheritance.
}

} /* namespace Glib */


namespace Gst
{


/* The *_Class implementation: */

const Glib::Class& BaseTransform_Class::init()
{
  if(!gtype_) // create the GType if necessary
  {
    // Glib::Class has to know the class init function to clone custom types.
    class_init_func_ = &BaseTransform_Class::class_init_function;

    // This is actually just optimized away, apparently with no harm.
    // Make sure that the parent type has been created.
    //CppClassParent::CppObjectType::get_type();

    // Create the wrapper type, with the same class/instance size as the base type.
    register_derived_type(gst_base_transform_get_type());

    // Add derived versions of interfaces, if the C type implements any interfaces:

  }

  return *this;
}


void BaseTransform_Class::class_init_function(void* g_class, void* class_data)
{
  BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
  CppClassParent::class_init_function(klass, class_data);

  klass->transform_caps = &transform_caps_vfunc_callback;
  klass->fixate_caps = &fixate_caps_vfunc_callback;
  klass->get_unit_size = &get_unit_size_vfunc_callback;
  klass->set_caps = &set_caps_vfunc_callback;
  klass->transform = &transform_vfunc_callback;
  klass->transform_ip = &transform_ip_vfunc_callback;
  klass->src_event = &src_event_vfunc_callback;
  klass->before_transform = &before_transform_vfunc_callback;
  klass->accept_caps = &accept_caps_vfunc_callback;
  klass->start = &start_vfunc_callback;
  klass->stop = &stop_vfunc_callback;
  klass->start = &start_vfunc_callback;
  klass->stop = &stop_vfunc_callback;
  klass->prepare_output_buffer = &prepare_output_buffer_vfunc_callback;
  
}

GstCaps* BaseTransform_Class::transform_caps_vfunc_callback(GstBaseTransform* self, GstPadDirection direction, GstCaps* caps, GstCaps* filter)
{
  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 Glib::unwrap(obj->transform_caps_vfunc(((PadDirection)(direction))
, Glib::wrap(caps, true)
, Glib::wrap(filter, true)
));
      #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->transform_caps)
  {
    GstCaps* retval = (*base->transform_caps)(self, direction, caps, filter);
    return retval;
  }

  typedef GstCaps* RType;
  return RType();
}
GstCaps* BaseTransform_Class::fixate_caps_vfunc_callback(GstBaseTransform* self, GstPadDirection direction, GstCaps* caps, GstCaps* othercaps)
{
  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 Glib::unwrap(obj->fixate_caps_vfunc(((PadDirection)(direction))
, Glib::wrap(caps, true)
, Glib::wrap(othercaps, true)
));
      #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->fixate_caps)
  {
    GstCaps* retval = (*base->fixate_caps)(self, direction, caps, othercaps);
    return retval;
  }

  typedef GstCaps* RType;
  return RType();
}
gboolean BaseTransform_Class::get_unit_size_vfunc_callback(GstBaseTransform* self, GstCaps* caps, gsize* size)
{
  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->get_unit_size_vfunc(Glib::wrap(caps, true)
, *size
));
      #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->get_unit_size)
  {
    gboolean retval = (*base->get_unit_size)(self, caps, size);
    return retval;
  }

  typedef gboolean RType;
  return RType();
}
gboolean BaseTransform_Class::set_caps_vfunc_callback(GstBaseTransform* self, GstCaps* incaps, GstCaps* outcaps)
{
  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->set_caps_vfunc(Glib::wrap(incaps, true)
, Glib::wrap(outcaps, true)
));
      #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->set_caps)
  {
    gboolean retval = (*base->set_caps)(self, incaps, outcaps);
    return retval;
  }

  return static_cast<int>(true);
}
GstFlowReturn BaseTransform_Class::transform_vfunc_callback(GstBaseTransform* self, GstBuffer* inbuf, GstBuffer* outbuf)
{
  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 ((GstFlowReturn)(obj->transform_vfunc(Glib::wrap(inbuf, true)
, Glib::wrap(outbuf, true)
)));
      #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->transform)
  {
    GstFlowReturn retval = (*base->transform)(self, inbuf, outbuf);
    return retval;
  }

  typedef GstFlowReturn RType;
  return RType();
}
GstFlowReturn BaseTransform_Class::transform_ip_vfunc_callback(GstBaseTransform* self, GstBuffer* buf)
{
  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 ((GstFlowReturn)(obj->transform_ip_vfunc(Glib::wrap(buf, true)
)));
      #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->transform_ip)
  {
    GstFlowReturn retval = (*base->transform_ip)(self, buf);
    return retval;
  }

  typedef GstFlowReturn RType;
  return RType();
}
gboolean BaseTransform_Class::src_event_vfunc_callback(GstBaseTransform* self, GstEvent* event)
{
  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->src_event_vfunc(Glib::wrap(event, true)
));
      #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->src_event)
  {
    gboolean retval = (*base->src_event)(self, event);
    return retval;
  }

  typedef gboolean RType;
  return RType();
}
void BaseTransform_Class::before_transform_vfunc_callback(GstBaseTransform* self, GstBuffer* buffer)
{
  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.
        obj->before_transform_vfunc(Glib::wrap(buffer, true)
);
        return;
      #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->before_transform)
  {
    (*base->before_transform)(self, buffer);
  }

}
gboolean BaseTransform_Class::accept_caps_vfunc_callback(GstBaseTransform* self, GstPadDirection direction, GstCaps* caps)
{
  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->accept_caps_vfunc(((PadDirection)(direction))
, Glib::wrap(caps, true)
));
      #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->accept_caps)
  {
    gboolean retval = (*base->accept_caps)(self, direction, caps);
    return retval;
  }

  typedef gboolean RType;
  return RType();
}
gboolean BaseTransform_Class::start_vfunc_callback(GstBaseTransform* 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 retval = (*base->start)(self);
    return retval;
  }

  return static_cast<int>(true);
}
gboolean BaseTransform_Class::stop_vfunc_callback(GstBaseTransform* 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 retval = (*base->stop)(self);
    return retval;
  }

  return static_cast<int>(true);
}


Glib::ObjectBase* BaseTransform_Class::wrap_new(GObject* object)
{
  return new BaseTransform((GstBaseTransform*)object);
}


/* The implementation: */

GstBaseTransform* BaseTransform::gobj_copy()
{
  reference();
  return gobj();
}

BaseTransform::BaseTransform(const Glib::ConstructParams& construct_params)
:
  Element(construct_params)
{

}

BaseTransform::BaseTransform(GstBaseTransform* castitem)
:
  Element((GstElement*)(castitem))
{}


BaseTransform::~BaseTransform()
{}


BaseTransform::CppClassType BaseTransform::basetransform_class_; // initialize static member

GType BaseTransform::get_type()
{
  return basetransform_class_.init().get_type();
}


GType BaseTransform::get_base_type()
{
  return gst_base_transform_get_type();
}


bool BaseTransform::is_passthrough() const
{
  return gst_base_transform_is_passthrough(const_cast<GstBaseTransform*>(gobj()));
}

void BaseTransform::set_passthrough(bool passthrough)
{
  gst_base_transform_set_passthrough(gobj(), static_cast<int>(passthrough));
}

bool BaseTransform::is_in_place() const
{
  return gst_base_transform_is_in_place(const_cast<GstBaseTransform*>(gobj()));
}

void BaseTransform::set_in_place(bool in_place)
{
  gst_base_transform_set_in_place(gobj(), static_cast<int>(in_place));
}

bool BaseTransform::is_qos_enabled() const
{
  return gst_base_transform_is_qos_enabled(const_cast<GstBaseTransform*>(gobj()));
}

void BaseTransform::set_qos_enabled(bool enabled)
{
  gst_base_transform_set_qos_enabled(gobj(), static_cast<int>(enabled));
}

void BaseTransform::update_qos(double proportion, ClockTimeDiff diff, ClockTime timestamp)
{
  gst_base_transform_update_qos(gobj(), proportion, GstClockTimeDiff(diff), ((GstClockTime)(timestamp)));
}

void BaseTransform::set_gap_aware(bool gap_aware)
{
  gst_base_transform_set_gap_aware(gobj(), static_cast<int>(gap_aware));
}

 Glib::RefPtr<Gst::Pad> BaseTransform::get_sink_pad()
{
  Glib::RefPtr<Gst::Pad> ref_ptr(Glib::wrap(gobj()->sinkpad));

  if(ref_ptr)
    ref_ptr->reference();

  return ref_ptr;
}

Glib::RefPtr<const Gst::Pad> BaseTransform::get_sink_pad() const
{
  Glib::RefPtr<const Gst::Pad> ref_ptr(Glib::wrap(gobj()->sinkpad));

  if(ref_ptr)
    ref_ptr->reference();

  return ref_ptr;
}
 
 Glib::RefPtr<Gst::Pad> BaseTransform::get_src_pad()
{
  Glib::RefPtr<Gst::Pad> ref_ptr(Glib::wrap(gobj()->srcpad));

  if(ref_ptr)
    ref_ptr->reference();

  return ref_ptr;
}

Glib::RefPtr<const Gst::Pad> BaseTransform::get_src_pad() const
{
  Glib::RefPtr<const Gst::Pad> ref_ptr(Glib::wrap(gobj()->srcpad));

  if(ref_ptr)
    ref_ptr->reference();

  return ref_ptr;
}
 

#ifdef GLIBMM_PROPERTIES_ENABLED
Glib::PropertyProxy< bool > BaseTransform::property_qos() 
{
  return Glib::PropertyProxy< bool >(this, "qos");
}
#endif //GLIBMM_PROPERTIES_ENABLED

#ifdef GLIBMM_PROPERTIES_ENABLED
Glib::PropertyProxy_ReadOnly< bool > BaseTransform::property_qos() const
{
  return Glib::PropertyProxy_ReadOnly< bool >(this, "qos");
}
#endif //GLIBMM_PROPERTIES_ENABLED


Glib::RefPtr<Gst::Caps> Gst::BaseTransform::transform_caps_vfunc(PadDirection direction, const Glib::RefPtr<Gst::Caps>& caps, const Glib::RefPtr<Gst::Caps>& filter) 
{
  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->transform_caps)
  {
    Glib::RefPtr<Gst::Caps> retval(Glib::wrap((*base->transform_caps)(gobj(),((GstPadDirection)(direction)),Glib::unwrap(caps),Glib::unwrap(filter))));
    return retval;
  }

  typedef Glib::RefPtr<Gst::Caps> RType;
  return RType();
}
Glib::RefPtr<Gst::Caps> Gst::BaseTransform::fixate_caps_vfunc(PadDirection direction, const Glib::RefPtr<Gst::Caps>& caps, const Glib::RefPtr<Gst::Caps>& othercaps) 
{
  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->fixate_caps)
  {
    Glib::RefPtr<Gst::Caps> retval(Glib::wrap((*base->fixate_caps)(gobj(),((GstPadDirection)(direction)),Glib::unwrap(caps),Glib::unwrap(othercaps))));
    return retval;
  }

  typedef Glib::RefPtr<Gst::Caps> RType;
  return RType();
}
bool Gst::BaseTransform::get_unit_size_vfunc(const Glib::RefPtr<Gst::Caps>& caps, gsize& size) const
{
  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->get_unit_size)
  {
    bool retval((*base->get_unit_size)(const_cast<GstBaseTransform*>(gobj()),Glib::unwrap(caps),&(size)));
    return retval;
  }

  typedef bool RType;
  return RType();
}
bool Gst::BaseTransform::set_caps_vfunc(const Glib::RefPtr<Gst::Caps>& incaps, const Glib::RefPtr<Gst::Caps>& outcaps) 
{
  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->set_caps)
  {
    bool retval((*base->set_caps)(gobj(),Glib::unwrap(incaps),Glib::unwrap(outcaps)));
    return retval;
  }

  return true;
}
FlowReturn Gst::BaseTransform::transform_vfunc(const Glib::RefPtr<Gst::Buffer>& inbuf, const Glib::RefPtr<Gst::Buffer>& outbuf) 
{
  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->transform)
  {
    FlowReturn retval(((FlowReturn)((*base->transform)(gobj(),Glib::unwrap(inbuf),Glib::unwrap(outbuf)))));
    return retval;
  }

  typedef FlowReturn RType;
  return RType();
}
FlowReturn Gst::BaseTransform::transform_ip_vfunc(const Glib::RefPtr<Gst::Buffer>& buf) 
{
  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->transform_ip)
  {
    FlowReturn retval(((FlowReturn)((*base->transform_ip)(gobj(),Glib::unwrap(buf)))));
    return retval;
  }

  typedef FlowReturn RType;
  return RType();
}
bool Gst::BaseTransform::src_event_vfunc(const Glib::RefPtr<Gst::Event>& event) 
{
  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->src_event)
  {
    bool retval((*base->src_event)(gobj(),Glib::unwrap(event)));
    return retval;
  }

  typedef bool RType;
  return RType();
}
void Gst::BaseTransform::before_transform_vfunc(const Glib::RefPtr<Gst::Buffer>& buffer) 
{
  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->before_transform)
  {
    (*base->before_transform)(gobj(),Glib::unwrap(buffer));
  }
}
bool Gst::BaseTransform::accept_caps_vfunc(PadDirection direction, const Glib::RefPtr<const Gst::Caps>& caps) 
{
  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->accept_caps)
  {
    bool retval((*base->accept_caps)(gobj(),((GstPadDirection)(direction)),const_cast<GstCaps*>(Glib::unwrap(caps))));
    return retval;
  }

  typedef bool RType;
  return RType();
}
bool Gst::BaseTransform::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 retval((*base->start)(gobj()));
    return retval;
  }

  return true;
}
bool Gst::BaseTransform::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 retval((*base->stop)(gobj()));
    return retval;
  }

  return true;
}


} // namespace Gst


