voaacenc: limit bitrate property to 320 kbps

This appears to be the internal limit of voaacenc, higher
bitrates will be ignored and 128 kbps output will be produced
instead. Therefore, we might just as well limit the allowed
property values, so that people who try to set higher bitrates
get a big fat warning instead of silently a much lower bitrate.
This commit is contained in:
Tim-Philipp Müller 2017-03-06 00:30:41 +00:00
parent 6e4354600d
commit a5e540bf55

View file

@ -159,8 +159,8 @@ gst_voaacenc_class_init (GstVoAacEncClass * klass)
g_object_class_install_property (object_class, PROP_BITRATE,
g_param_spec_int ("bitrate",
"Bitrate",
"Target Audio Bitrate",
0, G_MAXINT, VOAAC_ENC_DEFAULT_BITRATE,
"Target Audio Bitrate (bits per second)",
0, 320000, VOAAC_ENC_DEFAULT_BITRATE,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
gst_element_class_add_static_pad_template (element_class, &sink_template);