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

Function apply_encoder_options

libhb/encavcodec.c:1522–1552  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1520}
1521
1522static int apply_encoder_options(hb_job_t *job, AVCodecContext *context, AVDictionary **av_opts)
1523{
1524#if HB_PROJECT_FEATURE_QSV
1525 if (hb_qsv_is_ffmpeg_supported_codec(job->vcodec))
1526 {
1527 // options applied separately via hb_qsv_apply_encoder_options() call
1528 return 0;
1529 }
1530#endif
1531 /* place job->encoder_options in an hb_dict_t for convenience */
1532 hb_dict_t *lavc_opts = NULL;
1533 if (job->encoder_options != NULL && *job->encoder_options)
1534 {
1535 lavc_opts = hb_encopts_to_dict(job->encoder_options, job->vcodec);
1536 }
1537 else
1538 {
1539 lavc_opts = hb_dict_init();
1540 }
1541
1542 switch (job->vcodec)
1543 {
1544 default:
1545 apply_options(job, context, av_opts, lavc_opts);
1546 break;
1547 }
1548
1549 hb_dict_free(&lavc_opts);
1550
1551 return 0;
1552}
1553
1554static int apply_vce_preset(AVDictionary **av_opts, int vcodec, const char *preset)
1555{

Callers 1

encavcodecInitFunction · 0.85

Calls 5

hb_encopts_to_dictFunction · 0.85
hb_dict_initFunction · 0.85
apply_optionsFunction · 0.85
hb_dict_freeFunction · 0.85

Tested by

no test coverage detected