OLD | NEW |
---|---|
(Empty) | |
1 /* Copyright (c) 2013 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 | |
6 /** | |
7 * Defines the <code>PPB_VideoFrame</code> interface. | |
8 */ | |
9 label Chrome { | |
10 M33 = 0.1 | |
11 }; | |
12 | |
13 enum PP_VideoFrame_Format { | |
14 /** | |
15 * Unknown format value. | |
16 */ | |
17 PP_VIDEOFRAME_FORMAT_UNKNOWN = 0, | |
18 | |
19 /** | |
20 * 12bpp YVU planar 1x1 Y, 2x2 VU samples | |
21 */ | |
22 PP_VIDEOFRAME_FORMAT_YV12 = 1, | |
23 | |
24 /** | |
25 * 16bpp YVU planar 1x1 Y, 2x1 VU samples | |
26 */ | |
27 PP_VIDEOFRAME_FORMAT_YV16 = 2, | |
28 | |
29 /** | |
30 * 12bpp YVU planar 1x1 Y, 2x2 VU samples | |
31 */ | |
32 PP_VIDEOFRAME_FORMAT_I420 = 3, | |
33 | |
34 /** | |
35 * 20bpp YVU planar 1x1 Y, 2x2 VU, 1x1 A samples | |
36 */ | |
37 PP_VIDEOFRAME_FORMAT_YV12A = 4, | |
38 | |
39 /** | |
40 * JPEG color range version of YV12 | |
41 */ | |
42 PP_VIDEOFRAME_FORMAT_YV12J = 7 | |
dmichael (off chromium)
2013/12/20 17:42:52
Why is this 7?
Are all of these uncompressed, an
yzshen1
2013/12/20 17:52:26
I can see that you want to match the enum values o
Peng
2013/12/20 18:49:17
I think it is uncompressed too. Just the color ran
| |
43 }; | |
44 | |
45 interface PPB_VideoFrame { | |
46 /** | |
47 * Determines if a resource is a VideoFrame resource. | |
48 * | |
49 * @param[in] resource The <code>PP_Resource</code> to test. | |
50 * | |
51 * @return A <code>PP_Bool</code> with <code>PP_TRUE</code> if the given | |
52 * resource is a VideoFrame resource or <code>PP_FALSE</code> otherwise. | |
53 */ | |
54 PP_Bool IsVideoFrame([in] PP_Resource resource); | |
55 | |
56 /** | |
57 * Get timestamp of the video frame. Given in seconds since the | |
yzshen1
2013/12/20 17:52:26
Get*s* (Here and similar issues below.)
Peng
2013/12/20 20:55:31
Done.
| |
58 * start of the containing video stream. | |
yzshen1
2013/12/20 17:52:26
You could use @param[in] @return to be consistent.
Peng
2013/12/20 20:55:31
Done.
| |
59 */ | |
60 PP_TimeDelta GetTimestamp([in] PP_Resource resource); | |
yzshen1
2013/12/20 17:52:26
Please change all |resource| below to |video_frame
Peng
2013/12/20 20:55:31
Done.
| |
61 | |
62 /** | |
63 * Set the timestamp of the video frame. Given in seconds since the | |
64 * start of the containing video stream. | |
65 */ | |
66 void SetTimestamp([in] PP_Resource resource, [in] PP_TimeDelta timestamp); | |
dmichael (off chromium)
2013/12/20 17:42:52
Hmm, you know, any Pepper calls we make require ac
Peng
2013/12/20 18:49:17
What about the GetTimestamp() and other Get functi
yzshen1
2013/12/20 23:37:43
IMO, the current PP_Resource way seems cleaner.
I
| |
67 | |
68 /** | |
69 * Get format of the video frame. | |
70 */ | |
71 PP_VideoFrame_Format GetFormat([in] PP_Resource resource); | |
72 | |
73 /** | |
74 * Get size of the video frame. | |
75 */ | |
76 PP_Bool GetSize([in] PP_Resource resource, [out] PP_Size size); | |
77 | |
78 /** | |
79 * Get data buffer for video frame pixels. | |
80 */ | |
81 mem_t GetDataBuffer([in] PP_Resource resource); | |
82 | |
83 /** | |
84 * Get size of data buffer. | |
85 */ | |
86 uint32_t GetDataBufferSize([in] PP_Resource resource); | |
87 }; | |
OLD | NEW |