Go to the documentation of this file.
23 #include "config_components.h"
34 const uint8_t **poutbuf,
int *poutbuf_size,
35 const uint8_t *buf,
int buf_size)
49 if(
s->remaining_size <= buf_size){
50 if(
s->remaining_size && !
s->need_next_header){
52 s->remaining_size = 0;
55 for(
i=
s->remaining_size;
i<buf_size;
i++){
56 s->state = (
s->state<<8) + buf[
i];
57 if((
len=
s->sync(
s->state, &
s->need_next_header, &new_frame_start)))
65 i-=
s->header_size -1;
66 s->remaining_size =
len;
67 if(!new_frame_start || pc->
index+
i<=0){
68 s->remaining_size +=
i;
72 s->remaining_size +=
i;
79 s->remaining_size -=
FFMIN(
s->remaining_size, buf_size);
87 *poutbuf_size = buf_size;
107 while (buf_size > 0) {
110 if (ret < 0 || hdr.frame_size > buf_size)
146 #if CONFIG_AAC_PARSER
160 (bit_rate - avctx->
bit_rate) /
s->frame_number;
enum AVAudioServiceType audio_service_type
Type of service that the audio stream conveys.
int sample_rate
samples per second
int duration
Duration of the current frame.
#define AV_AAC_ADTS_HEADER_SIZE
enum AVChannelOrder order
Channel order used in this layout.
int nb_channels
Number of channels in this layout.
AVChannelLayout ch_layout
Audio channel layout.
@ AV_CHANNEL_ORDER_UNSPEC
Only the channel count is specified, without any further information about the channel order.
int av_channel_layout_from_mask(AVChannelLayout *channel_layout, uint64_t mask)
Initialize a native channel layout from a bitmask indicating which channels are present.
int ff_aac_ac3_parse(AVCodecParserContext *s1, AVCodecContext *avctx, const uint8_t **poutbuf, int *poutbuf_size, const uint8_t *buf, int buf_size)
int64_t bit_rate
the average bitrate
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf offset
int ff_combine_frame(ParseContext *pc, int next, const uint8_t **buf, int *buf_size)
Combine the (truncated) bitstream to a complete frame.
#define PARSER_FLAG_COMPLETE_FRAMES
#define i(width, name, range_min, range_max)
int avpriv_ac3_parse_header(AC3HeaderInfo **phdr, const uint8_t *buf, size_t size)
int ff_ac3_find_syncword(const uint8_t *buf, int buf_size)
@ AV_AUDIO_SERVICE_TYPE_KARAOKE
main external API structure.
uint32_t av_crc(const AVCRC *ctx, uint32_t crc, const uint8_t *buffer, size_t length)
Calculate the CRC of a block.
void av_channel_layout_uninit(AVChannelLayout *channel_layout)
Free any allocated data in the channel layout and reset the channel count to 0.