mirror of https://github.com/FFmpeg/FFmpeg.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
51 lines
1.8 KiB
51 lines
1.8 KiB
16 years ago
|
/*
|
||
15 years ago
|
* AAC ADTS header decoding prototypes and structures
|
||
16 years ago
|
* Copyright (c) 2003 Fabrice Bellard
|
||
|
* Copyright (c) 2003 Michael Niedermayer
|
||
|
*
|
||
14 years ago
|
* This file is part of Libav.
|
||
16 years ago
|
*
|
||
14 years ago
|
* Libav is free software; you can redistribute it and/or
|
||
16 years ago
|
* modify it under the terms of the GNU Lesser General Public
|
||
|
* License as published by the Free Software Foundation; either
|
||
|
* version 2.1 of the License, or (at your option) any later version.
|
||
|
*
|
||
14 years ago
|
* Libav is distributed in the hope that it will be useful,
|
||
16 years ago
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||
|
* Lesser General Public License for more details.
|
||
|
*
|
||
|
* You should have received a copy of the GNU Lesser General Public
|
||
14 years ago
|
* License along with Libav; if not, write to the Free Software
|
||
16 years ago
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||
|
*/
|
||
|
|
||
8 years ago
|
#ifndef AVCODEC_ADTS_HEADER_H
|
||
|
#define AVCODEC_ADTS_HEADER_H
|
||
16 years ago
|
|
||
16 years ago
|
#include "get_bits.h"
|
||
16 years ago
|
|
||
12 years ago
|
typedef struct AACADTSHeaderInfo {
|
||
16 years ago
|
uint32_t sample_rate;
|
||
|
uint32_t samples;
|
||
|
uint32_t bit_rate;
|
||
|
uint8_t crc_absent;
|
||
|
uint8_t object_type;
|
||
|
uint8_t sampling_index;
|
||
|
uint8_t chan_config;
|
||
|
uint8_t num_aac_frames;
|
||
|
} AACADTSHeaderInfo;
|
||
|
|
||
|
/**
|
||
15 years ago
|
* Parse the ADTS frame header to the end of the variable header, which is
|
||
16 years ago
|
* the first 54 bits.
|
||
15 years ago
|
* @param[in] gbc BitContext containing the first 54 bits of the frame.
|
||
|
* @param[out] hdr Pointer to struct where header info is written.
|
||
16 years ago
|
* @return Returns 0 on success, -1 if there is a sync word mismatch,
|
||
|
* -2 if the version element is invalid, -3 if the sample rate
|
||
|
* element is invalid, or -4 if the bit rate element is invalid.
|
||
|
*/
|
||
8 years ago
|
int ff_adts_header_parse(GetBitContext *gbc, AACADTSHeaderInfo *hdr);
|
||
16 years ago
|
|
||
8 years ago
|
#endif /* AVCODEC_ADTS_HEADER_H */
|