MCPcopy Create free account
hub / github.com/HandBrake/HandBrake / ghb_format_quality

Function ghb_format_quality

gtk/src/audiohandler.c:1206–1222  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1204}
1205
1206char * ghb_format_quality( const char *prefix, int codec, double quality )
1207{
1208 float low, high, gran;
1209 int dir;
1210 hb_audio_quality_get_limits(codec, &low, &high, &gran, &dir);
1211
1212 int digits = 0;
1213 float tmp = gran;
1214 while (1)
1215 {
1216 if (is_close(tmp, (int)tmp, gran / 10))
1217 break;
1218 digits++;
1219 tmp *= 10;
1220 }
1221 return g_strdup_printf("%s%.*f", prefix, digits, quality);
1222}
1223
1224G_MODULE_EXPORT void
1225quality_widget_changed_cb (GtkWidget *widget, gdouble quality, gpointer data)

Callers 2

get_quality_stringFunction · 0.85

Calls 2

is_closeFunction · 0.85

Tested by

no test coverage detected