[gst-devel] Error handing in custom plugin

Julien Isorce julien.isorce at gmail.com
Fri Apr 11 10:33:36 CEST 2008


Hi,

It seems that the negociate caps are not what you expected.
So check the negociate caps using -v option:
gst-launch-0.10 -v .....
The video size negociated should be printed.

Julien

2008/4/11, AlannY <alanny at starlink.ru>:
>
> Hi there, my name is Alan and I have a problems with GStreamer.
>
> I'm writing a custom plugin (still newbie) and I need some error
> handling, but I really not understand how to do it. In the _chain()
> function I have statement:
>
> int ret = gst_pad_push (filter->srcpad, buffer);
>
> When running ret is -5 which means GST_FLOW_ERROR. How to determine
> where error occurred? What GST_FLOW_ERROR means.
>
> (example code)
> static GstFlowReturn
> gst_myplugin_chain (GstPad *pad,
>                    GstBuffer *buf)
> {
>    Gstmyplugin *plugin = GST_MYPLUGIN (GST_OBJECT_PARENT (pad));
>
>    GstBuffer *buffer;
>    gst_pad_alloc_buffer_and_set_caps (plugin->srcpad,
> GST_BUFFER_OFFSET_NONE, plugin->width*plugin->height*3, GST_PAD_CAPS
> (pad), &buffer);
>    gst_buffer_copy_metadata(buffer, buf, GST_BUFFER_COPY_ALL);
>    memcpy(buffer->data, buf->data, buf->size);
>
>    int ret = gst_pad_push (plugin->srcpad, buffer);
>    g_print("%d\n", ret);
>    return ret;
> }
>
> Thank you.
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
> Don't miss this year's exciting event. There's still time to save $100.
> Use priority code J8TL2D2.
>
> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20080411/6ca51b2e/attachment.htm>


More information about the gstreamer-devel mailing list