Gstreamer plugin

Paul d'AUBIGNY visechelle at gmail.com
Mon Mar 4 03:06:18 PST 2013


And what about gst_plugin_template_set_caps () function? What do you do
there?

2013/3/4 tajourim <tajouri.maher at gmail.com>

> 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.
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20130304/6ee1091d/attachment.html>


More information about the gstreamer-devel mailing list