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

Side by Side Diff: media/ffmpeg/ffmpeg_common.cc

Issue 12387006: Pass more detailed audio hardware configuration information to the renderer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
« media/ffmpeg/ffmpeg_common.h ('K') | « media/ffmpeg/ffmpeg_common.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "media/ffmpeg/ffmpeg_common.h" 5 #include "media/ffmpeg/ffmpeg_common.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "media/base/decoder_buffer.h" 9 #include "media/base/decoder_buffer.h"
10 #include "media/base/video_frame.h" 10 #include "media/base/video_frame.h"
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 case kSampleFormatPlanarF32: 264 case kSampleFormatPlanarF32:
265 return AV_SAMPLE_FMT_FLTP; 265 return AV_SAMPLE_FMT_FLTP;
266 default: 266 default:
267 DVLOG(1) << "Unknown SampleFormat: " << sample_format; 267 DVLOG(1) << "Unknown SampleFormat: " << sample_format;
268 } 268 }
269 return AV_SAMPLE_FMT_NONE; 269 return AV_SAMPLE_FMT_NONE;
270 } 270 }
271 271
272 // Converts a channel count into a channel layout. Layouts chosen based on the 272 // Converts a channel count into a channel layout. Layouts chosen based on the
273 // Vorbis / Opus channel layout. 273 // Vorbis / Opus channel layout.
274 static ChannelLayout GuessChannelLayout(int channels) { 274 ChannelLayout GuessChannelLayout(int channels) {
275 switch (channels) { 275 switch (channels) {
276 case 1: 276 case 1:
277 return CHANNEL_LAYOUT_MONO; 277 return CHANNEL_LAYOUT_MONO;
278 case 2: 278 case 2:
279 return CHANNEL_LAYOUT_STEREO; 279 return CHANNEL_LAYOUT_STEREO;
280 case 3: 280 case 3:
281 return CHANNEL_LAYOUT_SURROUND; 281 return CHANNEL_LAYOUT_SURROUND;
282 case 4: 282 case 4:
283 return CHANNEL_LAYOUT_QUAD; 283 return CHANNEL_LAYOUT_QUAD;
284 case 5: 284 case 5:
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
511 return PIX_FMT_YUV422P; 511 return PIX_FMT_YUV422P;
512 case VideoFrame::YV12: 512 case VideoFrame::YV12:
513 return PIX_FMT_YUV420P; 513 return PIX_FMT_YUV420P;
514 default: 514 default:
515 DVLOG(1) << "Unsupported VideoFrame::Format: " << video_format; 515 DVLOG(1) << "Unsupported VideoFrame::Format: " << video_format;
516 } 516 }
517 return PIX_FMT_NONE; 517 return PIX_FMT_NONE;
518 } 518 }
519 519
520 } // namespace media 520 } // namespace media
OLDNEW
« media/ffmpeg/ffmpeg_common.h ('K') | « media/ffmpeg/ffmpeg_common.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698