Query regarding using videotestsrc with a custom video sink plugin that is capable of allocating "special" (ie. display/hw) buffers

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Query regarding using videotestsrc with a custom video sink plugin that is capable of allocating "special" (ie. display/hw) buffers

Mohan Krishna
Hi

I am using a custom video sink plugin (which uses V4L2 api internally)
on an embedded device. This custom sink plugin implements a pad alloc
function so as to provide hw/display buffers to the upstream peer
plugin. There is a limit on the number of buffers that video sink
plugin can allocate (currently 4).

The pipeline I am using is
gst-launch videotestsrc !
'video/x-raw-yuv,width=(int)1280,height=(int)720,format=(FOURCC)UYVY,framerate=(fraction)30/1'
! custom_video_sink

The issue I am facing is the custom_video_sink plugin runs out of
buffers as videotestsrc seems to continuously invoke pad_alloc_buffer
before giving back the buffers for rendering.

Requesting help from the developer community in addressing this issue.
What is the general practice used in scenarios where there is a limit
on the number of "special" buffers that can be allocated by the video
sink plugin.

Any help would be greatly appreciated

Thanks and Regards
Mohan

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Query regarding using videotestsrc with a custom video sink plugin that is capable of allocating "special" (ie. display/hw) buffers

Wim Taymans
On Wed, 2009-02-11 at 15:27 +0530, Mohan Krishna wrote:

> Hi
>
> I am using a custom video sink plugin (which uses V4L2 api internally)
> on an embedded device. This custom sink plugin implements a pad alloc
> function so as to provide hw/display buffers to the upstream peer
> plugin. There is a limit on the number of buffers that video sink
> plugin can allocate (currently 4).
>
> The pipeline I am using is
> gst-launch videotestsrc !
> 'video/x-raw-yuv,width=(int)1280,height=(int)720,format=(FOURCC)UYVY,framerate=(fraction)30/1'
> ! custom_video_sink
>
> The issue I am facing is the custom_video_sink plugin runs out of
> buffers as videotestsrc seems to continuously invoke pad_alloc_buffer
> before giving back the buffers for rendering.
>
> Requesting help from the developer community in addressing this issue.
> What is the general practice used in scenarios where there is a limit
> on the number of "special" buffers that can be allocated by the video
> sink plugin.

The sink simply blocks in its buffer_alloc function until a hardware
buffer becomes available (one is rendered and unreffed back into the
pool or released somewhere else in the pipeline) or when the sink is
shut down.

If you need more buffers (some complex algorithm requiring many buffers)
you can hand out plain, unoptimised buffers if you want. You probably
then need to wait in the _render() function for a hardware buffer to
become available before you can actually render the buffer.

Wim

>
> Any help would be greatly appreciated
>
> Thanks and Regards
> Mohan
>
> ------------------------------------------------------------------------------
> Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
> -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
> -Strategies to boost innovation and cut costs with open source participation
> -Receive a $600 discount off the registration fee with the source code: SFAD
> http://p.sf.net/sfu/XcvMzF8H
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel


------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel