Chromium Code Reviews| Index: media/base/audio_parameters.h |
| diff --git a/media/base/audio_parameters.h b/media/base/audio_parameters.h |
| index 2cb28c64bdfd5688f244324d1d80df0ba8fb9005..7dff8205006acd254a23fb102f46cc051da58a64 100644 |
| --- a/media/base/audio_parameters.h |
| +++ b/media/base/audio_parameters.h |
| @@ -41,6 +41,8 @@ struct MEDIA_EXPORT ALIGNAS(PARAMETERS_ALIGNMENT) AudioInputBufferParameters { |
| }; |
| struct MEDIA_EXPORT ALIGNAS(PARAMETERS_ALIGNMENT) AudioOutputBufferParameters { |
| uint32_t frames_skipped; |
| + uint32_t frames; |
| + uint32_t data_size; |
| }; |
| #undef PARAMETERS_ALIGNMENT |
| #if defined(OS_WIN) |
| @@ -72,6 +74,8 @@ class MEDIA_EXPORT AudioParameters { |
| enum Format { |
| AUDIO_PCM_LINEAR = 0, // PCM is 'raw' amplitude samples. |
| AUDIO_PCM_LOW_LATENCY, // Linear PCM, low latency requested. |
| + AUDIO_RAW_AC3, // Raw compressed AC3 bitstream. |
| + AUDIO_RAW_EAC3, // Raw compressed E-AC3 bitstream. |
| AUDIO_FAKE, // Creates a fake AudioOutputStream object. |
| AUDIO_FORMAT_LAST = AUDIO_FAKE, // Only used for validation of format. |
| }; |
| @@ -139,6 +143,11 @@ class MEDIA_EXPORT AudioParameters { |
| // Comparison with other AudioParams. |
| bool Equals(const AudioParameters& other) const; |
| + // Return true if |format_| is raw compressed audio. |
| + bool IsRawFormat() const { |
|
DaleCurtis
2016/11/01 23:05:13
Inline method must be hacker_style().
AndyWu
2016/11/04 18:04:24
Done.
|
| + return format_ == AUDIO_RAW_AC3 || format_ == AUDIO_RAW_EAC3; |
| + } |
| + |
| void set_format(Format format) { format_ = format; } |
| Format format() const { return format_; } |