diff options
author | Mina Nagy Zaki <mnzaki@gmail.com> | 2011-08-04 13:28:14 +0400 |
---|---|---|
committer | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2011-08-14 12:31:09 +0400 |
commit | 3f07d40ea2861e0c2a1ce6cb56907e9e888a3491 (patch) | |
tree | 1a9e75ec6153c34fea3800a4c6681931162e2995 /libavfilter/internal.h | |
parent | 3560089e1204441f27b43825aaa34e3dfc47dd10 (diff) |
lavfi: add internal functions for parsing format arguments
Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
Diffstat (limited to 'libavfilter/internal.h')
-rw-r--r-- | libavfilter/internal.h | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/libavfilter/internal.h b/libavfilter/internal.h index 7537565768..d03b8b8455 100644 --- a/libavfilter/internal.h +++ b/libavfilter/internal.h @@ -61,4 +61,46 @@ void ff_avfilter_default_free_buffer(AVFilterBuffer *buf); /** Tell is a format is contained in the provided list terminated by -1. */ int ff_fmt_is_in(int fmt, const int *fmts); +/* Functions to parse audio format arguments */ + +/** + * Parse a sample rate. + * + * @param ret unsigned integer pointer to where the value should be written + * @param arg string to parse + * @param log_ctx log context + * @return 0 in case of success, a negative AVERROR code on error + */ +int ff_parse_sample_rate(unsigned *ret, const char *arg, void *log_ctx); + +/** + * Parse a sample format name or a corresponding integer representation. + * + * @param ret integer pointer to where the value should be written + * @param arg string to parse + * @param log_ctx log context + * @return 0 in case of success, a negative AVERROR code on error + */ +int ff_parse_sample_format(int *ret, const char *arg, void *log_ctx); + +/** + * Parse a channel layout or a corresponding integer representation. + * + * @param ret 64bit integer pointer to where the value should be written. + * @param arg string to parse + * @param log_ctx log context + * @return 0 in case of success, a negative AVERROR code on error + */ +int ff_parse_channel_layout(int64_t *ret, const char *arg, void *log_ctx); + +/** + * Parse a packing format or a corresponding integer representation. + * + * @param ret integer pointer to where the value should be written + * @param arg string to parse + * @param log_ctx log context + * @return 0 in case of success, a negative AVERROR code on error + */ +int ff_parse_packing_format(int *ret, const char *arg, void *log_ctx); + #endif /* AVFILTER_INTERNAL_H */ |