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 |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..0dbdea70fe3c32f125d88f0e83c1f128359607cf |
| --- /dev/null |
| +++ b/ppapi/shared_impl/media_stream_frame.h |
| @@ -0,0 +1,47 @@ |
| +// Copyright (c) 2014 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef PPAPI_SHARED_IMPL_MEDIA_STREAM_FRAME_H_ |
| +#define PPAPI_SHARED_IMPL_MEDIA_STREAM_FRAME_H_ |
| + |
| +#include <string> |
| + |
| +#include "ppapi/c/ppb_video_frame.h" |
| + |
| +namespace ppapi { |
| + |
| +union MediaStreamFrame { |
| + enum Type { |
| + TYPE_UNKNOWN = 0, |
| + TYPE_AUDIO = 1, |
| + TYPE_VIDEO = 2, |
| + }; |
| + |
| + struct Header { |
| + Type type; |
| + uint32_t size; |
| + }; |
| + |
| + struct Audio { |
| + Header header; |
| + // TODO(penghuang): implement the audio frame. |
| + }; |
| + |
| + struct Video { |
| + Header header; |
| + PP_TimeDelta timestamp; |
| + PP_VideoFrame_Format format; |
| + PP_Size size; |
| + uint32_t data_size; |
| + uint8_t data[1]; |
| + }; |
| + |
| + Header header; |
| + Video video; |
| + Audio audio; |
|
dmichael (off chromium)
2014/01/09 21:06:47
I think you need to add compile assertions to enfo
Peng
2014/01/10 19:14:30
Done.
|
| +}; |
| + |
| +} // namespace ppapi |
| + |
| +#endif // PPAPI_SHARED_IMPL_MEDIA_STREAM_FRAME_H_ |