chromium/third_party/ffmpeg/libavcodec/mpeg4audio.h

/*
 * MPEG-4 Audio common header
 * Copyright (c) 2008 Baptiste Coudurier <[email protected]>
 *
 * This file is part of FFmpeg.
 *
 * FFmpeg is free software; you can redistribute it and/or
 * 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.
 *
 * FFmpeg is distributed in the hope that it will be useful,
 * 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
 * License along with FFmpeg; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 */

#ifndef AVCODEC_MPEG4AUDIO_H
#define AVCODEC_MPEG4AUDIO_H

#include <stdint.h>

#include "get_bits.h"

MPEG4AudioConfig;

extern const int     ff_mpeg4audio_sample_rates[16];
extern const uint8_t ff_mpeg4audio_channels[15];

/**
 * Parse MPEG-4 systems extradata from a potentially unaligned GetBitContext to retrieve audio configuration.
 * @param[in] c        MPEG4AudioConfig structure to fill.
 * @param[in] gb       Extradata from container.
 * @param[in] sync_extension look for a sync extension after config if true.
 * @param[in] logctx opaque struct starting with an AVClass element, used for logging.
 * @return negative AVERROR code on error, on success AudioSpecificConfig bit index in extradata.
 */
int ff_mpeg4audio_get_config_gb(MPEG4AudioConfig *c, GetBitContext *gb,
                                int sync_extension, void *logctx);

/**
 * Parse MPEG-4 systems extradata from a raw buffer to retrieve audio configuration.
 * @param[in] c        MPEG4AudioConfig structure to fill.
 * @param[in] buf      Extradata from container.
 * @param[in] size     Extradata size in bytes.
 * @param[in] sync_extension look for a sync extension after config if true.
 * @param[in] logctx opaque struct starting with an AVClass element, used for logging.
 * @return negative AVERROR code on error, AudioSpecificConfig bit index in extradata on success.
 */
int avpriv_mpeg4audio_get_config2(MPEG4AudioConfig *c, const uint8_t *buf,
                                  int size, int sync_extension, void *logctx);

enum AudioObjectType {};

#define MAX_PCE_SIZE
                         ///<marker and the comment

#endif /* AVCODEC_MPEG4AUDIO_H */