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

Function submit_job

gtk/src/callbacks.c:4201–4229  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4199}
4200
4201static void
4202submit_job(signal_user_data_t *ud, GhbValue *queueDict)
4203{
4204 const char *name, *type, *modified;
4205 GhbValue *uiDict;
4206 gboolean preset_modified;
4207
4208 ghb_log_func();
4209 if (queueDict == NULL) return;
4210 uiDict = ghb_dict_get(queueDict, "uiSettings");
4211 preset_modified = ghb_dict_get_bool(uiDict, "preset_modified");
4212 name = ghb_dict_get_string(uiDict, "PresetFullName");
4213 type = ghb_dict_get_int(uiDict, "Type") == 1 ? "Custom " : "";
4214 modified = preset_modified ? "Modified " : "";
4215 ghb_log("%s%sPreset: %s", modified, type, name);
4216
4217 ghb_dict_set_int(uiDict, "job_status", GHB_QUEUE_RUNNING);
4218 start_new_log(ud, uiDict);
4219 GhbValue *job_dict = ghb_dict_get(queueDict, "Job");
4220 int unique_id = ghb_add_job(ghb_queue_handle(), job_dict);
4221 ghb_dict_set_int(uiDict, "job_unique_id", unique_id);
4222 time_t now = time(NULL);
4223 ghb_dict_set_int(uiDict, "job_start_time", now);
4224 ghb_start_queue();
4225
4226 // Show queue progress bar
4227 int index = ghb_find_queue_job(ud->queue, unique_id, NULL);
4228 ghb_queue_item_set_status(ud, index, GHB_QUEUE_RUNNING);
4229}
4230
4231static void
4232prune_logs (void)

Callers 1

ghb_start_next_jobFunction · 0.85

Calls 11

ghb_dict_get_boolFunction · 0.85
ghb_dict_get_stringFunction · 0.85
ghb_dict_get_intFunction · 0.85
ghb_logFunction · 0.85
ghb_dict_set_intFunction · 0.85
start_new_logFunction · 0.85
ghb_add_jobFunction · 0.85
ghb_queue_handleFunction · 0.85
ghb_start_queueFunction · 0.85
ghb_find_queue_jobFunction · 0.85

Tested by

no test coverage detected