diff options
author | Mark Nauwelaerts <mark.nauwelaerts@collabora.co.uk> | 2010-01-12 19:33:37 +0100 |
---|---|---|
committer | Mark Nauwelaerts <mark.nauwelaerts@collabora.co.uk> | 2010-01-12 19:46:01 +0100 |
commit | 8be4e3725f2a03fa49b9db6596acefc679ab7dde (patch) | |
tree | d5f07d5948b3925b5b86c651297b501db1b48efb | |
parent | 6e1f2cf3924068448932d0655ead02cca35deaa7 (diff) |
faac: improve faac configuration
In particular, align configuration some more with reference binary faac.
Fixes #606726.
-rw-r--r-- | ext/faac/gstfaac.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/ext/faac/gstfaac.c b/ext/faac/gstfaac.c index 85b851350..40b52567e 100644 --- a/ext/faac/gstfaac.c +++ b/ext/faac/gstfaac.c @@ -491,9 +491,19 @@ gst_faac_configure_source_pad (GstFaac * faac) conf->bitRate = maxbitrate; } + /* default 0 to start with, libfaac chooses based on bitrate */ + conf->bandWidth = 0; + if (!faacEncSetConfiguration (faac->handle, conf)) goto set_failed; + /* let's see what really happened, + * note that this may not really match desired rate */ + GST_DEBUG_OBJECT (faac, "average bitrate: %d kbps", + (conf->bitRate + 500) / 1000 * faac->channels); + GST_DEBUG_OBJECT (faac, "quantization quality: %ld", conf->quantqual); + GST_DEBUG_OBJECT (faac, "bandwidth: %d Hz", conf->bandWidth); + /* now create a caps for it all */ srccaps = gst_caps_new_simple ("audio/mpeg", "mpegversion", G_TYPE_INT, mpegversion, |