Re: [webrtc-encoded-transform] Need to create RTCEncodedVideoFrame from scratch (#134)

+1

This is critical for both the "bring your own codec" use case (as sender) and the "bring your own transport" use case (as a receiver).

We'll want an RTCEncodedAudioFrame constructor as well, and that's probably more simple to do since there isn't as much difficult with different payload formats and packetization for different codecs.

The addition to the spec could be as simple as what WebCodecs does, with a few tweaks:

```
partial interface RTCEncodedAudioFrame {
  constructor(RTCEncodedAudioFrameInit init);
}

dictionary RTCEncodedAudioFrameInit {
  required unsigned long timestamp;
  required AllowSharedBufferSource data;
  RTCEncodedAudioFrameMetadata metadata;
};

partial interface RTCEncodedVideoFrame {
  constructor(RTCEncodedVideoFrameInit init);
};

dictionary EncodedVideoChunkInit {
  required RTCEncodedVideoFrameType type;
  readonly attribute unsigned long timestamp;
  attribute ArrayBuffer data;
  RTCEncodedVideoFrameMetadata metadata;
};
```




-- 
GitHub Notification of comment by pthatcher
Please view or discuss this issue at https://github.com/w3c/webrtc-encoded-transform/issues/134#issuecomment-1245621798 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Tuesday, 13 September 2022 16:02:26 UTC