/* 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.
 */

_PINCLUDE(gstreamermm/private/basetransform_p.h)

struct _GstIdentityClass
{
  GstBaseTransformClass parent_class;
  void (*handoff) (GstIdentity* element, GstBuffer* arg0);
};

extern "C"
{

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

  if (!type)
  {
    factory = gst_element_factory_find("identity");
    // 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
{

Identity::Identity()
: _CONSTRUCT("name", NULL)
{}

Identity::Identity(const Glib::ustring& name)
: _CONSTRUCT("name", name.c_str())
{}


}
