OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 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. | |
4 | |
5 #ifndef PPAPI_SHARED_IMPL_MEDIA_STREAM_FRAME_H_ | |
6 #define PPAPI_SHARED_IMPL_MEDIA_STREAM_FRAME_H_ | |
7 | |
8 #include <string> | |
9 | |
10 #include "ppapi/c/ppb_video_frame.h" | |
11 | |
12 namespace ppapi { | |
13 | |
14 union MediaStreamFrame { | |
15 enum Type { | |
16 TYPE_UNKNOWN = 0, | |
17 TYPE_AUDIO = 1, | |
18 TYPE_VIDEO = 2, | |
19 }; | |
20 | |
21 struct Header { | |
22 Type type; | |
23 uint32_t size; | |
24 }; | |
25 | |
26 struct Audio { | |
27 Header header; | |
28 // TODO(penghuang): implement the audio frame. | |
29 }; | |
30 | |
31 struct Video { | |
32 Header header; | |
33 PP_TimeDelta timestamp; | |
34 PP_VideoFrame_Format format; | |
35 PP_Size size; | |
36 uint32_t data_size; | |
37 uint8_t data[1]; | |
38 }; | |
39 | |
40 Header header; | |
41 Video video; | |
42 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.
| |
43 }; | |
44 | |
45 } // namespace ppapi | |
46 | |
47 #endif // PPAPI_SHARED_IMPL_MEDIA_STREAM_FRAME_H_ | |
OLD | NEW |