diff options
author | Anton Khirnov <anton@khirnov.net> | 2024-08-16 01:26:43 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2024-08-19 21:45:25 +0200 |
commit | a83a30e899099ec76a3570c07ee40b013dbfd409 (patch) | |
tree | f8f313513a62813ce79db386652bf96c0e1a3180 /libavfilter/audio.h | |
parent | f4bfdf789335e690dd92c9ee85974c338429103a (diff) | |
download | ffmpeg-a83a30e899099ec76a3570c07ee40b013dbfd409.tar.gz |
lavfi: move ff_parse_{sample_rate,channel_layout}() to audio.[ch]
That is a more appropriate place for those functions.
Diffstat (limited to 'libavfilter/audio.h')
-rw-r--r-- | libavfilter/audio.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/libavfilter/audio.h b/libavfilter/audio.h index aab80baa50..881df0cf87 100644 --- a/libavfilter/audio.h +++ b/libavfilter/audio.h @@ -47,4 +47,29 @@ AVFrame *ff_null_get_audio_buffer(AVFilterLink *link, int nb_samples); */ AVFrame *ff_get_audio_buffer(AVFilterLink *link, int nb_samples); +/** + * 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 + */ +av_warn_unused_result +int ff_parse_sample_rate(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 nret integer pointer to the number of channels; + * if not NULL, then unknown channel layouts are accepted + * @param arg string to parse + * @param log_ctx log context + * @return >= 0 in case of success, a negative AVERROR code on error + */ +av_warn_unused_result +int ff_parse_channel_layout(AVChannelLayout *ret, int *nret, const char *arg, + void *log_ctx); + #endif /* AVFILTER_AUDIO_H */ |