Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(967)

Unified Diff: media/base/audio_decoder_config.h

Issue 2752323002: Support Opus Ambisonics playback (Closed)
Patch Set: +tests Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | media/base/audio_decoder_config.cc » ('j') | media/ffmpeg/ffmpeg_common.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/audio_decoder_config.h
diff --git a/media/base/audio_decoder_config.h b/media/base/audio_decoder_config.h
index 266de82d605277543a3fec40b2c5a8faec165266..1bcbaf3a919ed4da29e271b7a14a18c10cc27397 100644
--- a/media/base/audio_decoder_config.h
+++ b/media/base/audio_decoder_config.h
@@ -63,10 +63,18 @@ class MEDIA_EXPORT AudioDecoderConfig {
// output only.
std::string AsHumanReadableString() const;
+ void set_channels_for_discrete(int channels) {
DaleCurtis 2017/03/20 17:38:58 Should be SetChannelsForDiscrete(), since hacker_s
flim-chromium 2017/03/22 06:20:50 Done.
+ DCHECK(channel_layout_ == CHANNEL_LAYOUT_DISCRETE ||
+ channels == ChannelLayoutToChannelCount(channel_layout_));
+ channels_ = channels;
+ bytes_per_frame_= channels_ * bytes_per_channel_;
+ }
+
AudioCodec codec() const { return codec_; }
int bits_per_channel() const { return bytes_per_channel_ * 8; }
int bytes_per_channel() const { return bytes_per_channel_; }
ChannelLayout channel_layout() const { return channel_layout_; }
+ int channels() const { return channels_; }
int samples_per_second() const { return samples_per_second_; }
SampleFormat sample_format() const { return sample_format_; }
int bytes_per_frame() const { return bytes_per_frame_; }
@@ -92,6 +100,7 @@ class MEDIA_EXPORT AudioDecoderConfig {
SampleFormat sample_format_;
int bytes_per_channel_;
ChannelLayout channel_layout_;
+ int channels_;
int samples_per_second_;
int bytes_per_frame_;
std::vector<uint8_t> extra_data_;
« no previous file with comments | « no previous file | media/base/audio_decoder_config.cc » ('j') | media/ffmpeg/ffmpeg_common.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698