// Generated by gtkmmproc -- DO NOT MODIFY!


#include <gstreamermm/decodebin2.h>
#include <gstreamermm/private/decodebin2_p.h>

// Generated by generate_plugin_gmmproc_file. Don't edit this file.


struct _GstDecodeBin2Class
{
  GstBinClass parent_class;
  void (*new_decoded_pad) (GstDecodeBin2* element, GstPad* arg0, gboolean arg1);
  void (*removed_decoded_pad) (GstDecodeBin2* element, GstPad* arg0);
  void (*unknown_type) (GstDecodeBin2* element, GstPad* arg0, GstCaps* arg1);
  gboolean (*autoplug_continue) (GstDecodeBin2* element, GstPad* arg0, GstCaps* arg1);
  GValueArray* (*autoplug_factories) (GstDecodeBin2* element, GstPad* arg0, GstCaps* arg1);
  GValueArray* (*autoplug_sort) (GstDecodeBin2* element, GstPad* arg0, GstCaps* arg1, GValueArray* arg2);
  GstAutoplugSelectResult (*autoplug_select) (GstDecodeBin2* element, GstPad* arg0, GstCaps* arg1, GstElementFactory* arg2);
  void (*drained) (GstDecodeBin2* element);
};

extern "C"
{

GType gst_decode_bin2_get_type()
{
  static GType type = 0;
  GstElementFactory* factory = 0;
  GstPluginFeature* feature = 0;

  if(!type)
  {
    factory = gst_element_factory_find("decodebin2");
    // Make sure that the feature is actually loaded:
    if(factory)
    {
      feature =
        gst_plugin_feature_load(GST_PLUGIN_FEATURE(factory));

      g_object_unref(factory);
      factory = GST_ELEMENT_FACTORY(feature);
      type = gst_element_factory_get_element_type(factory);
      g_object_unref(factory);
    }
  }

  return type;
}

} // extern "C"

namespace Gst
{

DecodeBin2::DecodeBin2()
: // Mark this class as non-derived to allow C++ vfuncs to be skipped.
  Glib::ObjectBase(0),
  Gst::Bin(Glib::ConstructParams(decodebin2_class_.init(), "name",static_cast<char*>(0), static_cast<char*>(0)))
{}

DecodeBin2::DecodeBin2(const Glib::ustring& name)
: // Mark this class as non-derived to allow C++ vfuncs to be skipped.
  Glib::ObjectBase(0),
  Gst::Bin(Glib::ConstructParams(decodebin2_class_.init(), "name",name.c_str(), static_cast<char*>(0)))
{}

}

