2 * Dolby E parser internal code
4 * This file is part of FFmpeg.
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.
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.
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
21 #ifndef AVCODEC_DOLBY_E_PARSER_INTERNAL_H
22 #define AVCODEC_DOLBY_E_PARSER_INTERNAL_H
27 * Initialize DBEContext.
28 * Set word_bits/word_bytes, input, input_size, key_present.
29 * @param[out] s DBEContext.
30 * @param[in] buf raw input buffer.
31 * @param[in] buf_size must be 3 bytes at least.
32 * @return Returns 0 on success, AVERROR_INVALIDDATA on error
34 int ff_dolby_e_parse_init(DBEContext *s, const uint8_t *buf, int buf_size);
37 * Parse Dolby E metadata.
38 * Parse the header up to the end_gain element.
39 * @param[in] s DBEContext .
40 * @param[out] hdr Pointer to struct where header info is written.
41 * @return Returns 0 on success, AVERROR_INVALIDDATA on error
43 int ff_dolby_e_parse_header(DBEContext *s, DolbyEHeaderInfo *hdr);
46 #endif /* AVCODEC_DOLBY_E_PARSER_INTERNAL_H */