annotate ffmpeg/libavcodec/aac_ac3_parser.h @ 13:844d341cf643 tip

Back up before ISMIR
author Yading Song <yading.song@eecs.qmul.ac.uk>
date Thu, 31 Oct 2013 13:17:06 +0000
parents 6840f77b83aa
children
rev   line source
yading@10 1 /*
yading@10 2 * Common AAC and AC-3 parser prototypes
yading@10 3 * Copyright (c) 2003 Fabrice Bellard
yading@10 4 * Copyright (c) 2003 Michael Niedermayer
yading@10 5 *
yading@10 6 * This file is part of FFmpeg.
yading@10 7 *
yading@10 8 * FFmpeg is free software; you can redistribute it and/or
yading@10 9 * modify it under the terms of the GNU Lesser General Public
yading@10 10 * License as published by the Free Software Foundation; either
yading@10 11 * version 2.1 of the License, or (at your option) any later version.
yading@10 12 *
yading@10 13 * FFmpeg is distributed in the hope that it will be useful,
yading@10 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
yading@10 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
yading@10 16 * Lesser General Public License for more details.
yading@10 17 *
yading@10 18 * You should have received a copy of the GNU Lesser General Public
yading@10 19 * License along with FFmpeg; if not, write to the Free Software
yading@10 20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
yading@10 21 */
yading@10 22
yading@10 23 #ifndef AVCODEC_AAC_AC3_PARSER_H
yading@10 24 #define AVCODEC_AAC_AC3_PARSER_H
yading@10 25
yading@10 26 #include <stdint.h>
yading@10 27 #include "avcodec.h"
yading@10 28 #include "parser.h"
yading@10 29
yading@10 30 typedef enum {
yading@10 31 AAC_AC3_PARSE_ERROR_SYNC = -1,
yading@10 32 AAC_AC3_PARSE_ERROR_BSID = -2,
yading@10 33 AAC_AC3_PARSE_ERROR_SAMPLE_RATE = -3,
yading@10 34 AAC_AC3_PARSE_ERROR_FRAME_SIZE = -4,
yading@10 35 AAC_AC3_PARSE_ERROR_FRAME_TYPE = -5,
yading@10 36 AAC_AC3_PARSE_ERROR_CRC = -6,
yading@10 37 AAC_AC3_PARSE_ERROR_CHANNEL_CFG = -7,
yading@10 38 } AACAC3ParseError;
yading@10 39
yading@10 40 typedef struct AACAC3ParseContext {
yading@10 41 ParseContext pc;
yading@10 42 int frame_size;
yading@10 43 int header_size;
yading@10 44 int (*sync)(uint64_t state, struct AACAC3ParseContext *hdr_info,
yading@10 45 int *need_next_header, int *new_frame_start);
yading@10 46
yading@10 47 int channels;
yading@10 48 int sample_rate;
yading@10 49 int bit_rate;
yading@10 50 int samples;
yading@10 51 uint64_t channel_layout;
yading@10 52 int service_type;
yading@10 53
yading@10 54 int remaining_size;
yading@10 55 uint64_t state;
yading@10 56
yading@10 57 int need_next_header;
yading@10 58 enum AVCodecID codec_id;
yading@10 59 } AACAC3ParseContext;
yading@10 60
yading@10 61 int ff_aac_ac3_parse(AVCodecParserContext *s1,
yading@10 62 AVCodecContext *avctx,
yading@10 63 const uint8_t **poutbuf, int *poutbuf_size,
yading@10 64 const uint8_t *buf, int buf_size);
yading@10 65
yading@10 66 #endif /* AVCODEC_AAC_AC3_PARSER_H */