Chromium Code Reviews| Index: ppapi/api/ppb_video_frame.idl |
| diff --git a/ppapi/api/ppb_video_frame.idl b/ppapi/api/ppb_video_frame.idl |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..6673e3cc6f09d6fce8b1a35677b8b7c8d75a004c |
| --- /dev/null |
| +++ b/ppapi/api/ppb_video_frame.idl |
| @@ -0,0 +1,87 @@ |
| +/* Copyright (c) 2013 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. |
| + */ |
| + |
| +/** |
| + * Defines the <code>PPB_VideoFrame</code> interface. |
| + */ |
| +label Chrome { |
| + M33 = 0.1 |
| +}; |
| + |
| +enum PP_VideoFrame_Format { |
| + /** |
| + * Unknown format value. |
| + */ |
| + PP_VIDEOFRAME_FORMAT_UNKNOWN = 0, |
| + |
| + /** |
| + * 12bpp YVU planar 1x1 Y, 2x2 VU samples |
| + */ |
| + PP_VIDEOFRAME_FORMAT_YV12 = 1, |
| + |
| + /** |
| + * 16bpp YVU planar 1x1 Y, 2x1 VU samples |
| + */ |
| + PP_VIDEOFRAME_FORMAT_YV16 = 2, |
| + |
| + /** |
| + * 12bpp YVU planar 1x1 Y, 2x2 VU samples |
| + */ |
| + PP_VIDEOFRAME_FORMAT_I420 = 3, |
| + |
| + /** |
| + * 20bpp YVU planar 1x1 Y, 2x2 VU, 1x1 A samples |
| + */ |
| + PP_VIDEOFRAME_FORMAT_YV12A = 4, |
| + |
| + /** |
| + * JPEG color range version of YV12 |
| + */ |
| + 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
|
| +}; |
| + |
| +interface PPB_VideoFrame { |
| + /** |
| + * Determines if a resource is a VideoFrame resource. |
| + * |
| + * @param[in] resource The <code>PP_Resource</code> to test. |
| + * |
| + * @return A <code>PP_Bool</code> with <code>PP_TRUE</code> if the given |
| + * resource is a VideoFrame resource or <code>PP_FALSE</code> otherwise. |
| + */ |
| + PP_Bool IsVideoFrame([in] PP_Resource resource); |
| + |
| + /** |
| + * 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.
|
| + * 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.
|
| + */ |
| + 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.
|
| + |
| + /** |
| + * Set the timestamp of the video frame. Given in seconds since the |
| + * start of the containing video stream. |
| + */ |
| + 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
|
| + |
| + /** |
| + * Get format of the video frame. |
| + */ |
| + PP_VideoFrame_Format GetFormat([in] PP_Resource resource); |
| + |
| + /** |
| + * Get size of the video frame. |
| + */ |
| + PP_Bool GetSize([in] PP_Resource resource, [out] PP_Size size); |
| + |
| + /** |
| + * Get data buffer for video frame pixels. |
| + */ |
| + mem_t GetDataBuffer([in] PP_Resource resource); |
| + |
| + /** |
| + * Get size of data buffer. |
| + */ |
| + uint32_t GetDataBufferSize([in] PP_Resource resource); |
| +}; |