namespace
{


static void DecodeBin2_signal_new_decoded_pad_callback(GstDecodeBin2* self, GstPad* p0,gboolean p1,void* data)
{
  using namespace Gst;
  typedef sigc::slot< void,const Glib::RefPtr<Gst::Pad>&,bool > SlotType;

  // Do not try to call a signal on a disassociated wrapper.
  if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
  {
    #ifdef GLIBMM_EXCEPTIONS_ENABLED
    try
    {
    #endif //GLIBMM_EXCEPTIONS_ENABLED
      if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
        (*static_cast<SlotType*>(slot))(Glib::wrap(p0, true)
, p1
);
    #ifdef GLIBMM_EXCEPTIONS_ENABLED
    }
    catch(...)
    {
      Glib::exception_handlers_invoke();
    }
    #endif //GLIBMM_EXCEPTIONS_ENABLED
  }
}

static const Glib::SignalProxyInfo DecodeBin2_signal_new_decoded_pad_info =
{
  "new-decoded-pad",
  (GCallback) &DecodeBin2_signal_new_decoded_pad_callback,
  (GCallback) &DecodeBin2_signal_new_decoded_pad_callback
};


static void DecodeBin2_signal_removed_decoded_pad_callback(GstDecodeBin2* self, GstPad* p0,void* data)
{
  using namespace Gst;
  typedef sigc::slot< void,const Glib::RefPtr<Gst::Pad>& > SlotType;

  // Do not try to call a signal on a disassociated wrapper.
  if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
  {
    #ifdef GLIBMM_EXCEPTIONS_ENABLED
    try
    {
    #endif //GLIBMM_EXCEPTIONS_ENABLED
      if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
        (*static_cast<SlotType*>(slot))(Glib::wrap(p0, true)
);
    #ifdef GLIBMM_EXCEPTIONS_ENABLED
    }
    catch(...)
    {
      Glib::exception_handlers_invoke();
    }
    #endif //GLIBMM_EXCEPTIONS_ENABLED
  }
}

static const Glib::SignalProxyInfo DecodeBin2_signal_removed_decoded_pad_info =
{
  "removed-decoded-pad",
  (GCallback) &DecodeBin2_signal_removed_decoded_pad_callback,
  (GCallback) &DecodeBin2_signal_removed_decoded_pad_callback
};


static void DecodeBin2_signal_unknown_type_callback(GstDecodeBin2* self, GstPad* p0,GstCaps* p1,void* data)
{
  using namespace Gst;
  typedef sigc::slot< void,const Glib::RefPtr<Gst::Pad>&,const Glib::RefPtr<Gst::Caps>& > SlotType;

  // Do not try to call a signal on a disassociated wrapper.
  if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
  {
    #ifdef GLIBMM_EXCEPTIONS_ENABLED
    try
    {
    #endif //GLIBMM_EXCEPTIONS_ENABLED
      if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
        (*static_cast<SlotType*>(slot))(Glib::wrap(p0, true)
, Glib::wrap(p1, true)
);
    #ifdef GLIBMM_EXCEPTIONS_ENABLED
    }
    catch(...)
    {
      Glib::exception_handlers_invoke();
    }
    #endif //GLIBMM_EXCEPTIONS_ENABLED
  }
}

static const Glib::SignalProxyInfo DecodeBin2_signal_unknown_type_info =
{
  "unknown-type",
  (GCallback) &DecodeBin2_signal_unknown_type_callback,
  (GCallback) &DecodeBin2_signal_unknown_type_callback
};


static gboolean DecodeBin2_signal_autoplug_continue_callback(GstDecodeBin2* self, GstPad* p0,GstCaps* p1,void* data)
{
  using namespace Gst;
  typedef sigc::slot< bool,const Glib::RefPtr<Gst::Pad>&,const Glib::RefPtr<Gst::Caps>& > SlotType;

  // Do not try to call a signal on a disassociated wrapper.
  if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
  {
    #ifdef GLIBMM_EXCEPTIONS_ENABLED
    try
    {
    #endif //GLIBMM_EXCEPTIONS_ENABLED
      if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
        return static_cast<int>((*static_cast<SlotType*>(slot))(Glib::wrap(p0, true)
, Glib::wrap(p1, true)
));
    #ifdef GLIBMM_EXCEPTIONS_ENABLED
    }
    catch(...)
    {
      Glib::exception_handlers_invoke();
    }
    #endif //GLIBMM_EXCEPTIONS_ENABLED
  }

  typedef gboolean RType;
  return RType();
}

static gboolean DecodeBin2_signal_autoplug_continue_notify_callback(GstDecodeBin2* self, GstPad* p0,GstCaps* p1, void* data)
{
  using namespace Gst;
  typedef sigc::slot< void,const Glib::RefPtr<Gst::Pad>&,const Glib::RefPtr<Gst::Caps>& > SlotType;

  // Do not try to call a signal on a disassociated wrapper.
  if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
  {
    #ifdef GLIBMM_EXCEPTIONS_ENABLED
    try
    {
    #endif //GLIBMM_EXCEPTIONS_ENABLED
      if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
        (*static_cast<SlotType*>(slot))(Glib::wrap(p0, true)
, Glib::wrap(p1, true)
);
    #ifdef GLIBMM_EXCEPTIONS_ENABLED
    }
    catch(...)
    {
      Glib::exception_handlers_invoke();
    }
    #endif //GLIBMM_EXCEPTIONS_ENABLED
  }

  typedef gboolean RType;
  return RType();
}

static const Glib::SignalProxyInfo DecodeBin2_signal_autoplug_continue_info =
{
  "autoplug-continue",
  (GCallback) &DecodeBin2_signal_autoplug_continue_callback,
  (GCallback) &DecodeBin2_signal_autoplug_continue_notify_callback
};


static GValueArray* DecodeBin2_signal_autoplug_factories_callback(GstDecodeBin2* self, GstPad* p0,GstCaps* p1,void* data)
{
  using namespace Gst;
  typedef sigc::slot< Glib::ValueArray,const Glib::RefPtr<Gst::Pad>&,const Glib::RefPtr<Gst::Caps>& > SlotType;

  // Do not try to call a signal on a disassociated wrapper.
  if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
  {
    #ifdef GLIBMM_EXCEPTIONS_ENABLED
    try
    {
    #endif //GLIBMM_EXCEPTIONS_ENABLED
      if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
        return ((*static_cast<SlotType*>(slot))(Glib::wrap(p0, true)
, Glib::wrap(p1, true)
)).gobj_copy();
    #ifdef GLIBMM_EXCEPTIONS_ENABLED
    }
    catch(...)
    {
      Glib::exception_handlers_invoke();
    }
    #endif //GLIBMM_EXCEPTIONS_ENABLED
  }

  typedef GValueArray* RType;
  return RType();
}

static GValueArray* DecodeBin2_signal_autoplug_factories_notify_callback(GstDecodeBin2* self, GstPad* p0,GstCaps* p1, void* data)
{
  using namespace Gst;
  typedef sigc::slot< void,const Glib::RefPtr<Gst::Pad>&,const Glib::RefPtr<Gst::Caps>& > SlotType;

  // Do not try to call a signal on a disassociated wrapper.
  if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
  {
    #ifdef GLIBMM_EXCEPTIONS_ENABLED
    try
    {
    #endif //GLIBMM_EXCEPTIONS_ENABLED
      if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
        (*static_cast<SlotType*>(slot))(Glib::wrap(p0, true)
, Glib::wrap(p1, true)
);
    #ifdef GLIBMM_EXCEPTIONS_ENABLED
    }
    catch(...)
    {
      Glib::exception_handlers_invoke();
    }
    #endif //GLIBMM_EXCEPTIONS_ENABLED
  }

  typedef GValueArray* RType;
  return RType();
}

static const Glib::SignalProxyInfo DecodeBin2_signal_autoplug_factories_info =
{
  "autoplug-factories",
  (GCallback) &DecodeBin2_signal_autoplug_factories_callback,
  (GCallback) &DecodeBin2_signal_autoplug_factories_notify_callback
};


static GValueArray* DecodeBin2_signal_autoplug_sort_callback(GstDecodeBin2* self, GstPad* p0,GstCaps* p1,GValueArray* p2,void* data)
{
  using namespace Gst;
  typedef sigc::slot< Glib::ValueArray,const Glib::RefPtr<Gst::Pad>&,const Glib::RefPtr<Gst::Caps>&,const Glib::ValueArray& > SlotType;

  // Do not try to call a signal on a disassociated wrapper.
  if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
  {
    #ifdef GLIBMM_EXCEPTIONS_ENABLED
    try
    {
    #endif //GLIBMM_EXCEPTIONS_ENABLED
      if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
        return ((*static_cast<SlotType*>(slot))(Glib::wrap(p0, true)
, Glib::wrap(p1, true)
, Glib::wrap(p2, true)
)).gobj_copy();
    #ifdef GLIBMM_EXCEPTIONS_ENABLED
    }
    catch(...)
    {
      Glib::exception_handlers_invoke();
    }
    #endif //GLIBMM_EXCEPTIONS_ENABLED
  }

  typedef GValueArray* RType;
  return RType();
}

static GValueArray* DecodeBin2_signal_autoplug_sort_notify_callback(GstDecodeBin2* self, GstPad* p0,GstCaps* p1,GValueArray* p2, void* data)
{
  using namespace Gst;
  typedef sigc::slot< void,const Glib::RefPtr<Gst::Pad>&,const Glib::RefPtr<Gst::Caps>&,const Glib::ValueArray& > SlotType;

  // Do not try to call a signal on a disassociated wrapper.
  if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
  {
    #ifdef GLIBMM_EXCEPTIONS_ENABLED
    try
    {
    #endif //GLIBMM_EXCEPTIONS_ENABLED
      if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
        (*static_cast<SlotType*>(slot))(Glib::wrap(p0, true)
, Glib::wrap(p1, true)
, Glib::wrap(p2, true)
);
    #ifdef GLIBMM_EXCEPTIONS_ENABLED
    }
    catch(...)
    {
      Glib::exception_handlers_invoke();
    }
    #endif //GLIBMM_EXCEPTIONS_ENABLED
  }

  typedef GValueArray* RType;
  return RType();
}

static const Glib::SignalProxyInfo DecodeBin2_signal_autoplug_sort_info =
{
  "autoplug-sort",
  (GCallback) &DecodeBin2_signal_autoplug_sort_callback,
  (GCallback) &DecodeBin2_signal_autoplug_sort_notify_callback
};


static GstAutoplugSelectResult DecodeBin2_signal_autoplug_select_callback(GstDecodeBin2* self, GstPad* p0,GstCaps* p1,GstElementFactory* p2,void* data)
{
  using namespace Gst;
  typedef sigc::slot< Gst::AutoplugSelectResult,const Glib::RefPtr<Gst::Pad>&,const Glib::RefPtr<Gst::Caps>&,const Glib::RefPtr<Gst::ElementFactory>& > SlotType;

  // Do not try to call a signal on a disassociated wrapper.
  if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
  {
    #ifdef GLIBMM_EXCEPTIONS_ENABLED
    try
    {
    #endif //GLIBMM_EXCEPTIONS_ENABLED
      if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
        return ((GstAutoplugSelectResult)((*static_cast<SlotType*>(slot))(Glib::wrap(p0, true)
, Glib::wrap(p1, true)
, Glib::wrap(p2, true)
)));
    #ifdef GLIBMM_EXCEPTIONS_ENABLED
    }
    catch(...)
    {
      Glib::exception_handlers_invoke();
    }
    #endif //GLIBMM_EXCEPTIONS_ENABLED
  }

  typedef GstAutoplugSelectResult RType;
  return RType();
}

static GstAutoplugSelectResult DecodeBin2_signal_autoplug_select_notify_callback(GstDecodeBin2* self, GstPad* p0,GstCaps* p1,GstElementFactory* p2, void* data)
{
  using namespace Gst;
  typedef sigc::slot< void,const Glib::RefPtr<Gst::Pad>&,const Glib::RefPtr<Gst::Caps>&,const Glib::RefPtr<Gst::ElementFactory>& > SlotType;

  // Do not try to call a signal on a disassociated wrapper.
  if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
  {
    #ifdef GLIBMM_EXCEPTIONS_ENABLED
    try
    {
    #endif //GLIBMM_EXCEPTIONS_ENABLED
      if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
        (*static_cast<SlotType*>(slot))(Glib::wrap(p0, true)
, Glib::wrap(p1, true)
, Glib::wrap(p2, true)
);
    #ifdef GLIBMM_EXCEPTIONS_ENABLED
    }
    catch(...)
    {
      Glib::exception_handlers_invoke();
    }
    #endif //GLIBMM_EXCEPTIONS_ENABLED
  }

  typedef GstAutoplugSelectResult RType;
  return RType();
}

static const Glib::SignalProxyInfo DecodeBin2_signal_autoplug_select_info =
{
  "autoplug-select",
  (GCallback) &DecodeBin2_signal_autoplug_select_callback,
  (GCallback) &DecodeBin2_signal_autoplug_select_notify_callback
};


static const Glib::SignalProxyInfo DecodeBin2_signal_drained_info =
{
  "drained",
  (GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
  (GCallback) &Glib::SignalProxyNormal::slot0_void_callback
};


} // anonymous namespace


namespace Glib
{

Glib::RefPtr<Gst::DecodeBin2> wrap(GstDecodeBin2* object, bool take_copy)
{
  return Glib::RefPtr<Gst::DecodeBin2>( dynamic_cast<Gst::DecodeBin2*> (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& DecodeBin2_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_ = &DecodeBin2_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_decode_bin2_get_type());

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

  }

  return *this;
}


void DecodeBin2_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->new_decoded_pad = &new_decoded_pad_callback;
  klass->removed_decoded_pad = &removed_decoded_pad_callback;
  klass->unknown_type = &unknown_type_callback;
  klass->autoplug_continue = &autoplug_continue_callback;
  klass->autoplug_factories = &autoplug_factories_callback;
  klass->autoplug_sort = &autoplug_sort_callback;
  klass->autoplug_select = &autoplug_select_callback;
  klass->drained = &drained_callback;
}


void DecodeBin2_Class::new_decoded_pad_callback(GstDecodeBin2* self, GstPad* p0, gboolean p1)
{
  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->on_new_decoded_pad(Glib::wrap(p0, true)
, p1
);
        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->new_decoded_pad)
    (*base->new_decoded_pad)(self, p0, p1);
}
void DecodeBin2_Class::removed_decoded_pad_callback(GstDecodeBin2* self, GstPad* p0)
{
  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->on_removed_decoded_pad(Glib::wrap(p0, 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->removed_decoded_pad)
    (*base->removed_decoded_pad)(self, p0);
}
void DecodeBin2_Class::unknown_type_callback(GstDecodeBin2* self, GstPad* p0, GstCaps* p1)
{
  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->on_unknown_type(Glib::wrap(p0, true)
, Glib::wrap(p1, 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->unknown_type)
    (*base->unknown_type)(self, p0, p1);
}
gboolean DecodeBin2_Class::autoplug_continue_callback(GstDecodeBin2* self, GstPad* p0, GstCaps* p1)
{
  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->on_autoplug_continue(Glib::wrap(p0, true)
, Glib::wrap(p1, 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->autoplug_continue)
    return (*base->autoplug_continue)(self, p0, p1);

  typedef gboolean RType;
  return RType();
}
GValueArray* DecodeBin2_Class::autoplug_factories_callback(GstDecodeBin2* self, GstPad* p0, GstCaps* p1)
{
  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 (obj->on_autoplug_factories(Glib::wrap(p0, true)
, Glib::wrap(p1, true)
)).gobj_copy();
      #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->autoplug_factories)
    return (*base->autoplug_factories)(self, p0, p1);

  typedef GValueArray* RType;
  return RType();
}
GValueArray* DecodeBin2_Class::autoplug_sort_callback(GstDecodeBin2* self, GstPad* p0, GstCaps* p1, GValueArray* p2)
{
  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 (obj->on_autoplug_sort(Glib::wrap(p0, true)
, Glib::wrap(p1, true)
, Glib::wrap(p2, true)
)).gobj_copy();
      #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->autoplug_sort)
    return (*base->autoplug_sort)(self, p0, p1, p2);

  typedef GValueArray* RType;
  return RType();
}
GstAutoplugSelectResult DecodeBin2_Class::autoplug_select_callback(GstDecodeBin2* self, GstPad* p0, GstCaps* p1, GstElementFactory* p2)
{
  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 ((GstAutoplugSelectResult)(obj->on_autoplug_select(Glib::wrap(p0, true)
, Glib::wrap(p1, true)
, Glib::wrap(p2, 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->autoplug_select)
    return (*base->autoplug_select)(self, p0, p1, p2);

  typedef GstAutoplugSelectResult RType;
  return RType();
}
void DecodeBin2_Class::drained_callback(GstDecodeBin2* 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.
        obj->on_drained();
        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->drained)
    (*base->drained)(self);
}


Glib::ObjectBase* DecodeBin2_Class::wrap_new(GObject* object)
{
  return new DecodeBin2((GstDecodeBin2*)object);
}


/* The implementation: */

GstDecodeBin2* DecodeBin2::gobj_copy()
{
  reference();
  return gobj();
}

DecodeBin2::DecodeBin2(const Glib::ConstructParams& construct_params)
:
  Gst::Bin(construct_params)
{

}

DecodeBin2::DecodeBin2(GstDecodeBin2* castitem)
:
  Gst::Bin((GstBin*)(castitem))
{}


DecodeBin2::~DecodeBin2()
{}


DecodeBin2::CppClassType DecodeBin2::decodebin2_class_; // initialize static member

GType DecodeBin2::get_type()
{
  return decodebin2_class_.init().get_type();
}


GType DecodeBin2::get_base_type()
{
  return gst_decode_bin2_get_type();
}


Glib::RefPtr<DecodeBin2> DecodeBin2::create()
{
  return Glib::RefPtr<DecodeBin2>( new DecodeBin2() );
}
Glib::RefPtr<DecodeBin2> DecodeBin2::create(const Glib::ustring& name)
{
  return Glib::RefPtr<DecodeBin2>( new DecodeBin2(name) );
}


Glib::SignalProxy2< void,const Glib::RefPtr<Gst::Pad>&,bool > DecodeBin2::signal_new_decoded_pad()
{
  return Glib::SignalProxy2< void,const Glib::RefPtr<Gst::Pad>&,bool >(this, &DecodeBin2_signal_new_decoded_pad_info);
}


Glib::SignalProxy1< void,const Glib::RefPtr<Gst::Pad>& > DecodeBin2::signal_removed_decoded_pad()
{
  return Glib::SignalProxy1< void,const Glib::RefPtr<Gst::Pad>& >(this, &DecodeBin2_signal_removed_decoded_pad_info);
}


Glib::SignalProxy2< void,const Glib::RefPtr<Gst::Pad>&,const Glib::RefPtr<Gst::Caps>& > DecodeBin2::signal_unknown_type()
{
  return Glib::SignalProxy2< void,const Glib::RefPtr<Gst::Pad>&,const Glib::RefPtr<Gst::Caps>& >(this, &DecodeBin2_signal_unknown_type_info);
}


Glib::SignalProxy2< bool,const Glib::RefPtr<Gst::Pad>&,const Glib::RefPtr<Gst::Caps>& > DecodeBin2::signal_autoplug_continue()
{
  return Glib::SignalProxy2< bool,const Glib::RefPtr<Gst::Pad>&,const Glib::RefPtr<Gst::Caps>& >(this, &DecodeBin2_signal_autoplug_continue_info);
}


Glib::SignalProxy2< Glib::ValueArray,const Glib::RefPtr<Gst::Pad>&,const Glib::RefPtr<Gst::Caps>& > DecodeBin2::signal_autoplug_factories()
{
  return Glib::SignalProxy2< Glib::ValueArray,const Glib::RefPtr<Gst::Pad>&,const Glib::RefPtr<Gst::Caps>& >(this, &DecodeBin2_signal_autoplug_factories_info);
}


Glib::SignalProxy3< Glib::ValueArray,const Glib::RefPtr<Gst::Pad>&,const Glib::RefPtr<Gst::Caps>&,const Glib::ValueArray& > DecodeBin2::signal_autoplug_sort()
{
  return Glib::SignalProxy3< Glib::ValueArray,const Glib::RefPtr<Gst::Pad>&,const Glib::RefPtr<Gst::Caps>&,const Glib::ValueArray& >(this, &DecodeBin2_signal_autoplug_sort_info);
}


Glib::SignalProxy3< Gst::AutoplugSelectResult,const Glib::RefPtr<Gst::Pad>&,const Glib::RefPtr<Gst::Caps>&,const Glib::RefPtr<Gst::ElementFactory>& > DecodeBin2::signal_autoplug_select()
{
  return Glib::SignalProxy3< Gst::AutoplugSelectResult,const Glib::RefPtr<Gst::Pad>&,const Glib::RefPtr<Gst::Caps>&,const Glib::RefPtr<Gst::ElementFactory>& >(this, &DecodeBin2_signal_autoplug_select_info);
}


Glib::SignalProxy0< void > DecodeBin2::signal_drained()
{
  return Glib::SignalProxy0< void >(this, &DecodeBin2_signal_drained_info);
}


#ifdef GLIBMM_PROPERTIES_ENABLED
Glib::PropertyProxy< Glib::RefPtr<Gst::Caps> > DecodeBin2::property_caps() 
{
  return Glib::PropertyProxy< Glib::RefPtr<Gst::Caps> >(this, "caps");
}
#endif //GLIBMM_PROPERTIES_ENABLED

#ifdef GLIBMM_PROPERTIES_ENABLED
Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gst::Caps> > DecodeBin2::property_caps() const
{
  return Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gst::Caps> >(this, "caps");
}
#endif //GLIBMM_PROPERTIES_ENABLED

#ifdef GLIBMM_PROPERTIES_ENABLED
Glib::PropertyProxy<Glib::ustring> DecodeBin2::property_subtitle_encoding() 
{
  return Glib::PropertyProxy<Glib::ustring>(this, "subtitle-encoding");
}
#endif //GLIBMM_PROPERTIES_ENABLED

#ifdef GLIBMM_PROPERTIES_ENABLED
Glib::PropertyProxy_ReadOnly<Glib::ustring> DecodeBin2::property_subtitle_encoding() const
{
  return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, "subtitle-encoding");
}
#endif //GLIBMM_PROPERTIES_ENABLED

#ifdef GLIBMM_PROPERTIES_ENABLED
Glib::PropertyProxy< Glib::RefPtr<Gst::Caps> > DecodeBin2::property_sink_caps() 
{
  return Glib::PropertyProxy< Glib::RefPtr<Gst::Caps> >(this, "sink-caps");
}
#endif //GLIBMM_PROPERTIES_ENABLED

#ifdef GLIBMM_PROPERTIES_ENABLED
Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gst::Caps> > DecodeBin2::property_sink_caps() const
{
  return Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gst::Caps> >(this, "sink-caps");
}
#endif //GLIBMM_PROPERTIES_ENABLED

#ifdef GLIBMM_PROPERTIES_ENABLED
Glib::PropertyProxy<bool> DecodeBin2::property_use_buffering() 
{
  return Glib::PropertyProxy<bool>(this, "use-buffering");
}
#endif //GLIBMM_PROPERTIES_ENABLED

#ifdef GLIBMM_PROPERTIES_ENABLED
Glib::PropertyProxy_ReadOnly<bool> DecodeBin2::property_use_buffering() const
{
  return Glib::PropertyProxy_ReadOnly<bool>(this, "use-buffering");
}
#endif //GLIBMM_PROPERTIES_ENABLED

#ifdef GLIBMM_PROPERTIES_ENABLED
Glib::PropertyProxy<int> DecodeBin2::property_low_percent() 
{
  return Glib::PropertyProxy<int>(this, "low-percent");
}
#endif //GLIBMM_PROPERTIES_ENABLED

#ifdef GLIBMM_PROPERTIES_ENABLED
Glib::PropertyProxy_ReadOnly<int> DecodeBin2::property_low_percent() const
{
  return Glib::PropertyProxy_ReadOnly<int>(this, "low-percent");
}
#endif //GLIBMM_PROPERTIES_ENABLED

#ifdef GLIBMM_PROPERTIES_ENABLED
Glib::PropertyProxy<int> DecodeBin2::property_high_percent() 
{
  return Glib::PropertyProxy<int>(this, "high-percent");
}
#endif //GLIBMM_PROPERTIES_ENABLED

#ifdef GLIBMM_PROPERTIES_ENABLED
Glib::PropertyProxy_ReadOnly<int> DecodeBin2::property_high_percent() const
{
  return Glib::PropertyProxy_ReadOnly<int>(this, "high-percent");
}
#endif //GLIBMM_PROPERTIES_ENABLED

#ifdef GLIBMM_PROPERTIES_ENABLED
Glib::PropertyProxy<guint> DecodeBin2::property_max_size_bytes() 
{
  return Glib::PropertyProxy<guint>(this, "max-size-bytes");
}
#endif //GLIBMM_PROPERTIES_ENABLED

#ifdef GLIBMM_PROPERTIES_ENABLED
Glib::PropertyProxy_ReadOnly<guint> DecodeBin2::property_max_size_bytes() const
{
  return Glib::PropertyProxy_ReadOnly<guint>(this, "max-size-bytes");
}
#endif //GLIBMM_PROPERTIES_ENABLED

#ifdef GLIBMM_PROPERTIES_ENABLED
Glib::PropertyProxy<guint> DecodeBin2::property_max_size_buffers() 
{
  return Glib::PropertyProxy<guint>(this, "max-size-buffers");
}
#endif //GLIBMM_PROPERTIES_ENABLED

#ifdef GLIBMM_PROPERTIES_ENABLED
Glib::PropertyProxy_ReadOnly<guint> DecodeBin2::property_max_size_buffers() const
{
  return Glib::PropertyProxy_ReadOnly<guint>(this, "max-size-buffers");
}
#endif //GLIBMM_PROPERTIES_ENABLED

#ifdef GLIBMM_PROPERTIES_ENABLED
Glib::PropertyProxy<guint64> DecodeBin2::property_max_size_time() 
{
  return Glib::PropertyProxy<guint64>(this, "max-size-time");
}
#endif //GLIBMM_PROPERTIES_ENABLED

#ifdef GLIBMM_PROPERTIES_ENABLED
Glib::PropertyProxy_ReadOnly<guint64> DecodeBin2::property_max_size_time() const
{
  return Glib::PropertyProxy_ReadOnly<guint64>(this, "max-size-time");
}
#endif //GLIBMM_PROPERTIES_ENABLED

#ifdef GLIBMM_PROPERTIES_ENABLED
Glib::PropertyProxy<bool> DecodeBin2::property_post_stream_topology() 
{
  return Glib::PropertyProxy<bool>(this, "post-stream-topology");
}
#endif //GLIBMM_PROPERTIES_ENABLED

#ifdef GLIBMM_PROPERTIES_ENABLED
Glib::PropertyProxy_ReadOnly<bool> DecodeBin2::property_post_stream_topology() const
{
  return Glib::PropertyProxy_ReadOnly<bool>(this, "post-stream-topology");
}
#endif //GLIBMM_PROPERTIES_ENABLED

#ifdef GLIBMM_PROPERTIES_ENABLED
Glib::PropertyProxy<bool> DecodeBin2::property_expose_all_streams() 
{
  return Glib::PropertyProxy<bool>(this, "expose-all-streams");
}
#endif //GLIBMM_PROPERTIES_ENABLED

#ifdef GLIBMM_PROPERTIES_ENABLED
Glib::PropertyProxy_ReadOnly<bool> DecodeBin2::property_expose_all_streams() const
{
  return Glib::PropertyProxy_ReadOnly<bool>(this, "expose-all-streams");
}
#endif //GLIBMM_PROPERTIES_ENABLED


void Gst::DecodeBin2::on_new_decoded_pad(const Glib::RefPtr<Gst::Pad>& arg0, bool arg1)
{
  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->new_decoded_pad)
    (*base->new_decoded_pad)(gobj(),Glib::unwrap(arg0),static_cast<int>(arg1));
}
void Gst::DecodeBin2::on_removed_decoded_pad(const Glib::RefPtr<Gst::Pad>& arg0)
{
  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->removed_decoded_pad)
    (*base->removed_decoded_pad)(gobj(),Glib::unwrap(arg0));
}
void Gst::DecodeBin2::on_unknown_type(const Glib::RefPtr<Gst::Pad>& arg0, const Glib::RefPtr<Gst::Caps>& arg1)
{
  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->unknown_type)
    (*base->unknown_type)(gobj(),Glib::unwrap(arg0),Glib::unwrap(arg1));
}
bool Gst::DecodeBin2::on_autoplug_continue(const Glib::RefPtr<Gst::Pad>& arg0, const Glib::RefPtr<Gst::Caps>& arg1)
{
  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->autoplug_continue)
    return (*base->autoplug_continue)(gobj(),Glib::unwrap(arg0),Glib::unwrap(arg1));

  typedef bool RType;
  return RType();
}
Glib::ValueArray Gst::DecodeBin2::on_autoplug_factories(const Glib::RefPtr<Gst::Pad>& arg0, const Glib::RefPtr<Gst::Caps>& arg1)
{
  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->autoplug_factories)
    return Glib::wrap((*base->autoplug_factories)(gobj(),Glib::unwrap(arg0),Glib::unwrap(arg1)));

  typedef Glib::ValueArray RType;
  return RType();
}
Glib::ValueArray Gst::DecodeBin2::on_autoplug_sort(const Glib::RefPtr<Gst::Pad>& arg0, const Glib::RefPtr<Gst::Caps>& arg1, const Glib::ValueArray& arg2)
{
  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->autoplug_sort)
    return Glib::wrap((*base->autoplug_sort)(gobj(),Glib::unwrap(arg0),Glib::unwrap(arg1),const_cast<GValueArray*>(arg2.gobj())));

  typedef Glib::ValueArray RType;
  return RType();
}
Gst::AutoplugSelectResult Gst::DecodeBin2::on_autoplug_select(const Glib::RefPtr<Gst::Pad>& arg0, const Glib::RefPtr<Gst::Caps>& arg1, const Glib::RefPtr<Gst::ElementFactory>& arg2)
{
  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->autoplug_select)
    return ((Gst::AutoplugSelectResult)((*base->autoplug_select)(gobj(),Glib::unwrap(arg0),Glib::unwrap(arg1),Glib::unwrap(arg2))));

  typedef Gst::AutoplugSelectResult RType;
  return RType();
}
void Gst::DecodeBin2::on_drained()
{
  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->drained)
    (*base->drained)(gobj());
}


} // namespace Gst


