1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[cfg(web_sys_unstable_apis)]
6#[wasm_bindgen]
7extern "C" {
8 # [wasm_bindgen (extends = :: js_sys :: Object , js_name = VideoFrame , typescript_type = "VideoFrame")]
9 #[derive(Debug, Clone, PartialEq, Eq)]
10 #[doc = "The `VideoFrame` class."]
11 #[doc = ""]
12 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoFrame)"]
13 #[doc = ""]
14 #[doc = "*This API requires the following crate features to be activated: `VideoFrame`*"]
15 #[doc = ""]
16 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
17 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
18 pub type VideoFrame;
19 #[cfg(web_sys_unstable_apis)]
20 #[cfg(feature = "VideoPixelFormat")]
21 # [wasm_bindgen (structural , method , getter , js_class = "VideoFrame" , js_name = format)]
22 #[doc = "Getter for the `format` field of this object."]
23 #[doc = ""]
24 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoFrame/format)"]
25 #[doc = ""]
26 #[doc = "*This API requires the following crate features to be activated: `VideoFrame`, `VideoPixelFormat`*"]
27 #[doc = ""]
28 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
29 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
30 pub fn format(this: &VideoFrame) -> Option<VideoPixelFormat>;
31 #[cfg(web_sys_unstable_apis)]
32 # [wasm_bindgen (structural , method , getter , js_class = "VideoFrame" , js_name = codedWidth)]
33 #[doc = "Getter for the `codedWidth` field of this object."]
34 #[doc = ""]
35 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoFrame/codedWidth)"]
36 #[doc = ""]
37 #[doc = "*This API requires the following crate features to be activated: `VideoFrame`*"]
38 #[doc = ""]
39 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
40 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
41 pub fn coded_width(this: &VideoFrame) -> u32;
42 #[cfg(web_sys_unstable_apis)]
43 # [wasm_bindgen (structural , method , getter , js_class = "VideoFrame" , js_name = codedHeight)]
44 #[doc = "Getter for the `codedHeight` field of this object."]
45 #[doc = ""]
46 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoFrame/codedHeight)"]
47 #[doc = ""]
48 #[doc = "*This API requires the following crate features to be activated: `VideoFrame`*"]
49 #[doc = ""]
50 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
51 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
52 pub fn coded_height(this: &VideoFrame) -> u32;
53 #[cfg(web_sys_unstable_apis)]
54 #[cfg(feature = "DomRectReadOnly")]
55 # [wasm_bindgen (structural , method , getter , js_class = "VideoFrame" , js_name = codedRect)]
56 #[doc = "Getter for the `codedRect` field of this object."]
57 #[doc = ""]
58 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoFrame/codedRect)"]
59 #[doc = ""]
60 #[doc = "*This API requires the following crate features to be activated: `DomRectReadOnly`, `VideoFrame`*"]
61 #[doc = ""]
62 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
63 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
64 pub fn coded_rect(this: &VideoFrame) -> Option<DomRectReadOnly>;
65 #[cfg(web_sys_unstable_apis)]
66 #[cfg(feature = "DomRectReadOnly")]
67 # [wasm_bindgen (structural , method , getter , js_class = "VideoFrame" , js_name = visibleRect)]
68 #[doc = "Getter for the `visibleRect` field of this object."]
69 #[doc = ""]
70 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoFrame/visibleRect)"]
71 #[doc = ""]
72 #[doc = "*This API requires the following crate features to be activated: `DomRectReadOnly`, `VideoFrame`*"]
73 #[doc = ""]
74 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
75 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
76 pub fn visible_rect(this: &VideoFrame) -> Option<DomRectReadOnly>;
77 #[cfg(web_sys_unstable_apis)]
78 # [wasm_bindgen (structural , method , getter , js_class = "VideoFrame" , js_name = rotation)]
79 #[doc = "Getter for the `rotation` field of this object."]
80 #[doc = ""]
81 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoFrame/rotation)"]
82 #[doc = ""]
83 #[doc = "*This API requires the following crate features to be activated: `VideoFrame`*"]
84 #[doc = ""]
85 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
86 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
87 pub fn rotation(this: &VideoFrame) -> f64;
88 #[cfg(web_sys_unstable_apis)]
89 # [wasm_bindgen (structural , method , getter , js_class = "VideoFrame" , js_name = flip)]
90 #[doc = "Getter for the `flip` field of this object."]
91 #[doc = ""]
92 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoFrame/flip)"]
93 #[doc = ""]
94 #[doc = "*This API requires the following crate features to be activated: `VideoFrame`*"]
95 #[doc = ""]
96 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
97 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
98 pub fn flip(this: &VideoFrame) -> bool;
99 #[cfg(web_sys_unstable_apis)]
100 # [wasm_bindgen (structural , method , getter , js_class = "VideoFrame" , js_name = displayWidth)]
101 #[doc = "Getter for the `displayWidth` field of this object."]
102 #[doc = ""]
103 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoFrame/displayWidth)"]
104 #[doc = ""]
105 #[doc = "*This API requires the following crate features to be activated: `VideoFrame`*"]
106 #[doc = ""]
107 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
108 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
109 pub fn display_width(this: &VideoFrame) -> u32;
110 #[cfg(web_sys_unstable_apis)]
111 # [wasm_bindgen (structural , method , getter , js_class = "VideoFrame" , js_name = displayHeight)]
112 #[doc = "Getter for the `displayHeight` field of this object."]
113 #[doc = ""]
114 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoFrame/displayHeight)"]
115 #[doc = ""]
116 #[doc = "*This API requires the following crate features to be activated: `VideoFrame`*"]
117 #[doc = ""]
118 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
119 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
120 pub fn display_height(this: &VideoFrame) -> u32;
121 #[cfg(web_sys_unstable_apis)]
122 # [wasm_bindgen (structural , method , getter , js_class = "VideoFrame" , js_name = duration)]
123 #[doc = "Getter for the `duration` field of this object."]
124 #[doc = ""]
125 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoFrame/duration)"]
126 #[doc = ""]
127 #[doc = "*This API requires the following crate features to be activated: `VideoFrame`*"]
128 #[doc = ""]
129 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
130 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
131 pub fn duration(this: &VideoFrame) -> Option<f64>;
132 #[cfg(web_sys_unstable_apis)]
133 # [wasm_bindgen (structural , method , getter , js_class = "VideoFrame" , js_name = timestamp)]
134 #[doc = "Getter for the `timestamp` field of this object."]
135 #[doc = ""]
136 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoFrame/timestamp)"]
137 #[doc = ""]
138 #[doc = "*This API requires the following crate features to be activated: `VideoFrame`*"]
139 #[doc = ""]
140 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
141 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
142 pub fn timestamp(this: &VideoFrame) -> Option<f64>;
143 #[cfg(web_sys_unstable_apis)]
144 #[cfg(feature = "VideoColorSpace")]
145 # [wasm_bindgen (structural , method , getter , js_class = "VideoFrame" , js_name = colorSpace)]
146 #[doc = "Getter for the `colorSpace` field of this object."]
147 #[doc = ""]
148 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoFrame/colorSpace)"]
149 #[doc = ""]
150 #[doc = "*This API requires the following crate features to be activated: `VideoColorSpace`, `VideoFrame`*"]
151 #[doc = ""]
152 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
153 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
154 pub fn color_space(this: &VideoFrame) -> VideoColorSpace;
155 #[cfg(web_sys_unstable_apis)]
156 #[cfg(feature = "HtmlImageElement")]
157 #[wasm_bindgen(catch, constructor, js_class = "VideoFrame")]
158 #[doc = "The `new VideoFrame(..)` constructor, creating a new instance of `VideoFrame`."]
159 #[doc = ""]
160 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoFrame/VideoFrame)"]
161 #[doc = ""]
162 #[doc = "*This API requires the following crate features to be activated: `HtmlImageElement`, `VideoFrame`*"]
163 #[doc = ""]
164 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
165 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
166 pub fn new_with_html_image_element(image: &HtmlImageElement) -> Result<VideoFrame, JsValue>;
167 #[cfg(web_sys_unstable_apis)]
168 #[cfg(feature = "SvgImageElement")]
169 #[wasm_bindgen(catch, constructor, js_class = "VideoFrame")]
170 #[doc = "The `new VideoFrame(..)` constructor, creating a new instance of `VideoFrame`."]
171 #[doc = ""]
172 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoFrame/VideoFrame)"]
173 #[doc = ""]
174 #[doc = "*This API requires the following crate features to be activated: `SvgImageElement`, `VideoFrame`*"]
175 #[doc = ""]
176 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
177 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
178 pub fn new_with_svg_image_element(image: &SvgImageElement) -> Result<VideoFrame, JsValue>;
179 #[cfg(web_sys_unstable_apis)]
180 #[cfg(feature = "HtmlCanvasElement")]
181 #[wasm_bindgen(catch, constructor, js_class = "VideoFrame")]
182 #[doc = "The `new VideoFrame(..)` constructor, creating a new instance of `VideoFrame`."]
183 #[doc = ""]
184 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoFrame/VideoFrame)"]
185 #[doc = ""]
186 #[doc = "*This API requires the following crate features to be activated: `HtmlCanvasElement`, `VideoFrame`*"]
187 #[doc = ""]
188 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
189 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
190 pub fn new_with_html_canvas_element(image: &HtmlCanvasElement) -> Result<VideoFrame, JsValue>;
191 #[cfg(web_sys_unstable_apis)]
192 #[cfg(feature = "HtmlVideoElement")]
193 #[wasm_bindgen(catch, constructor, js_class = "VideoFrame")]
194 #[doc = "The `new VideoFrame(..)` constructor, creating a new instance of `VideoFrame`."]
195 #[doc = ""]
196 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoFrame/VideoFrame)"]
197 #[doc = ""]
198 #[doc = "*This API requires the following crate features to be activated: `HtmlVideoElement`, `VideoFrame`*"]
199 #[doc = ""]
200 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
201 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
202 pub fn new_with_html_video_element(image: &HtmlVideoElement) -> Result<VideoFrame, JsValue>;
203 #[cfg(web_sys_unstable_apis)]
204 #[cfg(feature = "ImageBitmap")]
205 #[wasm_bindgen(catch, constructor, js_class = "VideoFrame")]
206 #[doc = "The `new VideoFrame(..)` constructor, creating a new instance of `VideoFrame`."]
207 #[doc = ""]
208 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoFrame/VideoFrame)"]
209 #[doc = ""]
210 #[doc = "*This API requires the following crate features to be activated: `ImageBitmap`, `VideoFrame`*"]
211 #[doc = ""]
212 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
213 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
214 pub fn new_with_image_bitmap(image: &ImageBitmap) -> Result<VideoFrame, JsValue>;
215 #[cfg(web_sys_unstable_apis)]
216 #[cfg(feature = "OffscreenCanvas")]
217 #[wasm_bindgen(catch, constructor, js_class = "VideoFrame")]
218 #[doc = "The `new VideoFrame(..)` constructor, creating a new instance of `VideoFrame`."]
219 #[doc = ""]
220 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoFrame/VideoFrame)"]
221 #[doc = ""]
222 #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvas`, `VideoFrame`*"]
223 #[doc = ""]
224 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
225 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
226 pub fn new_with_offscreen_canvas(image: &OffscreenCanvas) -> Result<VideoFrame, JsValue>;
227 #[cfg(web_sys_unstable_apis)]
228 #[wasm_bindgen(catch, constructor, js_class = "VideoFrame")]
229 #[doc = "The `new VideoFrame(..)` constructor, creating a new instance of `VideoFrame`."]
230 #[doc = ""]
231 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoFrame/VideoFrame)"]
232 #[doc = ""]
233 #[doc = "*This API requires the following crate features to be activated: `VideoFrame`*"]
234 #[doc = ""]
235 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
236 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
237 pub fn new_with_video_frame(image: &VideoFrame) -> Result<VideoFrame, JsValue>;
238 #[cfg(web_sys_unstable_apis)]
239 #[cfg(all(feature = "HtmlImageElement", feature = "VideoFrameInit",))]
240 #[wasm_bindgen(catch, constructor, js_class = "VideoFrame")]
241 #[doc = "The `new VideoFrame(..)` constructor, creating a new instance of `VideoFrame`."]
242 #[doc = ""]
243 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoFrame/VideoFrame)"]
244 #[doc = ""]
245 #[doc = "*This API requires the following crate features to be activated: `HtmlImageElement`, `VideoFrame`, `VideoFrameInit`*"]
246 #[doc = ""]
247 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
248 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
249 pub fn new_with_html_image_element_and_video_frame_init(
250 image: &HtmlImageElement,
251 init: &VideoFrameInit,
252 ) -> Result<VideoFrame, JsValue>;
253 #[cfg(web_sys_unstable_apis)]
254 #[cfg(all(feature = "SvgImageElement", feature = "VideoFrameInit",))]
255 #[wasm_bindgen(catch, constructor, js_class = "VideoFrame")]
256 #[doc = "The `new VideoFrame(..)` constructor, creating a new instance of `VideoFrame`."]
257 #[doc = ""]
258 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoFrame/VideoFrame)"]
259 #[doc = ""]
260 #[doc = "*This API requires the following crate features to be activated: `SvgImageElement`, `VideoFrame`, `VideoFrameInit`*"]
261 #[doc = ""]
262 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
263 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
264 pub fn new_with_svg_image_element_and_video_frame_init(
265 image: &SvgImageElement,
266 init: &VideoFrameInit,
267 ) -> Result<VideoFrame, JsValue>;
268 #[cfg(web_sys_unstable_apis)]
269 #[cfg(all(feature = "HtmlCanvasElement", feature = "VideoFrameInit",))]
270 #[wasm_bindgen(catch, constructor, js_class = "VideoFrame")]
271 #[doc = "The `new VideoFrame(..)` constructor, creating a new instance of `VideoFrame`."]
272 #[doc = ""]
273 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoFrame/VideoFrame)"]
274 #[doc = ""]
275 #[doc = "*This API requires the following crate features to be activated: `HtmlCanvasElement`, `VideoFrame`, `VideoFrameInit`*"]
276 #[doc = ""]
277 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
278 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
279 pub fn new_with_html_canvas_element_and_video_frame_init(
280 image: &HtmlCanvasElement,
281 init: &VideoFrameInit,
282 ) -> Result<VideoFrame, JsValue>;
283 #[cfg(web_sys_unstable_apis)]
284 #[cfg(all(feature = "HtmlVideoElement", feature = "VideoFrameInit",))]
285 #[wasm_bindgen(catch, constructor, js_class = "VideoFrame")]
286 #[doc = "The `new VideoFrame(..)` constructor, creating a new instance of `VideoFrame`."]
287 #[doc = ""]
288 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoFrame/VideoFrame)"]
289 #[doc = ""]
290 #[doc = "*This API requires the following crate features to be activated: `HtmlVideoElement`, `VideoFrame`, `VideoFrameInit`*"]
291 #[doc = ""]
292 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
293 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
294 pub fn new_with_html_video_element_and_video_frame_init(
295 image: &HtmlVideoElement,
296 init: &VideoFrameInit,
297 ) -> Result<VideoFrame, JsValue>;
298 #[cfg(web_sys_unstable_apis)]
299 #[cfg(all(feature = "ImageBitmap", feature = "VideoFrameInit",))]
300 #[wasm_bindgen(catch, constructor, js_class = "VideoFrame")]
301 #[doc = "The `new VideoFrame(..)` constructor, creating a new instance of `VideoFrame`."]
302 #[doc = ""]
303 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoFrame/VideoFrame)"]
304 #[doc = ""]
305 #[doc = "*This API requires the following crate features to be activated: `ImageBitmap`, `VideoFrame`, `VideoFrameInit`*"]
306 #[doc = ""]
307 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
308 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
309 pub fn new_with_image_bitmap_and_video_frame_init(
310 image: &ImageBitmap,
311 init: &VideoFrameInit,
312 ) -> Result<VideoFrame, JsValue>;
313 #[cfg(web_sys_unstable_apis)]
314 #[cfg(all(feature = "OffscreenCanvas", feature = "VideoFrameInit",))]
315 #[wasm_bindgen(catch, constructor, js_class = "VideoFrame")]
316 #[doc = "The `new VideoFrame(..)` constructor, creating a new instance of `VideoFrame`."]
317 #[doc = ""]
318 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoFrame/VideoFrame)"]
319 #[doc = ""]
320 #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvas`, `VideoFrame`, `VideoFrameInit`*"]
321 #[doc = ""]
322 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
323 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
324 pub fn new_with_offscreen_canvas_and_video_frame_init(
325 image: &OffscreenCanvas,
326 init: &VideoFrameInit,
327 ) -> Result<VideoFrame, JsValue>;
328 #[cfg(web_sys_unstable_apis)]
329 #[cfg(feature = "VideoFrameInit")]
330 #[wasm_bindgen(catch, constructor, js_class = "VideoFrame")]
331 #[doc = "The `new VideoFrame(..)` constructor, creating a new instance of `VideoFrame`."]
332 #[doc = ""]
333 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoFrame/VideoFrame)"]
334 #[doc = ""]
335 #[doc = "*This API requires the following crate features to be activated: `VideoFrame`, `VideoFrameInit`*"]
336 #[doc = ""]
337 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
338 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
339 pub fn new_with_video_frame_and_video_frame_init(
340 image: &VideoFrame,
341 init: &VideoFrameInit,
342 ) -> Result<VideoFrame, JsValue>;
343 #[cfg(web_sys_unstable_apis)]
344 #[cfg(feature = "VideoFrameBufferInit")]
345 #[wasm_bindgen(catch, constructor, js_class = "VideoFrame")]
346 #[doc = "The `new VideoFrame(..)` constructor, creating a new instance of `VideoFrame`."]
347 #[doc = ""]
348 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoFrame/VideoFrame)"]
349 #[doc = ""]
350 #[doc = "*This API requires the following crate features to be activated: `VideoFrame`, `VideoFrameBufferInit`*"]
351 #[doc = ""]
352 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
353 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
354 pub fn new_with_buffer_source_and_video_frame_buffer_init(
355 data: &::js_sys::Object,
356 init: &VideoFrameBufferInit,
357 ) -> Result<VideoFrame, JsValue>;
358 #[cfg(web_sys_unstable_apis)]
359 #[cfg(feature = "VideoFrameBufferInit")]
360 #[wasm_bindgen(catch, constructor, js_class = "VideoFrame")]
361 #[doc = "The `new VideoFrame(..)` constructor, creating a new instance of `VideoFrame`."]
362 #[doc = ""]
363 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoFrame/VideoFrame)"]
364 #[doc = ""]
365 #[doc = "*This API requires the following crate features to be activated: `VideoFrame`, `VideoFrameBufferInit`*"]
366 #[doc = ""]
367 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
368 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
369 pub fn new_with_u8_slice_and_video_frame_buffer_init(
370 data: &mut [u8],
371 init: &VideoFrameBufferInit,
372 ) -> Result<VideoFrame, JsValue>;
373 #[cfg(web_sys_unstable_apis)]
374 #[cfg(feature = "VideoFrameBufferInit")]
375 #[wasm_bindgen(catch, constructor, js_class = "VideoFrame")]
376 #[doc = "The `new VideoFrame(..)` constructor, creating a new instance of `VideoFrame`."]
377 #[doc = ""]
378 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoFrame/VideoFrame)"]
379 #[doc = ""]
380 #[doc = "*This API requires the following crate features to be activated: `VideoFrame`, `VideoFrameBufferInit`*"]
381 #[doc = ""]
382 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
383 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
384 pub fn new_with_u8_array_and_video_frame_buffer_init(
385 data: &::js_sys::Uint8Array,
386 init: &VideoFrameBufferInit,
387 ) -> Result<VideoFrame, JsValue>;
388 #[cfg(web_sys_unstable_apis)]
389 # [wasm_bindgen (catch , method , structural , js_class = "VideoFrame" , js_name = allocationSize)]
390 #[doc = "The `allocationSize()` method."]
391 #[doc = ""]
392 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoFrame/allocationSize)"]
393 #[doc = ""]
394 #[doc = "*This API requires the following crate features to be activated: `VideoFrame`*"]
395 #[doc = ""]
396 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
397 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
398 pub fn allocation_size(this: &VideoFrame) -> Result<u32, JsValue>;
399 #[cfg(web_sys_unstable_apis)]
400 #[cfg(feature = "VideoFrameCopyToOptions")]
401 # [wasm_bindgen (catch , method , structural , js_class = "VideoFrame" , js_name = allocationSize)]
402 #[doc = "The `allocationSize()` method."]
403 #[doc = ""]
404 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoFrame/allocationSize)"]
405 #[doc = ""]
406 #[doc = "*This API requires the following crate features to be activated: `VideoFrame`, `VideoFrameCopyToOptions`*"]
407 #[doc = ""]
408 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
409 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
410 pub fn allocation_size_with_options(
411 this: &VideoFrame,
412 options: &VideoFrameCopyToOptions,
413 ) -> Result<u32, JsValue>;
414 #[cfg(web_sys_unstable_apis)]
415 # [wasm_bindgen (catch , method , structural , js_class = "VideoFrame" , js_name = clone)]
416 #[doc = "The `clone()` method."]
417 #[doc = ""]
418 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoFrame/clone)"]
419 #[doc = ""]
420 #[doc = "*This API requires the following crate features to be activated: `VideoFrame`*"]
421 #[doc = ""]
422 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
423 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
424 pub fn clone(this: &VideoFrame) -> Result<VideoFrame, JsValue>;
425 #[cfg(web_sys_unstable_apis)]
426 # [wasm_bindgen (method , structural , js_class = "VideoFrame" , js_name = close)]
427 #[doc = "The `close()` method."]
428 #[doc = ""]
429 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoFrame/close)"]
430 #[doc = ""]
431 #[doc = "*This API requires the following crate features to be activated: `VideoFrame`*"]
432 #[doc = ""]
433 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
434 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
435 pub fn close(this: &VideoFrame);
436 #[cfg(web_sys_unstable_apis)]
437 #[cfg(feature = "PlaneLayout")]
438 # [wasm_bindgen (method , structural , js_class = "VideoFrame" , js_name = copyTo)]
439 #[doc = "The `copyTo()` method."]
440 #[doc = ""]
441 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoFrame/copyTo)"]
442 #[doc = ""]
443 #[doc = "*This API requires the following crate features to be activated: `PlaneLayout`, `VideoFrame`*"]
444 #[doc = ""]
445 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
446 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
447 pub fn copy_to_with_buffer_source(
448 this: &VideoFrame,
449 destination: &::js_sys::Object,
450 ) -> ::js_sys::Promise<::js_sys::Array<PlaneLayout>>;
451 #[cfg(web_sys_unstable_apis)]
452 #[cfg(feature = "PlaneLayout")]
453 # [wasm_bindgen (method , structural , js_class = "VideoFrame" , js_name = copyTo)]
454 #[doc = "The `copyTo()` method."]
455 #[doc = ""]
456 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoFrame/copyTo)"]
457 #[doc = ""]
458 #[doc = "*This API requires the following crate features to be activated: `PlaneLayout`, `VideoFrame`*"]
459 #[doc = ""]
460 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
461 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
462 pub fn copy_to_with_u8_slice(
463 this: &VideoFrame,
464 destination: &mut [u8],
465 ) -> ::js_sys::Promise<::js_sys::Array<PlaneLayout>>;
466 #[cfg(web_sys_unstable_apis)]
467 #[cfg(feature = "PlaneLayout")]
468 # [wasm_bindgen (method , structural , js_class = "VideoFrame" , js_name = copyTo)]
469 #[doc = "The `copyTo()` method."]
470 #[doc = ""]
471 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoFrame/copyTo)"]
472 #[doc = ""]
473 #[doc = "*This API requires the following crate features to be activated: `PlaneLayout`, `VideoFrame`*"]
474 #[doc = ""]
475 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
476 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
477 pub fn copy_to_with_u8_array(
478 this: &VideoFrame,
479 destination: &::js_sys::Uint8Array,
480 ) -> ::js_sys::Promise<::js_sys::Array<PlaneLayout>>;
481 #[cfg(web_sys_unstable_apis)]
482 #[cfg(all(feature = "PlaneLayout", feature = "VideoFrameCopyToOptions",))]
483 # [wasm_bindgen (method , structural , js_class = "VideoFrame" , js_name = copyTo)]
484 #[doc = "The `copyTo()` method."]
485 #[doc = ""]
486 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoFrame/copyTo)"]
487 #[doc = ""]
488 #[doc = "*This API requires the following crate features to be activated: `PlaneLayout`, `VideoFrame`, `VideoFrameCopyToOptions`*"]
489 #[doc = ""]
490 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
491 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
492 pub fn copy_to_with_buffer_source_and_options(
493 this: &VideoFrame,
494 destination: &::js_sys::Object,
495 options: &VideoFrameCopyToOptions,
496 ) -> ::js_sys::Promise<::js_sys::Array<PlaneLayout>>;
497 #[cfg(web_sys_unstable_apis)]
498 #[cfg(all(feature = "PlaneLayout", feature = "VideoFrameCopyToOptions",))]
499 # [wasm_bindgen (method , structural , js_class = "VideoFrame" , js_name = copyTo)]
500 #[doc = "The `copyTo()` method."]
501 #[doc = ""]
502 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoFrame/copyTo)"]
503 #[doc = ""]
504 #[doc = "*This API requires the following crate features to be activated: `PlaneLayout`, `VideoFrame`, `VideoFrameCopyToOptions`*"]
505 #[doc = ""]
506 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
507 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
508 pub fn copy_to_with_u8_slice_and_options(
509 this: &VideoFrame,
510 destination: &mut [u8],
511 options: &VideoFrameCopyToOptions,
512 ) -> ::js_sys::Promise<::js_sys::Array<PlaneLayout>>;
513 #[cfg(web_sys_unstable_apis)]
514 #[cfg(all(feature = "PlaneLayout", feature = "VideoFrameCopyToOptions",))]
515 # [wasm_bindgen (method , structural , js_class = "VideoFrame" , js_name = copyTo)]
516 #[doc = "The `copyTo()` method."]
517 #[doc = ""]
518 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoFrame/copyTo)"]
519 #[doc = ""]
520 #[doc = "*This API requires the following crate features to be activated: `PlaneLayout`, `VideoFrame`, `VideoFrameCopyToOptions`*"]
521 #[doc = ""]
522 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
523 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
524 pub fn copy_to_with_u8_array_and_options(
525 this: &VideoFrame,
526 destination: &::js_sys::Uint8Array,
527 options: &VideoFrameCopyToOptions,
528 ) -> ::js_sys::Promise<::js_sys::Array<PlaneLayout>>;
529 #[cfg(web_sys_unstable_apis)]
530 #[cfg(feature = "VideoFrameMetadata")]
531 # [wasm_bindgen (method , structural , js_class = "VideoFrame" , js_name = metadata)]
532 #[doc = "The `metadata()` method."]
533 #[doc = ""]
534 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoFrame/metadata)"]
535 #[doc = ""]
536 #[doc = "*This API requires the following crate features to be activated: `VideoFrame`, `VideoFrameMetadata`*"]
537 #[doc = ""]
538 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
539 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
540 pub fn metadata(this: &VideoFrame) -> VideoFrameMetadata;
541}