Gstreamer plugin

tajourim tajouri.maher at gmail.com
Mon Mar 4 02:45:11 PST 2013


Thx for uour help,
this is my element pad template:
static GstStaticPadTemplate sinkTemplate =
    GST_STATIC_PAD_TEMPLATE ("sink",
    GST_PAD_SINK,
    GST_PAD_ALWAYS,
    GST_STATIC_CAPS("ANY")
);

static GstStaticPadTemplate srcTemplate =
    GST_STATIC_PAD_TEMPLATE ("src",
    GST_PAD_SRC,
    GST_PAD_ALWAYS,
    GST_STATIC_CAPS("ANY")
    );static void
gst_plugin_template_base_init (gpointer gclass)
{
  GstElementClass *element_class = GST_ELEMENT_CLASS (gclass);

  gst_element_class_set_details_simple(element_class,
    "Plugin",
    "FIXME:Generic",
    "FIXME:Generic Template Element",
    "xxxx_tajouri xxxxxxxxxxxx");

  gst_element_class_add_pad_template (element_class,
      gst_static_pad_template_get (&srcTemplate));
  gst_element_class_add_pad_template (element_class,
      gst_static_pad_template_get (&sinkTemplate));
  printf("loaded plugin   [%s,%d]\n",__func__,__LINE__);
}
static void
gst_plugin_template_init (GstPluginTemplate * filter,
    GstPluginTemplateClass * gclass)
{
  filter->sinkpad = gst_pad_new_from_static_template (&sinkTemplate ,
"sink");
  gst_pad_set_setcaps_function (filter->sinkpad,
                               
GST_DEBUG_FUNCPTR(gst_plugin_template_set_caps));
  gst_pad_set_getcaps_function (filter->sinkpad,
                                GST_DEBUG_FUNCPTR(gst_pad_proxy_getcaps));
  gst_pad_set_event_function (filter->sinkpad,
                               
GST_DEBUG_FUNCPTR(gst_plugin_template_sink_event));
  gst_pad_set_chain_function (filter->sinkpad,
                               
GST_DEBUG_FUNCPTR(gst_plugin_template_chain));
  gst_element_add_pad (GST_ELEMENT (filter), filter->sinkpad);

  filter->srcpad = gst_pad_new_from_static_template (&srcTemplate , "src");
  gst_pad_set_getcaps_function (filter->srcpad,
                                GST_DEBUG_FUNCPTR(gst_pad_proxy_getcaps));
  gst_element_add_pad (GST_ELEMENT (filter), filter->srcpad);

  printf("loaded plugin   [%s,%d]\n",__func__,__LINE__);

  filter->silent = FALSE;
}
the error is caused by gst_pad_push (gstbasesrc.c)





--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Gstreamer-plugin-tp4658855p4658861.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.


More information about the gstreamer-devel mailing list