ext/lame/gstlame.c: set default compression ratio paramter to 0.0 so bitrate parameter works :)

Original commit message from CVS:
2004-08-12  Zaheer Abbas Merali  <zaheerabbas at merali dot org>

* ext/lame/gstlame.c: (gst_lame_class_init), (gst_lame_init):
set default compression ratio paramter to 0.0 so bitrate parameter
works :)
This commit is contained in:
Zaheer Abbas Merali 2004-08-12 15:48:50 +00:00
parent d2a814f84c
commit 20da04d909

View file

@ -242,11 +242,12 @@ gst_lame_class_init (GstLameClass * klass)
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_BITRATE, g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_BITRATE,
g_param_spec_int ("bitrate", "Bitrate (kb/s)", "Bitrate in kbit/sec", g_param_spec_int ("bitrate", "Bitrate (kb/s)", "Bitrate in kbit/sec",
8, 320, 128, G_PARAM_READWRITE)); 8, 320, 128, G_PARAM_READWRITE));
/* compression ratio set to 0.0 by default otherwise it overrides the bitrate setting */
g_object_class_install_property (G_OBJECT_CLASS (klass), g_object_class_install_property (G_OBJECT_CLASS (klass),
ARG_COMPRESSION_RATIO, g_param_spec_float ("compression_ratio", ARG_COMPRESSION_RATIO, g_param_spec_float ("compression_ratio",
"Compression Ratio", "Compression Ratio",
"choose bitrate to achive selected compression ratio", 1.0, 200.0, "let lame choose bitrate to achieve selected compression ratio", 0.0,
11.0, G_PARAM_READWRITE)); 200.0, 0.0, G_PARAM_READWRITE));
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_QUALITY, g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_QUALITY,
g_param_spec_enum ("quality", "Quality", "Encoding Quality", g_param_spec_enum ("quality", "Quality", "Encoding Quality",
GST_TYPE_LAME_QUALITY, 5, G_PARAM_READWRITE)); GST_TYPE_LAME_QUALITY, 5, G_PARAM_READWRITE));
@ -451,7 +452,7 @@ gst_lame_init (GstLame * lame)
lame->initialized = FALSE; lame->initialized = FALSE;
lame->bitrate = 128; /* lame_get_brate (lame->lgf); => 0/out of range */ lame->bitrate = 128; /* lame_get_brate (lame->lgf); => 0/out of range */
lame->compression_ratio = 5; /* lame_get_compression_ratio (lame->lgf); => 0/out of range */ lame->compression_ratio = 0.0; /* lame_get_compression_ratio (lame->lgf); => 0/out of range ... NOTE: 0.0 makes bitrate take precedence */
lame->quality = 5; /* lame_get_quality (lame->lgf); => -1/out of range */ lame->quality = 5; /* lame_get_quality (lame->lgf); => -1/out of range */
lame->mode = lame_get_mode (lame->lgf); lame->mode = lame_get_mode (lame->lgf);
lame->force_ms = lame_get_force_ms (lame->lgf); lame->force_ms = lame_get_force_ms (lame->lgf);