baseparse: add getcaps function
authorThiago Santos <thiago.sousa.santos@collabora.com>
Mon, 17 Oct 2011 17:42:08 +0000 (14:42 -0300)
committerThiago Santos <thiago.sousa.santos@collabora.com>
Tue, 18 Oct 2011 11:04:31 +0000 (08:04 -0300)
commite3f2d7db71dfb14441648033eb6cf3324ccc98b3
treec9cc7b7dfa691ac0b5d8aaf94fbae6e69ccf9ad6
parentf08b2203c832f0710200346d862f1a69ca3e33d0
baseparse: add getcaps function

Adds a getcaps function to the sink pad to make parsers propagate
downstream caps restrictions to upstream.

The pipeline "audiotestsrc num-buffers=100 ! faac ! aacparse !
"audio/mpeg, version=(int)4, stream-format=(string)adts" ! filesink"
wouldn't work because aacparse wouldn't propagate the adts restriction
upstream to faac.

This patch adds a default getcaps to the sink pad to simply proxy
downstream caps and also adds a 'get_sink_caps' function pointer
to GstBaseParseClass for subclasses that need more refined getcaps.

https://bugzilla.gnome.org/show_bug.cgi?id=661874
libs/gst/base/gstbaseparse.c
libs/gst/base/gstbaseparse.h