diff options
author | Bradley Sepos <[email protected]> | 2016-09-09 17:59:42 -0400 |
---|---|---|
committer | Bradley Sepos <[email protected]> | 2016-09-09 18:03:17 -0400 |
commit | b5a042315b8ea70998fd92a978307eb4da325c30 (patch) | |
tree | 9ddf9bbdf540f2ffc85542f015f95a4dbb2e15a7 /libhb | |
parent | c50a2c7d9d3045cda7827285e816b8af7b4ab106 (diff) |
libhb: Add functions to get filter tunes names to param.c.
Diffstat (limited to 'libhb')
-rw-r--r-- | libhb/param.c | 36 | ||||
-rw-r--r-- | libhb/param.h | 2 |
2 files changed, 38 insertions, 0 deletions
diff --git a/libhb/param.c b/libhb/param.c index e09d93e45..8f2fb1749 100644 --- a/libhb/param.c +++ b/libhb/param.c @@ -887,6 +887,42 @@ char ** hb_filter_get_presets_name(int filter_id) return result; } +char ** hb_filter_get_tunes_short_name(int filter_id) +{ + int ii, count = 0; + hb_filter_param_t * table; + + table = filter_param_get_tunes_internal(filter_id, NULL); + + for (count = 0; table[count].name != NULL; count++); + char ** result = calloc(count + 1, sizeof(char*)); + for (ii = 0; ii < count; ii++) + { + result[ii] = strdup(table[ii].short_name); + } + result[ii] = NULL; + + return result; +} + +char ** hb_filter_get_tunes_name(int filter_id) +{ + int ii, count = 0; + hb_filter_param_t * table; + + table = filter_param_get_tunes_internal(filter_id, NULL); + + for (count = 0; table[count].name != NULL; count++); + char ** result = calloc(count + 1, sizeof(char*)); + for (ii = 0; ii < count; ii++) + { + result[ii] = strdup(table[ii].name); + } + result[ii] = NULL; + + return result; +} + char ** hb_filter_get_keys(int filter_id) { hb_filter_object_t * filter = hb_filter_get(filter_id); diff --git a/libhb/param.h b/libhb/param.h index 0222de39b..26d87e509 100644 --- a/libhb/param.h +++ b/libhb/param.h @@ -38,6 +38,8 @@ hb_filter_param_t * hb_filter_param_get_tunes(int filter_id); char ** hb_filter_get_keys(int filter_id); char ** hb_filter_get_presets_short_name(int filter_id); char ** hb_filter_get_presets_name(int filter_id); +char ** hb_filter_get_tunes_short_name(int filter_id); +char ** hb_filter_get_tunes_name(int filter_id); char * hb_filter_get_presets_json(int filter_id); char * hb_filter_get_tunes_json(int filter_id); |