1 // Copyright 2014 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 PPAPI_SHARED_IMPL_MEDIA_STREAM_FRAME_H_
6 #define PPAPI_SHARED_IMPL_MEDIA_STREAM_FRAME_H_
8 #include "ppapi/c/ppb_video_frame.h"
12 union MediaStreamFrame {
26 // TODO(penghuang): implement the audio frame.
31 PP_TimeDelta timestamp;
32 PP_VideoFrame_Format format;
35 // Uses 8 bytes to make sure the Video struct has consistent size between
36 // Nacl code and renderer code.
40 // Because these structs are written and read in shared memory, we need
41 // the size and alighment to be consistent between NaCl and its host trusted
43 PP_COMPILE_ASSERT_SIZE_IN_BYTES(Header, 8);
44 PP_COMPILE_ASSERT_SIZE_IN_BYTES(Audio, 8);
45 PP_COMPILE_ASSERT_SIZE_IN_BYTES(Video, 40);
54 #endif // PPAPI_SHARED_IMPL_MEDIA_STREAM_FRAME_H_