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

Chen, Weian weian.chen at intel.com
Wed Oct 14 15:31:21 CEST 2009


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?

Thanks in advance.

Following is some of the code:

static GstStaticPadTemplate src00_factory = GST_STATIC_PAD_TEMPLATE ("src_00",



        GST_STATIC_CAPS ("video/mpeg;"



static GstStaticPadTemplate src01_factory = GST_STATIC_PAD_TEMPLATE ("src_01",



        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);






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);






-----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




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!



gstreamer-devel mailing list

gstreamer-devel at lists.sourceforge.net

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20091014/5dc6c276/attachment.htm>

More information about the gstreamer-devel mailing list