diff options
author | Ben Boeckel <mathstuf@gmail.com> | 2013-10-27 22:47:31 -0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-11-13 01:36:56 +0100 |
commit | 255302da7019753bae84d809c6d603c4cd0a41ca (patch) | |
tree | 4d9914ec1361129114bacc3cd16d44115863c503 /libavcodec/vorbis_parser.h | |
parent | e3fc4481b6dd60acdb9f3e370ee9a1d1bd4ddd73 (diff) | |
download | ffmpeg-255302da7019753bae84d809c6d603c4cd0a41ca.tar.gz |
vorbis: handle special packets in the middle of a stream
This allows for updating metadata from new metadata packets in the
middle of a stream (e.g., MPD streams). There still needs to be a signal
that there *is* new metadata, but this is at least gets the data into a
data structure.
Signed-off-by: Ben Boeckel <mathstuf@gmail.com>
Reviewed-by: wm4 <nfxjfg@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/vorbis_parser.h')
-rw-r--r-- | libavcodec/vorbis_parser.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/libavcodec/vorbis_parser.h b/libavcodec/vorbis_parser.h index 101df5d765..590101bbad 100644 --- a/libavcodec/vorbis_parser.h +++ b/libavcodec/vorbis_parser.h @@ -50,6 +50,24 @@ typedef struct VorbisParseContext { */ int avpriv_vorbis_parse_extradata(AVCodecContext *avctx, VorbisParseContext *s); +#define VORBIS_FLAG_HEADER 0x00000001 +#define VORBIS_FLAG_COMMENT 0x00000002 + +/** + * Get the duration for a Vorbis packet. + * + * avpriv_vorbis_parse_extradata() must have been successfully called prior to + * this in order for a correct duration to be returned. If @p flags is @c NULL, + * special frames are considered invalid. + * + * @param s Vorbis parser context + * @param buf buffer containing a Vorbis frame + * @param buf_size size of the buffer + * @param flags flags for special frames + */ +int avpriv_vorbis_parse_frame_flags(VorbisParseContext *s, const uint8_t *buf, + int buf_size, int *flags); + /** * Get the duration for a Vorbis packet. * |