|
30 | 30 |
|
31 | 31 | <pre class=link-defaults> |
32 | 32 | spec:html; type:attribute; text:hidden |
| 33 | +spec:html; type:enum-value; text:srgb |
33 | 34 | spec:infra; type:dfn; text:list |
34 | 35 | spec:infra; type:dfn; text:enqueue |
35 | 36 | </pre> |
|
3766 | 3767 | 5. If `destination.byteLength` is less than |combinedLayout|'s [=combined |
3767 | 3768 | buffer layout/allocationSize=], return a promise rejected with a |
3768 | 3769 | {{TypeError}}. |
3769 | | - 6. If `options.format` does not equal to {{VideoFrame/[[format]]}} and |
3770 | | - `options.format` is equal to one of {{RGBA}}, {{RGBX}}, {{BGRA}}, {{BGRX}} |
3771 | | - then: |
3772 | | - 1. Let |serializedOptions| be [$StructuredSerialize$](|options|) |
3773 | | - 2. Let |newOptions| be [$StructuredDeserialize$](|serializedOptions|, [=the current Realm=]). |
3774 | | - 3. Set |newOptions.format| to `undefined` |
3775 | | - 4. Let |rgbFrame| be the result of running the [=VideoFrame/Convert to RGB frame=] |
3776 | | - algorithm with `options.format`, `options.rect`, and `options.colorSpace`. |
3777 | | - 5. Return the result of calling {{VideoFrame/copyTo()}} on |rgbFrame| with |
| 3770 | + 6. If |options|.{{VideoFrameCopyToOptions/format}} does not equal to |
| 3771 | + {{VideoFrame/[[format]]}} and |options|.{{VideoFrameCopyToOptions/format}} |
| 3772 | + is equal to one of {{RGBA}}, {{RGBX}}, {{BGRA}}, {{BGRX}} then: |
| 3773 | + 1. Let |newOptions| be the result of running the <a>Clone Configuration</a> |
| 3774 | + algorithm with |options|. |
| 3775 | + 2. Assign `undefined` to |newOptions|.{{VideoFrameCopyToOptions/format}} |
| 3776 | + and |newOptions|.{{VideoFrameCopyToOptions/rect}}. |
| 3777 | + 3. Let |rect| be `undefined`. |
| 3778 | + 4. If |options|.{{VideoFrameCopyToOptions/rect}} [=map/exists=], assign the |
| 3779 | + value of |options|.{{VideoFrameCopyToOptions/rect}} to |rect|. |
| 3780 | + 5. Otherwise, assign the value of {{VideoFrame/visibleRect}} to |rect|. |
| 3781 | + 6. Let |rgbFrame| be the result of running the [=VideoFrame/Convert to RGB frame=] |
| 3782 | + algorithm with |options|.{{VideoFrameCopyToOptions/format}}, |rect|, and `options.colorSpace`. |
| 3783 | + 7. Return the result of calling {{VideoFrame/copyTo()}} on |rgbFrame| with |
3778 | 3784 | |destination| and |newOptions|. |
3779 | 3785 | 7. Let |p| be a new {{Promise}}. |
3780 | 3786 | 8. Let |copyStepsQueue| be the result of starting a new [=parallel queue=]. |
|
4322 | 4328 | invalid to specify planes that overlap. |
4323 | 4329 | : <dfn dict-member for=VideoFrameCopyToOptions>format</dfn> |
4324 | 4330 | :: A {{VideoPixelFormat}} for the pixel data in the destination |
4325 | | - {{BufferSource}}. Explicit values can be: |
4326 | | - {{RGBA}}, {{RGBX}}, {{BGRA}}, {{BGRX}} or the same as {{VideoFrame/format}}. |
| 4331 | + {{BufferSource}}. Potential values are: |
| 4332 | + {{RGBA}}, {{RGBX}}, {{BGRA}}, {{BGRX}} and values of {{VideoFrame/format}}. |
4327 | 4333 | If unspecified, the {{VideoFrame/format}} is used. |
4328 | 4334 | : <dfn dict-member for=VideoFrameCopyToOptions>colorSpace</dfn> |
4329 | 4335 | :: A {{PredefinedColorSpace}} that <em class="rfc2119">SHALL</em> be used to as |
4330 | 4336 | a target color space for for the pixel data in the destination |
4331 | | - {{BufferSource}}. |
| 4337 | + {{BufferSource}}. If unspecified, {{srgb}} is used. |
4332 | 4338 |
|
4333 | 4339 |
|
4334 | 4340 | DOMRects in VideoFrame {#videoframe-domrect} |
|
0 commit comments