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

Side by Side Diff: chromecast/media/cma/base/decoder_config_adapter.cc

Issue 1422113002: Enable pcm_s32le audio decoding. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: DEPS roll Created 5 years 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 unified diff | Download patch
« no previous file with comments | « DEPS ('k') | chromecast/public/media/decoder_config.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chromecast/media/cma/base/decoder_config_adapter.h" 5 #include "chromecast/media/cma/base/decoder_config_adapter.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "media/base/channel_layout.h" 8 #include "media/base/channel_layout.h"
9 9
10 namespace chromecast { 10 namespace chromecast {
(...skipping 26 matching lines...) Expand all
37 } 37 }
38 38
39 SampleFormat ToSampleFormat(const ::media::SampleFormat sample_format) { 39 SampleFormat ToSampleFormat(const ::media::SampleFormat sample_format) {
40 switch (sample_format) { 40 switch (sample_format) {
41 case ::media::kUnknownSampleFormat: 41 case ::media::kUnknownSampleFormat:
42 return kUnknownSampleFormat; 42 return kUnknownSampleFormat;
43 case ::media::kSampleFormatU8: 43 case ::media::kSampleFormatU8:
44 return kSampleFormatU8; 44 return kSampleFormatU8;
45 case ::media::kSampleFormatS16: 45 case ::media::kSampleFormatS16:
46 return kSampleFormatS16; 46 return kSampleFormatS16;
47 case ::media::kSampleFormatS24:
48 return kSampleFormatS24;
47 case ::media::kSampleFormatS32: 49 case ::media::kSampleFormatS32:
48 return kSampleFormatS32; 50 return kSampleFormatS32;
49 case ::media::kSampleFormatF32: 51 case ::media::kSampleFormatF32:
50 return kSampleFormatF32; 52 return kSampleFormatF32;
51 case ::media::kSampleFormatPlanarS16: 53 case ::media::kSampleFormatPlanarS16:
52 return kSampleFormatPlanarS16; 54 return kSampleFormatPlanarS16;
53 case ::media::kSampleFormatPlanarF32: 55 case ::media::kSampleFormatPlanarF32:
54 return kSampleFormatPlanarF32; 56 return kSampleFormatPlanarF32;
55 case ::media::kSampleFormatPlanarS32: 57 case ::media::kSampleFormatPlanarS32:
56 return kSampleFormatPlanarS32; 58 return kSampleFormatPlanarS32;
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 } 126 }
125 127
126 ::media::SampleFormat ToMediaSampleFormat(const SampleFormat sample_format) { 128 ::media::SampleFormat ToMediaSampleFormat(const SampleFormat sample_format) {
127 switch (sample_format) { 129 switch (sample_format) {
128 case kUnknownSampleFormat: 130 case kUnknownSampleFormat:
129 return ::media::kUnknownSampleFormat; 131 return ::media::kUnknownSampleFormat;
130 case kSampleFormatU8: 132 case kSampleFormatU8:
131 return ::media::kSampleFormatU8; 133 return ::media::kSampleFormatU8;
132 case kSampleFormatS16: 134 case kSampleFormatS16:
133 return ::media::kSampleFormatS16; 135 return ::media::kSampleFormatS16;
136 case kSampleFormatS24:
137 return ::media::kSampleFormatS24;
134 case kSampleFormatS32: 138 case kSampleFormatS32:
135 return ::media::kSampleFormatS32; 139 return ::media::kSampleFormatS32;
136 case kSampleFormatF32: 140 case kSampleFormatF32:
137 return ::media::kSampleFormatF32; 141 return ::media::kSampleFormatF32;
138 case kSampleFormatPlanarS16: 142 case kSampleFormatPlanarS16:
139 return ::media::kSampleFormatPlanarS16; 143 return ::media::kSampleFormatPlanarS16;
140 case kSampleFormatPlanarF32: 144 case kSampleFormatPlanarF32:
141 return ::media::kSampleFormatPlanarF32; 145 return ::media::kSampleFormatPlanarF32;
142 case kSampleFormatPlanarS32: 146 case kSampleFormatPlanarS32:
143 return ::media::kSampleFormatPlanarS32; 147 return ::media::kSampleFormatPlanarS32;
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 video_config.id = id; 219 video_config.id = id;
216 video_config.codec = ToVideoCodec(config.codec()); 220 video_config.codec = ToVideoCodec(config.codec());
217 video_config.profile = ToVideoProfile(config.profile()); 221 video_config.profile = ToVideoProfile(config.profile());
218 video_config.extra_data = config.extra_data(); 222 video_config.extra_data = config.extra_data();
219 video_config.is_encrypted = config.is_encrypted(); 223 video_config.is_encrypted = config.is_encrypted();
220 return video_config; 224 return video_config;
221 } 225 }
222 226
223 } // namespace media 227 } // namespace media
224 } // namespace chromecast 228 } // namespace chromecast
OLDNEW
« no previous file with comments | « DEPS ('k') | chromecast/public/media/decoder_config.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698