From e3d9e9d98be7f66b05ca09b1f1abfbf75e1bf858 Mon Sep 17 00:00:00 2001 From: David Schleef Date: Thu, 17 Sep 2009 10:49:13 -0700 Subject: [PATCH] celtenc: don't limit bit rate --- ext/celt/gstceltenc.c | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/ext/celt/gstceltenc.c b/ext/celt/gstceltenc.c index e11091c12a..7ce03ecaa9 100644 --- a/ext/celt/gstceltenc.c +++ b/ext/celt/gstceltenc.c @@ -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)