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

Function RunQueue

test/test.c:469–503  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

467}
468
469int RunQueue(hb_handle_t *h, const char *queue_import_name)
470{
471 hb_value_t * queue = hb_value_read_json(queue_import_name);
472
473 if (hb_value_type(queue) == HB_VALUE_TYPE_DICT)
474 {
475 return RunQueueJob(h, hb_dict_get(queue, "Job"));
476 }
477 else if (hb_value_type(queue) == HB_VALUE_TYPE_ARRAY)
478 {
479 int ii, count, result = 0;
480
481 count = hb_value_array_len(queue);
482 for (ii = 0; ii < count; ii++)
483 {
484 hb_dict_t * entry = hb_value_array_get(queue, ii);
485 int ret = RunQueueJob(h, hb_dict_get(entry, "Job"));
486 if (ret < 0)
487 {
488 result = ret;
489 }
490 if (die)
491 {
492 break;
493 }
494 }
495 return result;
496 }
497 else
498 {
499 fprintf(stderr, "Error: Invalid queue file %s\n", queue_import_name);
500 return -1;
501 }
502 return 0;
503}
504
505int main( int argc, char ** argv )
506{

Callers 1

mainFunction · 0.85

Calls 6

hb_value_read_jsonFunction · 0.85
hb_value_typeFunction · 0.85
RunQueueJobFunction · 0.85
hb_dict_getFunction · 0.85
hb_value_array_lenFunction · 0.85
hb_value_array_getFunction · 0.85

Tested by

no test coverage detected