]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/vorbis_parser.h
Merge commit '2d2a92f72199823a92e4e226c32e42a27ec801c0'
[ffmpeg] / libavcodec / vorbis_parser.h
index 101df5d765ca97929513c07df797f2476712d492..590101bbad7a433d698391c28bec5bbdbfbe2763 100644 (file)
@@ -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.
  *