mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-21 07:46:38 +00:00
celtenc: don't limit bit rate
This commit is contained in:
parent
a4e438d193
commit
e3d9e9d98b
1 changed files with 2 additions and 18 deletions
|
@ -153,7 +153,8 @@ gst_celt_enc_class_init (GstCeltEncClass * klass)
|
|||
g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_BITRATE,
|
||||
g_param_spec_int ("bitrate", "Encoding Bit-rate",
|
||||
"Specify an encoding bit-rate (in Kbps). (0 = automatic)",
|
||||
0, 150, DEFAULT_BITRATE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
||||
10, 320, DEFAULT_BITRATE,
|
||||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
||||
g_object_class_install_property (gobject_class, PROP_FRAMESIZE,
|
||||
g_param_spec_int ("framesize", "Frame Size",
|
||||
"The number of samples per frame", 64, 512, DEFAULT_FRAMESIZE,
|
||||
|
@ -554,23 +555,6 @@ gst_celt_enc_setup (GstCeltEnc * enc)
|
|||
|
||||
enc->setup = FALSE;
|
||||
|
||||
/* Fix bitrate */
|
||||
if (enc->channels == 1) {
|
||||
if (enc->bitrate <= 0)
|
||||
enc->bitrate = 64;
|
||||
else if (enc->bitrate < 32)
|
||||
enc->bitrate = 32;
|
||||
else if (enc->bitrate > 110)
|
||||
enc->bitrate = 110;
|
||||
} else {
|
||||
if (enc->bitrate <= 0)
|
||||
enc->bitrate = 128;
|
||||
else if (enc->bitrate < 64)
|
||||
enc->bitrate = 64;
|
||||
else if (enc->bitrate > 150)
|
||||
enc->bitrate = 150;
|
||||
}
|
||||
|
||||
enc->mode =
|
||||
celt_mode_create (enc->rate, enc->channels, enc->frame_size, &error);
|
||||
if (!enc->mode)
|
||||
|
|
Loading…
Reference in a new issue