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

Side by Side Diff: media/base/sample_format.cc

Issue 1468153003: Define AudioBuffer and VideoFrame for mojo (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: IsInterleaved 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 | « media/base/sample_format.h ('k') | media/mojo/interfaces/decryptor.mojom » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/base/sample_format.h" 5 #include "media/base/sample_format.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 8
9 namespace media { 9 namespace media {
10 10
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 return "Signed 16-bit planar"; 44 return "Signed 16-bit planar";
45 case kSampleFormatPlanarF32: 45 case kSampleFormatPlanarF32:
46 return "Float 32-bit planar"; 46 return "Float 32-bit planar";
47 case kSampleFormatPlanarS32: 47 case kSampleFormatPlanarS32:
48 return "Signed 32-bit planar"; 48 return "Signed 32-bit planar";
49 } 49 }
50 NOTREACHED() << "Invalid sample format provided: " << sample_format; 50 NOTREACHED() << "Invalid sample format provided: " << sample_format;
51 return ""; 51 return "";
52 } 52 }
53 53
54 bool IsPlanar(SampleFormat sample_format) {
DaleCurtis 2015/11/24 21:40:08 Might be worth making these both fully-qualified s
jrummell 2015/11/24 22:34:41 Done.
55 return sample_format == kSampleFormatPlanarF32 ||
56 sample_format == kSampleFormatPlanarS16 ||
57 sample_format == kSampleFormatPlanarS32;
58 }
59
60 bool IsInterleaved(SampleFormat sample_format) {
61 return sample_format == kSampleFormatU8 ||
62 sample_format == kSampleFormatS16 ||
63 sample_format == kSampleFormatS32 || sample_format == kSampleFormatF32;
64 }
65
54 } // namespace media 66 } // namespace media
OLDNEW
« no previous file with comments | « media/base/sample_format.h ('k') | media/mojo/interfaces/decryptor.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698