@@ -173,97 +173,6 @@ pc.ontrack = e => {
173173}
174174</pre >
175175
176- ## API
177-
178- The following are the IDL modifications proposed by this API.
179- Future iterations may add additional operations following a similar pattern.
180-
181- <pre >
182- // New enum for video frame types. Will eventually re-use the equivalent defined
183- // by WebCodecs.
184- enum RTCEncodedVideoFrameType {
185- "empty",
186- "key",
187- "delta",
188- };
189-
190- // New dictionaries for video and audio metadata.
191- dictionary RTCEncodedVideoFrameMetadata {
192- long long frameId;
193- sequence< ; long long> ; dependencies;
194- unsigned short width;
195- unsigned short height;
196- long spatialIndex;
197- long temporalIndex;
198- long synchronizationSource;
199- sequence< ; long> ; contributingSources;
200- };
201-
202- dictionary RTCEncodedAudioFrameMetadata {
203- long synchronizationSource;
204- sequence< ; long> ; contributingSources;
205- };
206-
207- // New interfaces to define encoded video and audio frames. Will eventually
208- // re-use or extend the equivalent defined in WebCodecs.
209- // The additionalData fields contain metadata about the frame and will
210- // eventually be exposed differently.
211- interface RTCEncodedVideoFrame {
212- readonly attribute RTCEncodedVideoFrameType type;
213- readonly attribute unsigned long long timestamp;
214- attribute ArrayBuffer data;
215- RTCVideoFrameMetadata getMetadata();
216- };
217-
218- interface RTCEncodedAudioFrame {
219- readonly attribute unsigned long long timestamp;
220- attribute ArrayBuffer data;
221- RTCAudioFrameMetadata getMetadata();
222- };
223-
224- // New methods for RTCRtpSender and RTCRtpReceiver
225- typedef (SFrameTransform or RTCRtpScriptTransform) RTCRtpTransform;
226-
227- // New methods for RTCRtpSender and RTCRtpReceiver
228- partial interface RTCRtpSender {
229- attribute RTCRtpTransform? transform;
230- };
231-
232- partial interface RTCRtpReceiver {
233- attribute RTCRtpTransform? transform;
234- };
235-
236- [Exposed=(Window,Worker)]
237- interface SFrameTransform {
238- constructor(optional SFrameTransformOptions options = {});
239- Promise<undefined > setEncryptionKey(CryptoKey key, optional unsigned long long keyID);
240- };
241-
242- [Exposed=Worker]
243- interface RTCTransformEvent : Event {
244- readonly attribute RTCRtpScriptTransformer transformer;
245- };
246-
247- partial interface DedicatedWorkerGlobalScope {
248- attribute EventHandler onrtctransform;
249- };
250-
251- // FIXME: We want to expose only in dedicated worker scopes.
252- [Exposed=Worker]
253- interface RTCRtpScriptTransformer {
254- readonly attribute ReadableStream readable;
255- readonly attribute WritableStream writable;
256- readonly attribute any options;
257- };
258-
259- [Exposed=Window]
260- interface RTCRtpScriptTransform {
261- constructor(Worker worker, optional any options);
262- // FIXME: add messaging methods.
263- };
264-
265- </pre >
266-
267176## Design considerations ##
268177
269178This design is built upon the Streams API. This is a natural interface
0 commit comments