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

Chen, Weian weian.chen at intel.com
Fri Aug 21 14:55:27 CEST 2009


Josep,

Awesome work.

It is great that you can know VAAPI. But my usage is a little bit different. The camera's buffer IDs I want to transport in caps would be used by vaCreateSurface, suppose it should be in _get_caps function but not _chain function. And further more, these buffer IDs will not change once they are created.

And what you are talking about are next step I need to do, you help me a lot. :)

thanks,
Weian
-----Original Message-----
From: Josep Torra [mailto:n770galaxy at gmail.com] 
Sent: 2009年8月21日 16:08
To: Discussion of the development of GStreamer
Subject: Re: [gst-devel] who will call x264enc's _setcap function?

Hi Weian,

Caps aren't appropriate to transport information that changes for each buffer.

I can't really figure out what are you trying to do but I will expose you a possible scenario.

Having a src element that is capable to generate image buffers with video data stored in graphics
memory that can be referenced by an ID (hardware surface).

Having a video encoder that can encode a hardware surface like recent additions VAAPI.

The problem related to this scenario is how to pass surface ID between elements to avoid
pull/push the video data in main memory.

In this use case what is recommended is that both elements negotiate a kind of stream like
between video/x-raw-yuv and video/x-raw-va choices.

The content of buffers will be different depending on which kind of stream is negotiated:

video/x-raw-yuv :  a frame per buffer in the form of raw video data in planar form.
video/x-raw-va  : a frame per buffer in the form of an specialized structure containing the
hardware surface ID.

I'm in process to introduce video acceleration to gstreamer in a generic way, maybe are you
interested on reading the draft about the topic [1].

Current status is write/design the code for simple playback uses cases and the plan is extend it
into more use cases in the future.

[1]  http://cgit.freedesktop.org/gstreamer/gst-plugins-base/tree/docs/design/draft-va.txt

Best regards.

Josep

Chen, Weian wrote:
> Hi Mike,
> 
> What I want to pass from upstream element (camera source element) to next element (encode element) is the buffer ID of the hardware (such as camera's image buffer), which should be use in encode element's _set_caps for encoder's initialization.
> 
> I am not sure whether the information is enough.
> 
> thanks,
> Weian
> 
> -----Original Message-----
> From: Michael Smith [mailto:msmith at xiph.org] 
> Sent: 2009年8月21日 7:10
> To: Discussion of the development of GStreamer
> Subject: Re: [gst-devel] who will call x264enc's _setcap function?
> 
> 2009/8/20 Chen, Weian <weian.chen at intel.com>:
>> Thanks Michael.
>>
>> I have some information (couple of bytes) has to be passed to next element before it call _set_caps.
> 
> As I said, if you provide _specific details_, we can try to advise
> about what you should do. You're refusing to provide specific details,
> so we can't suggest the proper way to do things - all we can do is
> guess at what you actually want to do.
> 
> For an element like x264enc (in your example) it would be totally
> inappropriate to add codec_data to the upstream element's srcpad caps.
> So, either your example is completely different from what you actually
> want to do, or you need to explain _exactly_ what you want to do so
> that we can tell you what the proper approach is.
> 
> 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
> ------------------------------------------------------------------------------
> 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

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