| OLD | NEW |
| 1 /* Copyright 2014 The Chromium Authors. All rights reserved. | 1 /* Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 * Use of this source code is governed by a BSD-style license that can be | 2 * Use of this source code is governed by a BSD-style license that can be |
| 3 * found in the LICENSE file. | 3 * found in the LICENSE file. |
| 4 */ | 4 */ |
| 5 | 5 |
| 6 /** | 6 /** |
| 7 * Defines the <code>PPB_VideoFrame</code> interface. | 7 * Defines the <code>PPB_VideoFrame</code> interface. |
| 8 */ | 8 */ |
| 9 | 9 |
| 10 [generate_thunk] | 10 [generate_thunk] |
| 11 | 11 |
| 12 label Chrome { | 12 label Chrome { |
| 13 [channel=dev] M34 = 0.1 | 13 [channel=dev] M34 = 0.1 |
| 14 }; | 14 }; |
| 15 | 15 |
| 16 enum PP_VideoFrame_Format { | 16 enum PP_VideoFrame_Format { |
| 17 /** | 17 /** |
| 18 * Unknown format value. | 18 * Unknown format value. |
| 19 */ | 19 */ |
| 20 PP_VIDEOFRAME_FORMAT_UNKNOWN = 0, | 20 PP_VIDEOFRAME_FORMAT_UNKNOWN = 0, |
| 21 | 21 |
| 22 /** | 22 /** |
| 23 * 12bpp YVU planar 1x1 Y, 2x2 VU samples. | 23 * 12bpp YVU planar 1x1 Y, 2x2 VU samples. |
| 24 */ | 24 */ |
| 25 PP_VIDEOFRAME_FORMAT_YV12 = 1, | 25 PP_VIDEOFRAME_FORMAT_YV12 = 1, |
| 26 | 26 |
| 27 /** | 27 /** |
| 28 * 16bpp YVU planar 1x1 Y, 2x1 VU samples. | 28 * 12bpp YUV planar 1x1 Y, 2x2 UV samples. |
| 29 */ | 29 */ |
| 30 PP_VIDEOFRAME_FORMAT_YV16 = 2, | 30 PP_VIDEOFRAME_FORMAT_I420 = 2, |
| 31 | 31 |
| 32 /** | 32 /** |
| 33 * 12bpp YVU planar 1x1 Y, 2x2 UV samples. | 33 * 32bpp BGRA. |
| 34 */ | 34 */ |
| 35 PP_VIDEOFRAME_FORMAT_I420 = 3, | 35 PP_VIDEOFRAME_FORMAT_BGRA = 3, |
| 36 | 36 |
| 37 /** | 37 /** |
| 38 * 20bpp YVU planar 1x1 Y, 2x2 VU, 1x1 A samples. | 38 * The last format. |
| 39 */ | 39 */ |
| 40 PP_VIDEOFRAME_FORMAT_YV12A = 4, | 40 PP_VIDEOFRAME_FORMAT_LAST = PP_VIDEOFRAME_FORMAT_BGRA |
| 41 | |
| 42 /** | |
| 43 * JPEG color range version of YV12. | |
| 44 */ | |
| 45 PP_VIDEOFRAME_FORMAT_YV12J = 5 | |
| 46 }; | 41 }; |
| 47 | 42 |
| 48 interface PPB_VideoFrame { | 43 interface PPB_VideoFrame { |
| 49 /** | 44 /** |
| 50 * Determines if a resource is a VideoFrame resource. | 45 * Determines if a resource is a VideoFrame resource. |
| 51 * | 46 * |
| 52 * @param[in] resource The <code>PP_Resource</code> to test. | 47 * @param[in] resource The <code>PP_Resource</code> to test. |
| 53 * | 48 * |
| 54 * @return A <code>PP_Bool</code> with <code>PP_TRUE</code> if the given | 49 * @return A <code>PP_Bool</code> with <code>PP_TRUE</code> if the given |
| 55 * resource is a VideoFrame resource or <code>PP_FALSE</code> otherwise. | 50 * resource is a VideoFrame resource or <code>PP_FALSE</code> otherwise. |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 /** | 112 /** |
| 118 * Gets the size of data buffer. | 113 * Gets the size of data buffer. |
| 119 * | 114 * |
| 120 * @param[in] frame A <code>PP_Resource</code> corresponding to a video frame | 115 * @param[in] frame A <code>PP_Resource</code> corresponding to a video frame |
| 121 * resource. | 116 * resource. |
| 122 * | 117 * |
| 123 * @return The size of the data buffer. | 118 * @return The size of the data buffer. |
| 124 */ | 119 */ |
| 125 uint32_t GetDataBufferSize([in] PP_Resource frame); | 120 uint32_t GetDataBufferSize([in] PP_Resource frame); |
| 126 }; | 121 }; |
| OLD | NEW |