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

Function format_vquality_cb

gtk/src/videohandler.c:318–358  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

316}
317
318G_MODULE_EXPORT char *
319format_vquality_cb (double val)
320{
321 gint vcodec;
322 const char *vqname;
323 char * result;
324 signal_user_data_t *ud = ghb_ud();
325
326 vcodec = ghb_settings_video_encoder_codec(ud->settings, "VideoEncoder");
327 vqname = hb_video_quality_get_name(vcodec);
328 switch (vcodec)
329 {
330 case HB_VCODEC_FFMPEG_MPEG4:
331 case HB_VCODEC_FFMPEG_MPEG2:
332 case HB_VCODEC_FFMPEG_VP8:
333 case HB_VCODEC_FFMPEG_VP9:
334 case HB_VCODEC_FFMPEG_VP9_10BIT:
335 case HB_VCODEC_THEORA:
336 {
337 result = g_strdup_printf("<b>%s</b> %d", vqname, (int)val);
338 } break;
339
340 case HB_VCODEC_X264_8BIT:
341 {
342 if (val == 0.0)
343 {
344 result = g_strdup_printf("<b>%s</b> %.4g (%s)",
345 vqname, val, _("Warning: lossless"));
346 break;
347 }
348 G_GNUC_FALLTHROUGH; // Falls through to default
349 }
350 case HB_VCODEC_X264_10BIT:
351 default:
352 {
353 result = g_strdup_printf("<b>%s</b> %.4g", vqname, val);
354 } break;
355 }
356
357 return result;
358}
359
360G_MODULE_EXPORT void
361framerate_changed_cb (GtkWidget *widget, gpointer data)

Callers

nothing calls this directly

Calls 3

ghb_udFunction · 0.85

Tested by

no test coverage detected