* commit '6896f95b2483e52e717e2c75a4fd24fcb0e14b67': vorbis_parser: add an AV prefix to VorbisParseContext Conflicts: libavcodec/vorbis_parser.c
Unified · Split
| @@ -49,7 +49,7 @@ typedef struct LibvorbisEncContext { · 48 unmodified lines | ||
| 49 | 49 | int dsp_initialized; /**< vd has been initialized */ |
| 50 | 50 | vorbis_comment vc; /**< VorbisComment info */ |
| 51 | 51 | double iblock; /**< impulse block bias option */ |
| 52 | − VorbisParseContext vp; /**< parse context to get durations */ | |
| 52 | + AVVorbisParseContext vp; /**< parse context to get durations */ | |
| 53 | 53 | AudioFrameQueue afq; /**< frame queue for timestamps */ |
| 54 | 54 | } LibvorbisEncContext; |
| 55 | 55 | |
| @@ -38,7 +38,7 @@ static const AVClass vorbis_parser_class = { · 37 unmodified lines | ||
| 38 | 38 | .version = LIBAVUTIL_VERSION_INT, |
| 39 | 39 | }; |
| 40 | 40 | |
| 41 | −static int parse_id_header(VorbisParseContext *s, | |
| 41 | +static int parse_id_header(AVVorbisParseContext *s, | |
| 42 | 42 | const uint8_t *buf, int buf_size) |
| 43 | 43 | { |
| 44 | 44 | /* Id header should be 30 bytes */ |
| @@ -70,7 +70,7 @@ static int parse_id_header(VorbisParseContext *s, · 25 unmodified lines | ||
| 70 | 70 | return 0; |
| 71 | 71 | } |
| 72 | 72 | |
| 73 | −static int parse_setup_header(VorbisParseContext *s, | |
| 73 | +static int parse_setup_header(AVVorbisParseContext *s, | |
| 74 | 74 | const uint8_t *buf, int buf_size) |
| 75 | 75 | { |
| 76 | 76 | GetBitContext gb, gb0; |
| @@ -181,7 +181,7 @@ bad_header: · 104 unmodified lines | ||
| 181 | 181 | return ret; |
| 182 | 182 | } |
| 183 | 183 | |
| 184 | −int avpriv_vorbis_parse_extradata(AVCodecContext *avctx, VorbisParseContext *s) | |
| 184 | +int avpriv_vorbis_parse_extradata(AVCodecContext *avctx, AVVorbisParseContext *s) | |
| 185 | 185 | { |
| 186 | 186 | uint8_t *header_start[3]; |
| 187 | 187 | int header_len[3]; |
| @@ -209,7 +209,7 @@ int avpriv_vorbis_parse_extradata(AVCodecContext *avctx, VorbisParseContext *s) · 21 unmodified lines | ||
| 209 | 209 | return 0; |
| 210 | 210 | } |
| 211 | 211 | |
| 212 | −int avpriv_vorbis_parse_frame_flags(VorbisParseContext *s, const uint8_t *buf, | |
| 212 | +int avpriv_vorbis_parse_frame_flags(AVVorbisParseContext *s, const uint8_t *buf, | |
| 213 | 213 | int buf_size, int *flags) |
| 214 | 214 | { |
| 215 | 215 | int duration = 0; |
| @@ -258,13 +258,13 @@ bad_packet: · 42 unmodified lines | ||
| 258 | 258 | return duration; |
| 259 | 259 | } |
| 260 | 260 | |
| 261 | −int avpriv_vorbis_parse_frame(VorbisParseContext *s, const uint8_t *buf, | |
| 261 | +int avpriv_vorbis_parse_frame(AVVorbisParseContext *s, const uint8_t *buf, | |
| 262 | 262 | int buf_size) |
| 263 | 263 | { |
| 264 | 264 | return avpriv_vorbis_parse_frame_flags(s, buf, buf_size, NULL); |
| 265 | 265 | } |
| 266 | 266 | |
| 267 | −void avpriv_vorbis_parse_reset(VorbisParseContext *s) | |
| 267 | +void avpriv_vorbis_parse_reset(AVVorbisParseContext *s) | |
| 268 | 268 | { |
| 269 | 269 | if (s->valid_extradata) |
| 270 | 270 | s->previous_blocksize = s->blocksize[0]; |
| @@ -275,7 +275,7 @@ static int vorbis_parse(AVCodecParserContext *s1, AVCodecContext *avctx, · 4 unmodified lines | ||
| 275 | 275 | const uint8_t **poutbuf, int *poutbuf_size, |
| 276 | 276 | const uint8_t *buf, int buf_size) |
| 277 | 277 | { |
| 278 | − VorbisParseContext *s = s1->priv_data; | |
| 278 | + AVVorbisParseContext *s = s1->priv_data; | |
| 279 | 279 | int duration; |
| 280 | 280 | |
| 281 | 281 | if (!s->extradata_parsed && avctx->extradata && avctx->extradata_size) |
| @@ -295,7 +295,7 @@ end: · 13 unmodified lines | ||
| 295 | 295 | |
| 296 | 296 | AVCodecParser ff_vorbis_parser = { |
| 297 | 297 | .codec_ids = { AV_CODEC_ID_VORBIS }, |
| 298 | − .priv_data_size = sizeof(VorbisParseContext), | |
| 298 | + .priv_data_size = sizeof(AVVorbisParseContext), | |
| 299 | 299 | .parser_parse = vorbis_parse, |
| 300 | 300 | }; |
| 301 | 301 | #endif /* CONFIG_VORBIS_PARSER */ |
| @@ -30,7 +30,7 @@ · 29 unmodified lines | ||
| 30 | 30 | |
| 31 | 31 | #include "avcodec.h" |
| 32 | 32 | |
| 33 | −typedef struct VorbisParseContext { | |
| 33 | +typedef struct AVVorbisParseContext { | |
| 34 | 34 | const AVClass *class; |
| 35 | 35 | int extradata_parsed; ///< we have attempted to parse extradata |
| 36 | 36 | int valid_extradata; ///< extradata is valid, so we can calculate duration |
| @@ -40,7 +40,7 @@ typedef struct VorbisParseContext { · 3 unmodified lines | ||
| 40 | 40 | int mode_count; ///< number of modes |
| 41 | 41 | int mode_mask; ///< bitmask used to get the mode in each packet |
| 42 | 42 | int prev_mask; ///< bitmask used to get the previous mode flag in each packet |
| 43 | −} VorbisParseContext; | |
| 43 | +} AVVorbisParseContext; | |
| 44 | 44 | |
| 45 | 45 | /** |
| 46 | 46 | * Initialize the Vorbis parser using headers in the extradata. |
| @@ -48,7 +48,7 @@ typedef struct VorbisParseContext { · 1 unmodified line | ||
| 48 | 48 | * @param avctx codec context |
| 49 | 49 | * @param s Vorbis parser context |
| 50 | 50 | */ |
| 51 | −int avpriv_vorbis_parse_extradata(AVCodecContext *avctx, VorbisParseContext *s); | |
| 51 | +int avpriv_vorbis_parse_extradata(AVCodecContext *avctx, AVVorbisParseContext *s); | |
| 52 | 52 | |
| 53 | 53 | #define VORBIS_FLAG_HEADER 0x00000001 |
| 54 | 54 | #define VORBIS_FLAG_COMMENT 0x00000002 |
| @@ -65,7 +65,7 @@ int avpriv_vorbis_parse_extradata(AVCodecContext *avctx, VorbisParseContext *s); · 10 unmodified lines | ||
| 65 | 65 | * @param buf_size size of the buffer |
| 66 | 66 | * @param flags flags for special frames |
| 67 | 67 | */ |
| 68 | −int avpriv_vorbis_parse_frame_flags(VorbisParseContext *s, const uint8_t *buf, | |
| 68 | +int avpriv_vorbis_parse_frame_flags(AVVorbisParseContext *s, const uint8_t *buf, | |
| 69 | 69 | int buf_size, int *flags); |
| 70 | 70 | |
| 71 | 71 | /** |
| @@ -78,9 +78,9 @@ int avpriv_vorbis_parse_frame_flags(VorbisParseContext *s, const uint8_t *buf, · 6 unmodified lines | ||
| 78 | 78 | * @param buf buffer containing a Vorbis frame |
| 79 | 79 | * @param buf_size size of the buffer |
| 80 | 80 | */ |
| 81 | −int avpriv_vorbis_parse_frame(VorbisParseContext *s, const uint8_t *buf, | |
| 81 | +int avpriv_vorbis_parse_frame(AVVorbisParseContext *s, const uint8_t *buf, | |
| 82 | 82 | int buf_size); |
| 83 | 83 | |
| 84 | −void avpriv_vorbis_parse_reset(VorbisParseContext *s); | |
| 84 | +void avpriv_vorbis_parse_reset(AVVorbisParseContext *s); | |
| 85 | 85 | |
| 86 | 86 | #endif /* AVCODEC_VORBIS_PARSER_H */ |
| @@ -213,7 +213,7 @@ int ff_vorbis_comment(AVFormatContext *as, AVDictionary **m, · 212 unmodified lines | ||
| 213 | 213 | struct oggvorbis_private { |
| 214 | 214 | unsigned int len[3]; |
| 215 | 215 | unsigned char *packet[3]; |
| 216 | − VorbisParseContext vp; | |
| 216 | + AVVorbisParseContext vp; | |
| 217 | 217 | int64_t final_pts; |
| 218 | 218 | int final_duration; |
| 219 | 219 | }; |