libs: audio: split allocation query caps and pad caps
authorVíctor Manuel Jáquez Leal <vjaquez@igalia.com>
Fri, 1 Apr 2016 10:25:14 +0000 (12:25 +0200)
committerVíctor Manuel Jáquez Leal <vjaquez@igalia.com>
Tue, 5 Apr 2016 09:37:15 +0000 (11:37 +0200)
commit37c491510995e77b3ab4f340b0edcd4f7aff33ec
tree36fe1fa733cd4e46f952a3bff9614521ca57e3de
parentb4a695cd1103c74ccb4ecf72ba6712385ce3e365
libs: audio: split allocation query caps and pad caps

Since the allocation query caps contains memory size and the pad's caps
contains the display size, an audio encoder or decoder might need to allocate
a different buffer size than the size negotiated in the caps.

This patch splits this logic distinction for audiodecoder and audioencoder.

Thus the user, if needs a different allocation caps, should set it through
gst_audio_{encoder,decoder}_set_allocation_cap() before calling the negotiate()
vmethod. Otherwise the allocation_caps will be the same as the caps in the
src pad.

https://bugzilla.gnome.org/show_bug.cgi?id=764421
gst-libs/gst/audio/gstaudiodecoder.c
gst-libs/gst/audio/gstaudiodecoder.h
gst-libs/gst/audio/gstaudioencoder.c
gst-libs/gst/audio/gstaudioencoder.h