|
3767 | 3767 | 5. If `destination.byteLength` is less than |combinedLayout|'s [=combined |
3768 | 3768 | buffer layout/allocationSize=], return a promise rejected with a |
3769 | 3769 | {{TypeError}}. |
3770 | | - 6. If |options|.{{VideoFrameCopyToOptions/format}} does not equal |
3771 | | - {{VideoFrame/[[format]]}} and |options|.{{VideoFrameCopyToOptions/format}} |
3772 | | - is equal to one of {{RGBA}}, {{RGBX}}, {{BGRA}}, {{BGRX}} then: |
| 3770 | + 6. If |options|.{{VideoFrameCopyToOptions/format}} is equal to one of |
| 3771 | + {{RGBA}}, {{RGBX}}, {{BGRA}}, {{BGRX}} then: |
3773 | 3772 | 1. Let |newOptions| be the result of running the <a>Clone Configuration</a> |
3774 | 3773 | algorithm with |options|. |
3775 | 3774 | 2. Assign `undefined` to |newOptions|.{{VideoFrameCopyToOptions/format}} |
|
3782 | 3781 | algorithm with |options|.{{VideoFrameCopyToOptions/format}}, |rect|, and `options.colorSpace`. |
3783 | 3782 | 7. Return the result of calling {{VideoFrame/copyTo()}} on |rgbFrame| with |
3784 | 3783 | |destination| and |newOptions|. |
3785 | | - 7. Let |p| be a new {{Promise}}. |
3786 | | - 8. Let |copyStepsQueue| be the result of starting a new [=parallel queue=]. |
3787 | | - 9. Let |planeLayouts| be a new [=list=]. |
3788 | | - 10. Enqueue the following steps to |copyStepsQueue|: |
| 3784 | + 7. Otherwise, if |options|.{{VideoFrameCopyToOptions/format}} is not `undefined` or `null` |
| 3785 | + throw a {{NotSupportedError}} {{DOMException}}. |
| 3786 | + 8. Let |p| be a new {{Promise}}. |
| 3787 | + 9. Let |copyStepsQueue| be the result of starting a new [=parallel queue=]. |
| 3788 | + 10. Let |planeLayouts| be a new [=list=]. |
| 3789 | + 11. Enqueue the following steps to |copyStepsQueue|: |
3789 | 3790 | 1. Let resource be the [=media resource=] referenced by |
3790 | 3791 | [[resource reference]]. |
3791 | 3792 | 2. Let |numPlanes| be the number of planes as defined by |
|
3822 | 3823 | 10. Increment |planeIndex| by `1`. |
3823 | 3824 | 11. Append |layout| to |planeLayouts|. |
3824 | 3825 | 5. [=Queue a task=] to resolve |p| with |planeLayouts|. |
3825 | | - 11. Return |p|. |
| 3826 | + 12. Return |p|. |
3826 | 3827 |
|
3827 | 3828 | : <dfn method for=VideoFrame>clone()</dfn> |
3828 | 3829 | :: Creates a new {{VideoFrame}} with a reference to the same |
|
4328 | 4329 | invalid to specify planes that overlap. |
4329 | 4330 | : <dfn dict-member for=VideoFrameCopyToOptions>format</dfn> |
4330 | 4331 | :: A {{VideoPixelFormat}} for the pixel data in the destination |
4331 | | - {{BufferSource}}. Potential values are: |
4332 | | - {{RGBA}}, {{RGBX}}, {{BGRA}}, {{BGRX}} and values of {{VideoFrame/format}}. |
4333 | | - If unspecified or `null`, the {{VideoFrame/format}} is used. |
| 4332 | + {{BufferSource}}. Potential values are: {{RGBA}}, {{RGBX}}, {{BGRA}}, |
| 4333 | + {{BGRX}}. If unspecified or `null`, the the destination |
| 4334 | + {{BufferSource}} will match {{VideoFrame/format}} . |
4334 | 4335 | : <dfn dict-member for=VideoFrameCopyToOptions>colorSpace</dfn> |
4335 | 4336 | :: A {{PredefinedColorSpace}} that <em class="rfc2119">SHALL</em> be used as |
4336 | 4337 | a target color space for the pixel data in the destination |
|
0 commit comments