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

Function queue_update_stats

gtk/src/queuehandler.c:646–814  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

644}
645
646static void
647queue_update_stats (GhbValue * queueDict, signal_user_data_t *ud)
648{
649 GhbValue * uiDict;
650 GtkLabel * label;
651
652 uiDict = ghb_dict_get(queueDict, "uiSettings");
653 if (uiDict == NULL) // should never happen
654 {
655 return;
656 }
657
658 label = GTK_LABEL(ghb_builder_widget("queue_stats_pass_label"));
659 gtk_widget_set_visible(GTK_WIDGET(label), FALSE);
660 label = GTK_LABEL(ghb_builder_widget("queue_stats_pass"));
661 gtk_widget_set_visible(GTK_WIDGET(label), FALSE);
662
663 const char * result = "";
664 int status = ghb_dict_get_int(uiDict, "job_status");
665
666 if (status == GHB_QUEUE_PENDING)
667 {
668 label = GTK_LABEL(ghb_builder_widget("queue_stats_start_time"));
669 gtk_label_set_text(label, "");
670 label = GTK_LABEL(ghb_builder_widget("queue_stats_finish_time"));
671 gtk_label_set_text(label, "");
672 label = GTK_LABEL(ghb_builder_widget("queue_stats_paused"));
673 gtk_label_set_text(label, "");
674 label = GTK_LABEL(ghb_builder_widget("queue_stats_encode"));
675 gtk_label_set_text(label, "");
676 label = GTK_LABEL(ghb_builder_widget("queue_stats_file_size"));
677 gtk_label_set_text(label, "");
678 label = GTK_LABEL(ghb_builder_widget("queue_stats_result"));
679 gtk_label_set_text(label, _("Pending"));
680 return;
681 }
682
683 switch (status)
684 {
685 case GHB_QUEUE_RUNNING:
686 // This job is running.
687 // ghb_queue_update_live_stats() will update stats
688 return;
689
690 case GHB_QUEUE_DONE:
691 result = _("Completed");
692 break;
693
694 case GHB_QUEUE_CANCELED:
695 result = _("Canceled");
696 break;
697
698 case GHB_QUEUE_FAIL:
699 result = _("Failed");
700 break;
701
702 case GHB_QUEUE_PENDING:
703 default:

Callers 2

Calls 4

ghb_builder_widgetFunction · 0.85
ghb_dict_get_intFunction · 0.85
ghb_break_durationFunction · 0.85
ghb_dict_get_stringFunction · 0.85

Tested by

no test coverage detected