[gst-devel] who will call x264enc's _setcap function?

Chen, Weian weian.chen at intel.com
Fri Aug 21 01:03:38 CEST 2009


Thanks Michael.

I have some information (couple of bytes) has to be passed to next element before it call _set_caps.

Now I add codec_data to the caps of upstream element's srcpad, and then set this caps to the buffer which will be sent to next element, with this, I can get the codec_data in next element's _set_caps function. Thanks for sudarshan's hint. 

thanks,
Weian

-----Original Message-----
From: Michael Smith [mailto:msmith at xiph.org] 
Sent: 2009年8月21日 2:46
To: Discussion of the development of GStreamer
Subject: Re: [gst-devel] who will call x264enc's _setcap function?

On Thu, Aug 20, 2009 at 5:35 AM, Chen, Weian<weian.chen at intel.com> wrote:
> Hi All
>
>
>
> Who will call the override function gst_x264_enc_sink_set_caps (GstPad *
> pad, GstCaps * caps) in gstx264enc? the gstreamer core? Then which func?

The core will call this when the caps get set on the peer pad (by the
upstream element).

>
> And if I want to add some codec_data into caps (above caps), where should I
> modify, suppose it should be modified in the upstream element such as
> v4l2src (we can take it as an example)?

Yes, in the upstream element. However, don't do this arbitrarily - for
your example, x264enc has as its input raw video. Raw video has well
defined caps, adding arbitrary other things to those caps would be a
bad idea.

You should explain, with _specific details_, what you want to do, so
that we can suggest a better approach for what you're trying to do.

Mike

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
gstreamer-devel mailing list
gstreamer-devel at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel


More information about the gstreamer-devel mailing list