chromium/third_party/ffmpeg/libavutil/channel_layout.c

/*
 * Copyright (c) 2006 Michael Niedermayer <[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
 */

/**
 * @file
 * audio channel layout utility functions
 */

#include <stdint.h>
#include <stdlib.h>
#include <string.h>

#include "avassert.h"
#include "channel_layout.h"
#include "bprint.h"
#include "common.h"
#include "error.h"
#include "macros.h"
#include "mem.h"
#include "opt.h"

#define CHAN_IS_AMBI(x)

struct channel_name {};

static const struct channel_name channel_names[] =;

void av_channel_name_bprint(AVBPrint *bp, enum AVChannel channel_id)
{}

int av_channel_name(char *buf, size_t buf_size, enum AVChannel channel_id)
{}

void av_channel_description_bprint(AVBPrint *bp, enum AVChannel channel_id)
{}

int av_channel_description(char *buf, size_t buf_size, enum AVChannel channel_id)
{}

enum AVChannel av_channel_from_string(const char *str)
{}

struct channel_layout_name {};

static const struct channel_layout_name channel_layout_map[] =;

int av_channel_layout_custom_init(AVChannelLayout *channel_layout, int nb_channels)
{}

int av_channel_layout_from_mask(AVChannelLayout *channel_layout,
                                uint64_t mask)
{}

static int parse_channel_list(AVChannelLayout *ch_layout, const char *str)
{}

int av_channel_layout_from_string(AVChannelLayout *channel_layout,
                                  const char *str)
{}

void av_channel_layout_uninit(AVChannelLayout *channel_layout)
{}

int av_channel_layout_copy(AVChannelLayout *dst, const AVChannelLayout *src)
{}

static int64_t masked_description(const AVChannelLayout *channel_layout, int start_channel)
{}

static int has_channel_names(const AVChannelLayout *channel_layout)
{}

/**
 * If the layout is n-th order standard-order ambisonic, with optional
 * extra non-diegetic channels at the end, return the order.
 * Return a negative error code otherwise.
 */
static int ambisonic_order(const AVChannelLayout *channel_layout)
{}

static enum AVChannelOrder canonical_order(AVChannelLayout *channel_layout)
{}

/**
 * If the custom layout is n-th order standard-order ambisonic, with optional
 * extra non-diegetic channels at the end, write its string description in bp.
 * Return a negative error code otherwise.
 */
static int try_describe_ambisonic(AVBPrint *bp, const AVChannelLayout *channel_layout)
{}

int av_channel_layout_describe_bprint(const AVChannelLayout *channel_layout,
                                      AVBPrint *bp)
{}

int av_channel_layout_describe(const AVChannelLayout *channel_layout,
                               char *buf, size_t buf_size)
{}

enum AVChannel
av_channel_layout_channel_from_index(const AVChannelLayout *channel_layout,
                                     unsigned int idx)
{}

enum AVChannel
av_channel_layout_channel_from_string(const AVChannelLayout *channel_layout,
                                      const char *str)
{}

int av_channel_layout_index_from_channel(const AVChannelLayout *channel_layout,
                                         enum AVChannel channel)
{}

int av_channel_layout_index_from_string(const AVChannelLayout *channel_layout,
                                        const char *str)
{}

int av_channel_layout_check(const AVChannelLayout *channel_layout)
{}

int av_channel_layout_compare(const AVChannelLayout *chl, const AVChannelLayout *chl1)
{}

void av_channel_layout_default(AVChannelLayout *ch_layout, int nb_channels)
{}

const AVChannelLayout *av_channel_layout_standard(void **opaque)
{}

uint64_t av_channel_layout_subset(const AVChannelLayout *channel_layout,
                                  uint64_t mask)
{}

int av_channel_layout_retype(AVChannelLayout *channel_layout, enum AVChannelOrder order, int flags)
{}