Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 11 matching lines...) Expand all Loading... | |
| 22 case kSampleFormatPlanarF32: | 22 case kSampleFormatPlanarF32: |
| 23 return 4; | 23 return 4; |
| 24 case kSampleFormatMax: | 24 case kSampleFormatMax: |
| 25 break; | 25 break; |
| 26 } | 26 } |
| 27 | 27 |
| 28 NOTREACHED() << "Invalid sample format provided: " << sample_format; | 28 NOTREACHED() << "Invalid sample format provided: " << sample_format; |
| 29 return 0; | 29 return 0; |
| 30 } | 30 } |
| 31 | 31 |
| 32 const char* SampleFormatToString(SampleFormat sample_format) { | |
| 33 switch(sample_format) { | |
| 34 case kUnknownSampleFormat: | |
| 35 return "Unknown Sample Format"; | |
|
DaleCurtis
2013/08/05 22:33:35
Lower case second word+
Ty Overby
2013/08/05 22:37:45
Done.
| |
| 36 case kSampleFormatU8: | |
| 37 return "Unsigned 8-bit with bias of 128"; | |
| 38 case kSampleFormatS16: | |
| 39 return "Signed 16-bit"; | |
| 40 case kSampleFormatS32: | |
| 41 return "Signed 32-bit"; | |
| 42 case kSampleFormatF32: | |
| 43 return "Float 32-bit"; | |
| 44 case kSampleFormatPlanarS16: | |
| 45 return "Signed 16-bit planar"; | |
| 46 case kSampleFormatPlanarF32: | |
| 47 return "Float 32-bit planar"; | |
| 48 case kSampleFormatMax: | |
| 49 break; | |
| 50 } | |
| 51 NOTREACHED() << "Invalid sample format provided: " << sample_format; | |
| 52 return ""; | |
| 53 } | |
| 54 | |
| 32 } // namespace media | 55 } // namespace media |
| OLD | NEW |