diff options
Diffstat (limited to 'libhb')
-rw-r--r-- | libhb/common.c | 26 | ||||
-rw-r--r-- | libhb/common.h | 2 |
2 files changed, 28 insertions, 0 deletions
diff --git a/libhb/common.c b/libhb/common.c index e7bc6dbb8..d1c4cb34a 100644 --- a/libhb/common.c +++ b/libhb/common.c @@ -45,6 +45,32 @@ hb_mixdown_t hb_audio_mixdowns[] = int hb_audio_mixdowns_count = sizeof( hb_audio_mixdowns ) / sizeof( hb_mixdown_t ); +int hb_mixdown_get_mixdown_from_short_name( const char * short_name ) +{ + int i; + for (i = 0; i < hb_audio_mixdowns_count; i++) + { + if (strcmp(hb_audio_mixdowns[i].short_name, short_name) == 0) + { + return hb_audio_mixdowns[i].amixdown; + } + } + return 0; +} + +const char * hb_mixdown_get_short_name_from_mixdown( int amixdown ) +{ + int i; + for (i = 0; i < hb_audio_mixdowns_count; i++) + { + if (hb_audio_mixdowns[i].amixdown == amixdown) + { + return hb_audio_mixdowns[i].short_name; + } + } + return ""; +} + /********************************************************************** * hb_reduce ********************************************************************** diff --git a/libhb/common.h b/libhb/common.h index 3ed8f7791..20de051f4 100644 --- a/libhb/common.h +++ b/libhb/common.h @@ -92,6 +92,8 @@ extern int hb_audio_bitrates_count; extern int hb_audio_bitrates_default; extern hb_mixdown_t hb_audio_mixdowns[]; extern int hb_audio_mixdowns_count; +int hb_mixdown_get_mixdown_from_short_name( const char * short_name ); +const char * hb_mixdown_get_short_name_from_mixdown( int amixdown ); /****************************************************************************** * hb_job_t: settings to be filled by the UI |