[gst-devel] [gst-embedded] gstreamer dma buffer & management
Marco Ballesio
gibrovacco at gmail.com
Sat Sep 18 18:56:22 CEST 2010
Hi,
yes, I DO hate the default gmail settings..
---------- Forwarded message ----------
From: Marco Ballesio <gibrovacco at gmail.com>
Date: Sat, Sep 18, 2010 at 4:52 PM
Subject: Re: [gst-embedded] gstreamer dma buffer & management
To: Feng Ye <fye at broadcom.com>
Hi,
On Fri, Sep 17, 2010 at 2:49 AM, Feng Ye <fye at broadcom.com> wrote:
> Hello there,
>
> I am working on a video dec plugin (based on hardware dec). I plan to use
> filesrc to read a raw H264 file and feed to my plugin.
>
it's generically better to use a container format rather than a raw h264
byte-stream. If a container is not an option for your case, maybe you could
use at least an annex-B compliant stream. This makes it easier to identify
NAL boundaries. It should anyway possible to use even an unformatted NAL
sequence (see below).
> The buffers from plugin's sink pad are the source data for decoding so they
> need to be DMA-able. Is there way to control how the buffers are allocated?
> Since they are allocated in filesrc so that's not possible? Looks like I
> will need to allocate my own buffer in my plugin and then copy them over?
>
if you're not using any container format, the source has no way to pass to
you buffers aligned with NAL boundaries, so you definitely need an adapter
somewhere (see below).
>
> Also, a video frame may contain less bytes than what's in the buffer, what
> do I do with the remaining bytes?
> >From the ffmpeg example (they are software based so the first dma question
> does not exist), they create a sub buffer of the remaining bytes and then
> does a buffer join. These are time consuming I think.
yes it is, but I guess you could afford it for compressed data. The overhead
depends, of course, on the bandwidth you're using.
> I wonder if there are other faster solution? One thing I think might help
> is to have another plugin in between, which parse the file and only give one
> frame size of data to my plugin. But I am not sure if these kind of plugin
> exists.
>
You can use h264parse for this. It will identify NAL boundaries and pass
them to your plugin on separated buffers. Btw everything has a price and in
this case it's the penalty like described some rows above.
Regards.
>
>
> Thanks,
> Feng
>
>
>
>
> ------------------------------------------------------------------------------
> Start uncovering the many advantages of virtual appliances
> and start using them to simplify application deployment and
> accelerate your shift to cloud computing.
> http://p.sf.net/sfu/novell-sfdev2dev
> _______________________________________________
> Gstreamer-embedded mailing list
> Gstreamer-embedded at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gstreamer-embedded
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20100918/04884de8/attachment.htm>
More information about the gstreamer-devel
mailing list