diff options
author | jstebbins <[email protected]> | 2014-12-23 22:27:18 +0000 |
---|---|---|
committer | jstebbins <[email protected]> | 2014-12-23 22:27:18 +0000 |
commit | 29247cc9dfa23ea5ccdcb6c0db4508d58d7c919b (patch) | |
tree | f13a5aaf0a6ceab4f69d3db00f4c51daeaaa5e74 /libhb/common.c | |
parent | 602a0186397265c2446136e7d4ce7c47479d01d9 (diff) |
json: add "Codec" to audio list items
and add hb_audio_can_apply_drc2 API which doesn't require audio codec_param
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6651 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/common.c')
-rw-r--r-- | libhb/common.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/libhb/common.c b/libhb/common.c index 876377c60..7f12e5838 100644 --- a/libhb/common.c +++ b/libhb/common.c @@ -3837,6 +3837,20 @@ int hb_audio_can_apply_drc(uint32_t codec, uint32_t codec_param, int encoder) } } +int hb_audio_can_apply_drc2(hb_handle_t *h, int title_idx, int audio_idx, int encoder) +{ + hb_title_t *title = hb_find_title_by_index(h, title_idx); + if (title == NULL) + return 0; + + hb_audio_t *audio = hb_list_item(title->list_audio, audio_idx); + if (audio == NULL) + return 0; + + return hb_audio_can_apply_drc(audio->config.in.codec, + audio->config.in.codec_param, encoder); +} + /********************************************************************** * hb_metadata_init ********************************************************************** |