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 [channel=dev] M33 = 0.1 | |
yzshen1
2013/12/20 23:37:43
M34?
Peng
2013/12/23 02:41:49
Done.
| |
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 = 5 | |
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 * Gets timestamp of the video frame. | |
58 * | |
59 * @param[in] frame A <code>PP_Resource</code> corresponding to a video frame | |
60 * resource. | |
61 * | |
62 * @return A <code>PP_TimeDelta</code> containing timestamp of the video | |
63 * frame. Given in seconds since the start of the containing video stream. | |
64 */ | |
65 PP_TimeDelta GetTimestamp([in] PP_Resource frame); | |
66 | |
67 /** | |
68 * Sets the timestamp of the video frame. Given in seconds since the | |
69 * start of the containing video stream. | |
70 * | |
71 * @param[in] frame A <code>PP_Resource</code> corresponding to a video frame | |
72 * resource. | |
73 * @param[in] timestamp A <code>PP_TimeDelta</code> containing the timestamp | |
74 * of the video frame. Given in seconds since the start of the containing | |
75 * video stream. | |
76 */ | |
77 void SetTimestamp([in] PP_Resource frame, [in] PP_TimeDelta timestamp); | |
78 | |
79 /** | |
80 * Gets format of the video frame. | |
81 * | |
82 * @param[in] frame A <code>PP_Resource</code> corresponding to a video frame | |
83 * resource. | |
84 * | |
85 * @return A <code>PP_VideoFrame_Format</code> containing the format of the | |
86 * video frame. | |
87 */ | |
88 PP_VideoFrame_Format GetFormat([in] PP_Resource frame); | |
89 | |
90 /** | |
91 * Gets size of the video frame. | |
92 * | |
93 * @param[in] frame A <code>PP_Resource</code> corresponding to a video frame | |
94 * resource. | |
95 * | |
96 * @return A <code>PP_Size<code> containing the size of the video frame. | |
97 */ | |
98 PP_Size GetSize([in] PP_Resource frame, [out] PP_Size size); | |
99 | |
100 /** | |
101 * Gets data buffer for video frame pixels. | |
102 * | |
103 * @param[in] frame A <code>PP_Resource</code> corresponding to a video frame | |
104 * resource. | |
105 * | |
106 * @return A pointer to the beginning of data buffer. | |
107 */ | |
108 mem_t GetDataBuffer([in] PP_Resource frame); | |
109 | |
110 /** | |
111 * Gets size of data buffer. | |
112 * | |
113 * @param[in] frame A <code>PP_Resource</code> corresponding to a video frame | |
114 * resource. | |
115 * | |
116 * @return The size of the data buffer. | |
117 */ | |
118 uint32_t GetDataBufferSize([in] PP_Resource frame); | |
119 }; | |
OLD | NEW |