Input buffers in 1.0
Tonu Jaansoo
chain at bsd.ee
Tue Apr 9 11:03:09 PDT 2013
decodebin ! audioresample ! audioconvert ! plugin
plugin sink static caps: "audio/x-raw, format=(string)F32LE, layout=(string)interleaved"
I see your point. There must be some buffering plugin between the decoder and the rest - audioresample and audioconvert don't do that.
On Apr 9, 2013, at 8:44 PM, Wim Taymans <wim.taymans at gmail.com> wrote:
> On 04/09/2013 07:23 PM, Tonu Jaansoo wrote:
>> Hello!
>>
>
> It depends on what your input is. If you have an mp3 decoder, it probably can only output one complete frame at a time.
>
> For filesrc and other sources you could attempt to propose a bufferpool upstream, that should contain fixed sized buffers but again, it depends on upstream if this will actually be used.
>
> What kind of input do you have?
>
>> If i want to get exact multiple bytes of data from audioconvert plugin in GstBaseTransform audio filter plugin, what are my options?
>> The purpose of fixing input size is that currently each buffer that is coming into my plugin is in different size (10024 and 10032 alternating if i believe correctly). Because of that I would have to reallocate/change my internal stuff on each buffer - i do FFT on the data. I have tried to implement propose_allocation vmethod, but that method gives me correct size buffer on input (inside my transform vmethod), but the data is not filled using proposed size. How can i ask upstream element to give me nice chunk. Logically it should not be a problem for audioconvert - the size should just be divideable by channels*sizeof(typeofdata), right?
>>
>> In an older and working hack I use not-in-place transform vmethod and two GstAdapters inside it - one for input and one for output. If there is way of fixing input buf size, I could avoid some memcpys.
>>
>> Tonu
>> _______________________________________________
>> gstreamer-devel mailing list
>> gstreamer-devel at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>>
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20130409/f73614af/attachment-0001.html>
More information about the gstreamer-devel
mailing list