gst_pad_push API is flushing
Tim Müller
tim at centricular.com
Wed Dec 18 02:31:26 PST 2013
On Wed, 2013-12-18 at 00:52 -0800, vindi503 wrote:
Hi,
> I will just add few lines of code about what i am doing before calling
> gst_pad_push API
>
> stream->pad = g_malloc(sizeof(GstPad));
This line does not make sense. That's not how one creates GObjects
(GstPad is a GObject).
> stream->pad =
> gst_pad_new_from_static_template (&gst_qtdemux_videosrc_template,
> "video_0");
This will create a GstPad (and overwrite the previously set pointer thus
leaking the malloced memory).
> gst_pad_push(stream->pad, buffer);
>
> here buffer is of size 1024. And gst_qtdemux_videosrc_template is created in
> the beginning of my program.
>
> static GstStaticPadTemplate gst_qtdemux_videosrc_template =
> GST_STATIC_PAD_TEMPLATE ("video_%u",
> GST_PAD_SRC,
> GST_PAD_SOMETIMES,
> GST_STATIC_CAPS_ANY);
>
> In the Init function, below line is called
> gst_element_class_add_pad_template (gstelement_class,
> gst_static_pad_template_get (&gst_qtdemux_videosrc_template));
>
> As you mentioned to call gst_pad_set_active, If I add
> gst_pad_set_active(stream->pad, TRUE); I
> get error: " Data is not Pushed " which is an indication of not getting
> linked itself.
Not sure I understand. What is this an indication of? And why? "Data is
not Pushed" does not look like a GStreamer error message. Have you
looked at the GST_DEBUG log yet? What is the flow return you get from
pad_push now?
Cheers
-Tim
--
Tim Müller, Centricular Ltd - http://www.centricular.com
More information about the gstreamer-devel
mailing list