1 /*
2 * Copyright (c) 2015 Ganesh Ajjanagadde
3 *
4 * This file is part of FFmpeg.
5 *
6 * FFmpeg is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * FFmpeg is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with FFmpeg; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 */
20
21 /**
22 * @file
23 * G.729 audio parser
24 *
25 * Splits packets into individual blocks.
26 */
27
31
38
40 const uint8_t **poutbuf,
int *poutbuf_size,
42 {
45 int next;
46
49 /* FIXME: replace this heuristic block_size with more precise estimate */
52 }
53
59 } else {
62 }
63
66 *poutbuf_size = 0;
67 return buf_size;
68 }
69
71
73 *poutbuf_size = buf_size;
74 return next;
75 }
76
82 };
int64_t bit_rate
the average bitrate
int duration
Duration of the current frame.
int ff_combine_frame(ParseContext *pc, int next, const uint8_t **buf, int *buf_size)
Combine the (truncated) bitstream to a complete frame.
simple assert() macros that are a bit more flexible than ISO C assert().
void ff_parse_close(AVCodecParserContext *s)
#define av_assert1(cond)
assert() equivalent, that does not lie in speed critical code.
int frame_size
Number of samples per channel in an audio frame.
main external API structure.
#define G729D_6K4_BLOCK_SIZE
#define G729_8K_BLOCK_SIZE
static int g729_parse(AVCodecParserContext *s1, AVCodecContext *avctx, const uint8_t **poutbuf, int *poutbuf_size, const uint8_t *buf, int buf_size)
AVCodecParser ff_g729_parser