Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(32)

Side by Side Diff: ppapi/shared_impl/media_stream_frame.h

Issue 128683003: [PPAPI] Implement media stream video track API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@video_track_impl_cl
Patch Set: Fix review issues Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ppapi/proxy/video_frame_resource.cc ('k') | ppapi/shared_impl/media_stream_frame_buffer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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 "ppapi/c/ppb_video_frame.h"
9
10 namespace ppapi {
11
12 union MediaStreamFrame {
13 enum Type {
14 TYPE_UNKNOWN = 0,
15 TYPE_AUDIO = 1,
16 TYPE_VIDEO = 2,
17 };
18
19 struct Header {
20 Type type;
21 uint32_t size;
22 };
23 PP_COMPILE_ASSERT_SIZE_IN_BYTES(Header, 8);
24
25 struct Audio {
26 Header header;
27 // TODO(penghuang): implement the audio frame.
28 };
29 PP_COMPILE_ASSERT_SIZE_IN_BYTES(Audio, 8);
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[0];
dmichael (off chromium) 2014/01/13 21:26:47 zero-sized arrays are non-standard, I think. This
Peng 2014/01/14 15:55:56 Done.
38 };
39 PP_COMPILE_ASSERT_SIZE_IN_BYTES(Video, 32);
40
41 Header header;
42 Video video;
43 Audio audio;
44 };
45
46 } // namespace ppapi
47
48 #endif // PPAPI_SHARED_IMPL_MEDIA_STREAM_FRAME_H_
OLDNEW
« no previous file with comments | « ppapi/proxy/video_frame_resource.cc ('k') | ppapi/shared_impl/media_stream_frame_buffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698