diff options
author | Justin Ruggles <justin.ruggles@gmail.com> | 2012-01-26 20:08:23 -0500 |
---|---|---|
committer | Justin Ruggles <justin.ruggles@gmail.com> | 2012-03-05 13:08:15 -0500 |
commit | 9524cf79df9f4f5792272e7e53f7dcc90ee26e61 (patch) | |
tree | 76861289a8b6392cbfe429d836b877ae697b1499 /libavcodec/avcodec.h | |
parent | 6699d07480f58bc20068b2d90fcd6ca8e3aa46b8 (diff) | |
download | ffmpeg-9524cf79df9f4f5792272e7e53f7dcc90ee26e61.tar.gz |
avcodec: add av_get_audio_frame_duration() function.
This is a utility function for the user to get the frame duration based on
the codec id, frame size in bytes, and various AVCodecContext parameters.
Diffstat (limited to 'libavcodec/avcodec.h')
-rw-r--r-- | libavcodec/avcodec.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index bdd72f7d5c..7074b582ec 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -3942,6 +3942,16 @@ int av_get_bits_per_sample(enum CodecID codec_id); */ int av_get_exact_bits_per_sample(enum CodecID codec_id); +/** + * Return audio frame duration. + * + * @param avctx codec context + * @param frame_bytes size of the frame, or 0 if unknown + * @return frame duration, in samples, if known. 0 if not able to + * determine. + */ +int av_get_audio_frame_duration(AVCodecContext *avctx, int frame_bytes); + /* frame parsing */ typedef struct AVCodecParserContext { void *priv_data; |