faac: fix output caps to negotiate with some muxers

Add parsed/framed=true to allow negotiation with some
muxers that required parsed input. Encoders already provide
parsed/framed output so it should say so in caps.
This commit is contained in:
Thiago Santos 2015-02-05 11:39:55 -03:00
parent 337bff3c82
commit 759ee44988

View file

@ -82,13 +82,15 @@
"channels = (int) [ 1, 6 ], " \ "channels = (int) [ 1, 6 ], " \
"rate = (int) {" SAMPLE_RATES "}, " \ "rate = (int) {" SAMPLE_RATES "}, " \
"stream-format = (string) { adts, raw }, " \ "stream-format = (string) { adts, raw }, " \
"base-profile = (string) { main, lc, ssr, ltp }; " \ "base-profile = (string) { main, lc, ssr, ltp }, " \
"framed = (boolean) true; " \
"audio/mpeg, " \ "audio/mpeg, " \
"mpegversion = (int) 2, " \ "mpegversion = (int) 2, " \
"channels = (int) [ 1, 6 ], " \ "channels = (int) [ 1, 6 ], " \
"rate = (int) {" SAMPLE_RATES "}, " \ "rate = (int) {" SAMPLE_RATES "}, " \
"stream-format = (string) { adts, raw }, " \ "stream-format = (string) { adts, raw }, " \
"profile = (string) { main, lc }" "profile = (string) { main, lc }," \
"parsed = (boolean) true; "
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,
@ -583,6 +585,8 @@ gst_faac_configure_source_pad (GstFaac * faac, GstAudioInfo * info)
} }
free (config); free (config);
gst_caps_set_simple (srccaps, "framed", G_TYPE_BOOLEAN, TRUE, NULL);
} else { } else {
const gchar *profile; const gchar *profile;
@ -602,7 +606,8 @@ gst_faac_configure_source_pad (GstFaac * faac, GstAudioInfo * info)
profile = "lc"; profile = "lc";
break; break;
} }
gst_caps_set_simple (srccaps, "profile", G_TYPE_STRING, profile, NULL); gst_caps_set_simple (srccaps, "profile", G_TYPE_STRING, profile,
"parsed", G_TYPE_BOOLEAN, TRUE, NULL);
/* FIXME: How to get the profile for mpegversion==2? */ /* FIXME: How to get the profile for mpegversion==2? */
} }