Chromium Code Reviews| Index: ppapi/shared_impl/media_stream_frame.h |
| diff --git a/ppapi/shared_impl/media_stream_frame.h b/ppapi/shared_impl/media_stream_frame.h |
| index b3ec8bb213f93fbcef2c0323367ac5968f8282ba..5b3f9664ba7a794e5092e7a43d9dd6ce43db0d5f 100644 |
| --- a/ppapi/shared_impl/media_stream_frame.h |
| +++ b/ppapi/shared_impl/media_stream_frame.h |
| @@ -5,6 +5,7 @@ |
| #ifndef PPAPI_SHARED_IMPL_MEDIA_STREAM_FRAME_H_ |
| #define PPAPI_SHARED_IMPL_MEDIA_STREAM_FRAME_H_ |
| +#include "ppapi/c/ppb_audio_frame.h" |
| #include "ppapi/c/ppb_video_frame.h" |
| namespace ppapi { |
| @@ -23,7 +24,14 @@ union MediaStreamFrame { |
| struct Audio { |
| Header header; |
| - // TODO(penghuang): implement the audio frame. |
| + PP_TimeDelta timestamp; |
| + PP_AudioSampleRate sample_rate; |
| + uint32_t number_of_channels; |
| + uint32_t number_of_samples; |
| + uint32_t data_size; |
| + // Uses 8 bytes to make sure the Audio struct has consistent size between |
| + // Nacl code and renderer code. |
|
dmichael (off chromium)
2014/01/16 22:34:20
nit: s/Nacl/NaCl
Peng
2014/01/17 00:23:49
Done.
|
| + uint8_t data[8]; |
| }; |
| struct Video { |
| @@ -41,7 +49,7 @@ union MediaStreamFrame { |
| // the size and alighment to be consistent between NaCl and its host trusted |
| // platform. |
| PP_COMPILE_ASSERT_SIZE_IN_BYTES(Header, 8); |
| - PP_COMPILE_ASSERT_SIZE_IN_BYTES(Audio, 8); |
| + PP_COMPILE_ASSERT_SIZE_IN_BYTES(Audio, 40); |
| PP_COMPILE_ASSERT_SIZE_IN_BYTES(Video, 40); |
| Header header; |