faac: Add format to output caps

Adds 'stream-format' to output caps to inform if the stream is
adts or raw. This makes it possible for muxers to reject
input streams on caps if they don't support adts instead of
generating a invalid file.

Fixes #604925
This commit is contained in:
Thiago Santos 2010-01-11 09:48:34 -03:00
parent c31559841a
commit 635b0c1129

View file

@ -77,7 +77,8 @@
"audio/mpeg, " \ "audio/mpeg, " \
"mpegversion = (int) { 4, 2 }, " \ "mpegversion = (int) { 4, 2 }, " \
"channels = (int) [ 1, 6 ], " \ "channels = (int) [ 1, 6 ], " \
"rate = (int) [ 8000, 96000 ]" "rate = (int) [ 8000, 96000 ], " \
"stream-format = (string) { adts, none } "
static GstStaticPadTemplate src_template = GST_STATIC_PAD_TEMPLATE ("src", static GstStaticPadTemplate src_template = GST_STATIC_PAD_TEMPLATE ("src",
GST_PAD_SRC, GST_PAD_SRC,
GST_PAD_ALWAYS, GST_PAD_ALWAYS,
@ -497,7 +498,9 @@ gst_faac_configure_source_pad (GstFaac * faac)
srccaps = gst_caps_new_simple ("audio/mpeg", srccaps = gst_caps_new_simple ("audio/mpeg",
"mpegversion", G_TYPE_INT, mpegversion, "mpegversion", G_TYPE_INT, mpegversion,
"channels", G_TYPE_INT, faac->channels, "channels", G_TYPE_INT, faac->channels,
"rate", G_TYPE_INT, faac->samplerate, NULL); "rate", G_TYPE_INT, faac->samplerate,
"stream-format", G_TYPE_STRING, (faac->outputformat ? "adts" : "none"),
NULL);
if (!faac->outputformat) { if (!faac->outputformat) {
GstBuffer *codec_data; GstBuffer *codec_data;