// Copyright 2020 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
module chromecast.media.mojom;
enum AudioCodec {
kAudioCodecUnknown,
kCodecAAC,
kCodecMP3,
kCodecPCM,
kCodecPCM_S16BE,
kCodecVorbis,
kCodecOpus,
kCodecEAC3,
kCodecAC3,
kCodecDTS,
kCodecDTSXP2,
kCodecDTSE,
kCodecFLAC,
kCodecMpegHAudio,
};
enum ChannelLayout {
kUnsupported,
kMono,
kStereo,
kSurround_5_1,
kBitstream,
kDiscrete,
};
enum SampleFormat {
kUnknownSampleFormat,
kSampleFormatU8,
kSampleFormatS16,
kSampleFormatS32,
kSampleFormatF32,
kSampleFormatPlanarS16,
kSampleFormatPlanarF32,
kSampleFormatPlanarS32,
kSampleFormatS24,
kSampleFormatPlanarU8,
};
enum StreamId {
kPrimary,
kSecondary
};
enum EncryptionScheme {
kUnencrypted,
kAesCtr,
kAesCbc
};
// This defines a mojo transport format for chromecast::media::AudioConfig.
// See chromecast/public/media/decoder_config.h for descriptions.
struct AudioConfig {
StreamId id;
AudioCodec codec;
ChannelLayout channel_layout;
SampleFormat sample_format;
int32 bytes_per_channel;
int32 channel_number;
int32 samples_per_second;
array<uint8> extra_data;
EncryptionScheme encryption_scheme;
};