|
1402 | 1402 | : <dfn attribute for=VideoEncoder>[[dequeue event scheduled]]</dfn>
|
1403 | 1403 | :: A boolean indicating whether a {{VideoEncoder/dequeue}} event is already
|
1404 | 1404 | scheduled to fire. Used to avoid event spam.
|
| 1405 | +: <dfn attribute for=VideoEncoder>[[active orientation]]</dfn> |
| 1406 | +:: An integer and boolean pair indicating the {{VideoFrame/[[flip]]}} and |
| 1407 | + {{VideoFrame/[[rotation]]}} of the first {{VideoFrame}} given to |
| 1408 | + {{VideoEncoder/encode()}} after {{VideoEncoder/configure()}}. |
1405 | 1409 |
|
1406 | 1410 | Constructors {#videoencoder-constructors}
|
1407 | 1411 | -----------------------------------------
|
|
1461 | 1465 | 2. If {{VideoEncoder/[[state]]}} is `"closed"`, throw an
|
1462 | 1466 | {{InvalidStateError}}.
|
1463 | 1467 | 3. Set {{VideoEncoder/[[state]]}} to `"configured"`.
|
1464 |
| - 4. [=Queue a control message=] to configure the encoder using |config|. |
1465 |
| - 5. [=Process the control message queue=]. |
| 1468 | + 4. Set {{VideoEncoder/[[active orientation]]}} to `null`. |
| 1469 | + 5. [=Queue a control message=] to configure the encoder using |config|. |
| 1470 | + 6. [=Process the control message queue=]. |
1466 | 1471 |
|
1467 | 1472 | [=Running a control message=] to configure the encoder means performing
|
1468 | 1473 | these steps:
|
|
1491 | 1496 | is `true`, throw a {{TypeError}}.
|
1492 | 1497 | 2. If {{VideoEncoder/[[state]]}} is not `"configured"`, throw an
|
1493 | 1498 | {{InvalidStateError}}.
|
1494 |
| - 3. Let |frameClone| hold the result of running the [=Clone VideoFrame=] |
| 1499 | + 3. If {{VideoEncoder/[[active orientation]]}} is not `null` and does not match |
| 1500 | + |frame|'s {{VideoFrame/[[rotation]]}} and {{VideoFrame/[[flip]]}} throw a |
| 1501 | + {{DataError}}. |
| 1502 | + 4. If {{VideoEncoder/[[active orientation]]}} is `null`, set it to |frame|'s |
| 1503 | + {{VideoFrame/[[rotation]]}} and {{VideoFrame/[[flip]]}}. |
| 1504 | + 5. Let |frameClone| hold the result of running the [=Clone VideoFrame=] |
1495 | 1505 | algorithm with |frame|.
|
1496 |
| - 4. Increment {{VideoEncoder/[[encodeQueueSize]]}}. |
1497 |
| - 5. [=Queue a control message=] to encode |frameClone|. |
1498 |
| - 6. [=Process the control message queue=]. |
| 1506 | + 6. Increment {{VideoEncoder/[[encodeQueueSize]]}}. |
| 1507 | + 7. [=Queue a control message=] to encode |frameClone|. |
| 1508 | + 8. [=Process the control message queue=]. |
1499 | 1509 |
|
1500 | 1510 | [=Running a control message=] to encode the frame means performing these
|
1501 | 1511 | steps:
|
|
1646 | 1656 | `outputConfig.displayAspectWidth`.
|
1647 | 1657 | 5. Assign `encoderConfig.displayHeight` to
|
1648 | 1658 | `outputConfig.displayAspectHeight`.
|
1649 |
| - 6. Assign the remaining keys of `outputConfig` as determined by |
| 1659 | + 6. Assign {{VideoFrame/[[rotation]]}} from the {{VideoFrame}} |
| 1660 | + associated with |output| to `outputConfig.rotation`. |
| 1661 | + 7. Assign {{VideoFrame/[[flip]]}} from the {{VideoFrame}} |
| 1662 | + associated with |output| to `outputConfig.flip`. |
| 1663 | + 8. Assign the remaining keys of `outputConfig` as determined by |
1650 | 1664 | {{VideoEncoder/[[codec implementation]]}}. The User Agent
|
1651 | 1665 | <em class="rfc2119">MUST</em> ensure that the configuration is
|
1652 | 1666 | completely described such that |outputConfig| could be used to
|
|
0 commit comments