Web Speech API: cancel outstanding infobar requests when aborting.
[chromium-blink-merge.git] / media / base / sample_format.h
blob3d2799fa1287e54b6827c3c95be5573daad0ab3c
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
3 // found in the LICENSE file.
5 #ifndef MEDIA_BASE_SAMPLE_FORMAT_H
6 #define MEDIA_BASE_SAMPLE_FORMAT_H
8 #include "media/base/media_export.h"
10 namespace media {
12 enum SampleFormat {
13 // These values are histogrammed over time; do not change their ordinal
14 // values. When deleting a sample format replace it with a dummy value; when
15 // adding a sample format, do so at the bottom before kSampleFormatMax.
16 kUnknownSampleFormat = 0,
17 kSampleFormatU8, // Unsigned 8-bit w/ bias of 128.
18 kSampleFormatS16, // Signed 16-bit.
19 kSampleFormatS32, // Signed 32-bit.
20 kSampleFormatF32, // Float 32-bit.
21 kSampleFormatPlanarS16, // Signed 16-bit planar.
22 kSampleFormatPlanarF32, // Float 32-bit planar.
24 // Must always be last!
25 kSampleFormatMax
28 // Returns the number of bytes used per channel for the specified
29 // |sample_format|.
30 MEDIA_EXPORT int SampleFormatToBytesPerChannel(SampleFormat sample_format);
32 // Returns the name of the sample format as a string
33 MEDIA_EXPORT const char* SampleFormatToString(SampleFormat sample_format);
35 } // namespace media
37 #endif // MEDIA_BASE_SAMPLE_FORMAT_H