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

Function ghb_update_summary_info

gtk/src/callbacks.c:2335–2679  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2333}
2334
2335void
2336ghb_update_summary_info(signal_user_data_t *ud)
2337{
2338 GString * str;
2339 char * text;
2340 int title_id;
2341 GtkWidget * widget;
2342 GhbValue * titleDict;
2343
2344 title_id = ghb_dict_get_int(ud->settings, "title");
2345 titleDict = ghb_get_title_dict(title_id);
2346 if (titleDict == NULL)
2347 {
2348 // No title, clear summary
2349 widget = ghb_builder_widget("tracks_summary");
2350 gtk_label_set_text(GTK_LABEL(widget), "");
2351 widget = ghb_builder_widget("filters_summary");
2352 gtk_label_set_text(GTK_LABEL(widget), "");
2353 widget = ghb_builder_widget("dimensions_summary");
2354 gtk_label_set_text(GTK_LABEL(widget), "--");
2355 mini_preview_update(FALSE, ud);
2356 return;
2357 }
2358 mini_preview_update(TRUE, ud);
2359
2360 // Video Track
2361 const hb_encoder_t * video_encoder;
2362 const hb_rate_t * fps;
2363 hb_rational_t vrate;
2364 char * rate_str;
2365
2366 str = g_string_new("");
2367 video_encoder = ghb_settings_video_encoder(ud->settings, "VideoEncoder");
2368 fps = ghb_settings_video_framerate(ud->settings, "VideoFramerate");
2369 if (fps->rate == 0)
2370 {
2371 hb_dict_extract_rational(&vrate, titleDict, "FrameRate");
2372 }
2373 else
2374 {
2375 vrate.num = 27000000;
2376 vrate.den = fps->rate;
2377 }
2378 rate_str = g_strdup_printf("%.6g", (gdouble)vrate.num / vrate.den);
2379 g_string_append_printf(str, "%s, %s %s", video_encoder->name, rate_str, _("FPS"));
2380 g_free(rate_str);
2381 if (ghb_dict_get_bool(ud->settings, "VideoFramerateCFR"))
2382 {
2383 g_string_append_printf(str, " %s", _("CFR"));
2384 }
2385 else if (ghb_dict_get_bool(ud->settings, "VideoFrameratePFR"))
2386 {
2387 g_string_append_printf(str, " %s", _("PFR"));
2388 }
2389 else if (ghb_dict_get_bool(ud->settings, "VideoFramerateVFR"))
2390 {
2391 g_string_append_printf(str, " %s", _("VFR"));
2392 }

Callers 15

subtitle_update_settingFunction · 0.85
import_setting_updateFunction · 0.85
subtitle_add_responseFunction · 0.85
subtitle_add_all_cbFunction · 0.85
subtitle_reset_cbFunction · 0.85
subtitle_edit_responseFunction · 0.85
subtitle_remove_cbFunction · 0.85
ghb_set_scaleFunction · 0.85
vcodec_changed_cbFunction · 0.85
framerate_changed_cbFunction · 0.85

Calls 15

ghb_dict_get_intFunction · 0.85
ghb_get_title_dictFunction · 0.85
ghb_builder_widgetFunction · 0.85
mini_preview_updateFunction · 0.85
hb_dict_extract_rationalFunction · 0.85
ghb_dict_get_boolFunction · 0.85
ghb_get_job_audio_listFunction · 0.85
ghb_dict_get_stringFunction · 0.85
ghb_settings_mixdownFunction · 0.85

Tested by

no test coverage detected