[gst-devel] Question on the element who will have two pad types

thiagoss thiagossantos at gmail.com
Wed Oct 14 16:11:31 CEST 2009


2009/10/14 Chen, Weian <weian.chen at intel.com>

>  Hi
>
>
>
> Currently, I will create two src pads, one is ALWAYS, and the other is
> SOMETIMES, but when both of the pads are created, it will hang on _chain()
> when calling gst_pad_push for the first src pad, seems something wrong with
> preproll. But it works well when the SOMETIMES pad is not created.
>
>
>
> Could anybody here give me some hint?
>
You're probably missing a queue after each of the src pads on your pipeline.


>
>
> Thanks in advance.
>
>
>
>
>
> Following is some of the code:
>
>
>
> static GstStaticPadTemplate src00_factory = GST_STATIC_PAD_TEMPLATE
> ("src_00",
>
>         GST_PAD_SRC,
>
>         GST_PAD_ALWAYS,
>
>         GST_STATIC_CAPS ("video/mpeg;"
>
>         "video/x-h264")
>
>         );
>
>
>
> static GstStaticPadTemplate src01_factory = GST_STATIC_PAD_TEMPLATE
> ("src_01",
>
>         GST_PAD_SRC,
>
>         GST_PAD_SOMETIMES,
>
>         GST_STATIC_CAPS ("video/x-raw-yuv")
>
>         );
>
> ………
>
> srcpad_00 = gst_pad_new_from_static_template (&src00_factory, "src_00");
>
> gst_element_add_pad (GST_ELEMENT(filter), srcpad_00);
>
>
>
> gst_pad_set_caps (srcpad_00, outcaps00);
>
>
>
> if (create_sometime) {
>
>     srcpad_01 = gst_pad_new_from_static_template (&src01_factory,
> "src_01");
>
> gst_element_add_pad (GST_ELEMENT(filter), srcpad_01);
>
> gst_pad_set_caps (srcpad_01, outcaps01);
>
> }
>
> …….
>
>
>
> _chain()
>
> {
>
> ………
>
>
>
> ret = gst_pad_push (mixvideoenc->srcpad_00, out_buf_00);    //if will hang
> here, if both of the src pad is created.
>
>
>
> if (srcpad_01 && create_sometim) {
>
>      ret = gst_pad_push (mixvideoenc->srcpad_01, out_buf_01);
>
> }
>
> ………
>
> }
>
>
>
> thanks,
>
> Weian
>
>
>
> -----Original Message-----
> From: Michael Smith [mailto:msmith at xiph.org]
> Sent: 2009年10月14日 13:42
> To: Discussion of the development of GStreamer
> Subject: Re: [gst-devel] Question on the element who will have two pad
> types
>
>
>
> >
>
> > No way to give advice about that - we don't know anything about your
>
> > element. But there's nothing intrinsically difficult about what you've
>
> > described - just push data on the pads you have!
>
> >
>
> > I mean do we need two _chain functions or we can push data to the 2 pads
> in the same _chain function (the data push to the 2 pads is different).
>
>
>
> No - what you've described is just like any normal demuxer. You
>
> wouldn't have multiple chain functions, since you don't have multiple
>
> sinkpads.
>
>
>
> Mike
>
>
>
>
> ------------------------------------------------------------------------------
>
> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
>
> is the only developer event you need to attend this year. Jumpstart your
>
> developing skills, take BlackBerry mobile applications to market and stay
>
> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
>
> http://p.sf.net/sfu/devconference
>
> _______________________________________________
>
> gstreamer-devel mailing list
>
> gstreamer-devel at lists.sourceforge.net
>
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay
> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> http://p.sf.net/sfu/devconference
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>
>


-- 
Thiago Sousa Santos
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20091014/9de37c93/attachment.htm>


More information about the gstreamer-devel mailing list