chromium/media/base/channel_layout.cc

// Copyright 2012 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/40285824): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
#endif

#include "media/base/channel_layout.h"

#include <stddef.h>

#include "base/check_op.h"
#include "base/logging.h"
#include "base/notreached.h"

namespace media {

static const int kLayoutToChannels[] =;

// The channel orderings for each layout as specified by FFmpeg. Each value
// represents the index of each channel in each layout.  Values of -1 mean the
// channel at that index is not used for that layout. For example, the left side
// surround sound channel in FFmpeg's 5.1 layout is in the 5th position (because
// the order is L, R, C, LFE, LS, RS), so
// kChannelOrderings[CHANNEL_LAYOUT_5_1][SIDE_LEFT] = 4;
static const int kChannelOrderings[CHANNEL_LAYOUT_MAX + 1][CHANNELS_MAX + 1] =;

int ChannelLayoutToChannelCount(ChannelLayout layout) {}

// Converts a channel count into a channel layout.
ChannelLayout GuessChannelLayout(int channels) {}

int ChannelOrder(ChannelLayout layout, Channels channel) {}

const char* ChannelLayoutToString(ChannelLayout layout) {}

}  // namespace media