web_sys/features/
gen_VideoDecoderConfig.rs1#![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 = VideoDecoderConfig)]
9 #[derive(Debug, Clone, PartialEq, Eq)]
10 #[doc = "The `VideoDecoderConfig` dictionary."]
11 #[doc = ""]
12 #[doc = "*This API requires the following crate features to be activated: `VideoDecoderConfig`*"]
13 #[doc = ""]
14 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
15 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
16 pub type VideoDecoderConfig;
17 #[cfg(web_sys_unstable_apis)]
18 #[doc = "Get the `codec` field of this object."]
19 #[doc = ""]
20 #[doc = "*This API requires the following crate features to be activated: `VideoDecoderConfig`*"]
21 #[doc = ""]
22 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
23 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
24 #[wasm_bindgen(method, getter = "codec")]
25 pub fn get_codec(this: &VideoDecoderConfig) -> ::alloc::string::String;
26 #[cfg(web_sys_unstable_apis)]
27 #[doc = "Change the `codec` field of this object."]
28 #[doc = ""]
29 #[doc = "*This API requires the following crate features to be activated: `VideoDecoderConfig`*"]
30 #[doc = ""]
31 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
32 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
33 #[wasm_bindgen(method, setter = "codec")]
34 pub fn set_codec(this: &VideoDecoderConfig, val: &str);
35 #[cfg(web_sys_unstable_apis)]
36 #[doc = "Get the `codedHeight` field of this object."]
37 #[doc = ""]
38 #[doc = "*This API requires the following crate features to be activated: `VideoDecoderConfig`*"]
39 #[doc = ""]
40 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
41 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
42 #[wasm_bindgen(method, getter = "codedHeight")]
43 pub fn get_coded_height(this: &VideoDecoderConfig) -> Option<u32>;
44 #[cfg(web_sys_unstable_apis)]
45 #[doc = "Change the `codedHeight` field of this object."]
46 #[doc = ""]
47 #[doc = "*This API requires the following crate features to be activated: `VideoDecoderConfig`*"]
48 #[doc = ""]
49 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
50 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
51 #[wasm_bindgen(method, setter = "codedHeight")]
52 pub fn set_coded_height(this: &VideoDecoderConfig, val: u32);
53 #[cfg(web_sys_unstable_apis)]
54 #[doc = "Get the `codedWidth` field of this object."]
55 #[doc = ""]
56 #[doc = "*This API requires the following crate features to be activated: `VideoDecoderConfig`*"]
57 #[doc = ""]
58 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
59 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
60 #[wasm_bindgen(method, getter = "codedWidth")]
61 pub fn get_coded_width(this: &VideoDecoderConfig) -> Option<u32>;
62 #[cfg(web_sys_unstable_apis)]
63 #[doc = "Change the `codedWidth` field of this object."]
64 #[doc = ""]
65 #[doc = "*This API requires the following crate features to be activated: `VideoDecoderConfig`*"]
66 #[doc = ""]
67 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
68 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
69 #[wasm_bindgen(method, setter = "codedWidth")]
70 pub fn set_coded_width(this: &VideoDecoderConfig, val: u32);
71 #[cfg(web_sys_unstable_apis)]
72 #[cfg(feature = "VideoColorSpaceInit")]
73 #[doc = "Get the `colorSpace` field of this object."]
74 #[doc = ""]
75 #[doc = "*This API requires the following crate features to be activated: `VideoColorSpaceInit`, `VideoDecoderConfig`*"]
76 #[doc = ""]
77 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
78 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
79 #[wasm_bindgen(method, getter = "colorSpace")]
80 pub fn get_color_space(this: &VideoDecoderConfig) -> Option<VideoColorSpaceInit>;
81 #[cfg(web_sys_unstable_apis)]
82 #[cfg(feature = "VideoColorSpaceInit")]
83 #[doc = "Change the `colorSpace` field of this object."]
84 #[doc = ""]
85 #[doc = "*This API requires the following crate features to be activated: `VideoColorSpaceInit`, `VideoDecoderConfig`*"]
86 #[doc = ""]
87 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
88 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
89 #[wasm_bindgen(method, setter = "colorSpace")]
90 pub fn set_color_space(this: &VideoDecoderConfig, val: &VideoColorSpaceInit);
91 #[cfg(web_sys_unstable_apis)]
92 #[doc = "Get the `description` field of this object."]
93 #[doc = ""]
94 #[doc = "*This API requires the following crate features to be activated: `VideoDecoderConfig`*"]
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 #[wasm_bindgen(method, getter = "description")]
99 pub fn get_description(this: &VideoDecoderConfig) -> Option<::js_sys::Object>;
100 #[cfg(web_sys_unstable_apis)]
101 #[doc = "Change the `description` field of this object."]
102 #[doc = ""]
103 #[doc = "*This API requires the following crate features to be activated: `VideoDecoderConfig`*"]
104 #[doc = ""]
105 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
106 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
107 #[wasm_bindgen(method, setter = "description")]
108 pub fn set_description(this: &VideoDecoderConfig, val: &::js_sys::Object);
109 #[cfg(web_sys_unstable_apis)]
110 #[doc = "Change the `description` field of this object."]
111 #[doc = ""]
112 #[doc = "*This API requires the following crate features to be activated: `VideoDecoderConfig`*"]
113 #[doc = ""]
114 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
115 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
116 #[wasm_bindgen(method, setter = "description")]
117 pub fn set_description_u8_slice(this: &VideoDecoderConfig, val: &mut [u8]);
118 #[cfg(web_sys_unstable_apis)]
119 #[doc = "Change the `description` field of this object."]
120 #[doc = ""]
121 #[doc = "*This API requires the following crate features to be activated: `VideoDecoderConfig`*"]
122 #[doc = ""]
123 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
124 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
125 #[wasm_bindgen(method, setter = "description")]
126 pub fn set_description_u8_array(this: &VideoDecoderConfig, val: &::js_sys::Uint8Array);
127 #[cfg(web_sys_unstable_apis)]
128 #[doc = "Get the `displayAspectHeight` field of this object."]
129 #[doc = ""]
130 #[doc = "*This API requires the following crate features to be activated: `VideoDecoderConfig`*"]
131 #[doc = ""]
132 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
133 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
134 #[wasm_bindgen(method, getter = "displayAspectHeight")]
135 pub fn get_display_aspect_height(this: &VideoDecoderConfig) -> Option<u32>;
136 #[cfg(web_sys_unstable_apis)]
137 #[doc = "Change the `displayAspectHeight` field of this object."]
138 #[doc = ""]
139 #[doc = "*This API requires the following crate features to be activated: `VideoDecoderConfig`*"]
140 #[doc = ""]
141 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
142 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
143 #[wasm_bindgen(method, setter = "displayAspectHeight")]
144 pub fn set_display_aspect_height(this: &VideoDecoderConfig, val: u32);
145 #[cfg(web_sys_unstable_apis)]
146 #[doc = "Get the `displayAspectWidth` field of this object."]
147 #[doc = ""]
148 #[doc = "*This API requires the following crate features to be activated: `VideoDecoderConfig`*"]
149 #[doc = ""]
150 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
151 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
152 #[wasm_bindgen(method, getter = "displayAspectWidth")]
153 pub fn get_display_aspect_width(this: &VideoDecoderConfig) -> Option<u32>;
154 #[cfg(web_sys_unstable_apis)]
155 #[doc = "Change the `displayAspectWidth` field of this object."]
156 #[doc = ""]
157 #[doc = "*This API requires the following crate features to be activated: `VideoDecoderConfig`*"]
158 #[doc = ""]
159 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
160 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
161 #[wasm_bindgen(method, setter = "displayAspectWidth")]
162 pub fn set_display_aspect_width(this: &VideoDecoderConfig, val: u32);
163 #[cfg(web_sys_unstable_apis)]
164 #[doc = "Get the `flip` field of this object."]
165 #[doc = ""]
166 #[doc = "*This API requires the following crate features to be activated: `VideoDecoderConfig`*"]
167 #[doc = ""]
168 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
169 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
170 #[wasm_bindgen(method, getter = "flip")]
171 pub fn get_flip(this: &VideoDecoderConfig) -> Option<bool>;
172 #[cfg(web_sys_unstable_apis)]
173 #[doc = "Change the `flip` field of this object."]
174 #[doc = ""]
175 #[doc = "*This API requires the following crate features to be activated: `VideoDecoderConfig`*"]
176 #[doc = ""]
177 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
178 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
179 #[wasm_bindgen(method, setter = "flip")]
180 pub fn set_flip(this: &VideoDecoderConfig, val: bool);
181 #[cfg(web_sys_unstable_apis)]
182 #[cfg(feature = "HardwareAcceleration")]
183 #[doc = "Get the `hardwareAcceleration` field of this object."]
184 #[doc = ""]
185 #[doc = "*This API requires the following crate features to be activated: `HardwareAcceleration`, `VideoDecoderConfig`*"]
186 #[doc = ""]
187 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
188 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
189 #[wasm_bindgen(method, getter = "hardwareAcceleration")]
190 pub fn get_hardware_acceleration(this: &VideoDecoderConfig) -> Option<HardwareAcceleration>;
191 #[cfg(web_sys_unstable_apis)]
192 #[cfg(feature = "HardwareAcceleration")]
193 #[doc = "Change the `hardwareAcceleration` field of this object."]
194 #[doc = ""]
195 #[doc = "*This API requires the following crate features to be activated: `HardwareAcceleration`, `VideoDecoderConfig`*"]
196 #[doc = ""]
197 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
198 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
199 #[wasm_bindgen(method, setter = "hardwareAcceleration")]
200 pub fn set_hardware_acceleration(this: &VideoDecoderConfig, val: HardwareAcceleration);
201 #[cfg(web_sys_unstable_apis)]
202 #[doc = "Get the `optimizeForLatency` field of this object."]
203 #[doc = ""]
204 #[doc = "*This API requires the following crate features to be activated: `VideoDecoderConfig`*"]
205 #[doc = ""]
206 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
207 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
208 #[wasm_bindgen(method, getter = "optimizeForLatency")]
209 pub fn get_optimize_for_latency(this: &VideoDecoderConfig) -> Option<bool>;
210 #[cfg(web_sys_unstable_apis)]
211 #[doc = "Change the `optimizeForLatency` field of this object."]
212 #[doc = ""]
213 #[doc = "*This API requires the following crate features to be activated: `VideoDecoderConfig`*"]
214 #[doc = ""]
215 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
216 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
217 #[wasm_bindgen(method, setter = "optimizeForLatency")]
218 pub fn set_optimize_for_latency(this: &VideoDecoderConfig, val: bool);
219 #[cfg(web_sys_unstable_apis)]
220 #[doc = "Get the `rotation` field of this object."]
221 #[doc = ""]
222 #[doc = "*This API requires the following crate features to be activated: `VideoDecoderConfig`*"]
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 #[wasm_bindgen(method, getter = "rotation")]
227 pub fn get_rotation(this: &VideoDecoderConfig) -> Option<f64>;
228 #[cfg(web_sys_unstable_apis)]
229 #[doc = "Change the `rotation` field of this object."]
230 #[doc = ""]
231 #[doc = "*This API requires the following crate features to be activated: `VideoDecoderConfig`*"]
232 #[doc = ""]
233 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
234 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
235 #[wasm_bindgen(method, setter = "rotation")]
236 pub fn set_rotation(this: &VideoDecoderConfig, val: f64);
237}
238#[cfg(web_sys_unstable_apis)]
239impl VideoDecoderConfig {
240 #[doc = "Construct a new `VideoDecoderConfig`."]
241 #[doc = ""]
242 #[doc = "*This API requires the following crate features to be activated: `VideoDecoderConfig`*"]
243 #[doc = ""]
244 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
245 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
246 pub fn new(codec: &str) -> Self {
247 #[allow(unused_mut)]
248 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
249 ret.set_codec(codec);
250 ret
251 }
252 #[cfg(web_sys_unstable_apis)]
253 #[deprecated = "Use `set_codec()` instead."]
254 pub fn codec(&mut self, val: &str) -> &mut Self {
255 self.set_codec(val);
256 self
257 }
258 #[cfg(web_sys_unstable_apis)]
259 #[deprecated = "Use `set_coded_height()` instead."]
260 pub fn coded_height(&mut self, val: u32) -> &mut Self {
261 self.set_coded_height(val);
262 self
263 }
264 #[cfg(web_sys_unstable_apis)]
265 #[deprecated = "Use `set_coded_width()` instead."]
266 pub fn coded_width(&mut self, val: u32) -> &mut Self {
267 self.set_coded_width(val);
268 self
269 }
270 #[cfg(web_sys_unstable_apis)]
271 #[cfg(feature = "VideoColorSpaceInit")]
272 #[deprecated = "Use `set_color_space()` instead."]
273 pub fn color_space(&mut self, val: &VideoColorSpaceInit) -> &mut Self {
274 self.set_color_space(val);
275 self
276 }
277 #[cfg(web_sys_unstable_apis)]
278 #[deprecated = "Use `set_description()` instead."]
279 pub fn description(&mut self, val: &::js_sys::Object) -> &mut Self {
280 self.set_description(val);
281 self
282 }
283 #[cfg(web_sys_unstable_apis)]
284 #[deprecated = "Use `set_display_aspect_height()` instead."]
285 pub fn display_aspect_height(&mut self, val: u32) -> &mut Self {
286 self.set_display_aspect_height(val);
287 self
288 }
289 #[cfg(web_sys_unstable_apis)]
290 #[deprecated = "Use `set_display_aspect_width()` instead."]
291 pub fn display_aspect_width(&mut self, val: u32) -> &mut Self {
292 self.set_display_aspect_width(val);
293 self
294 }
295 #[cfg(web_sys_unstable_apis)]
296 #[deprecated = "Use `set_flip()` instead."]
297 pub fn flip(&mut self, val: bool) -> &mut Self {
298 self.set_flip(val);
299 self
300 }
301 #[cfg(web_sys_unstable_apis)]
302 #[cfg(feature = "HardwareAcceleration")]
303 #[deprecated = "Use `set_hardware_acceleration()` instead."]
304 pub fn hardware_acceleration(&mut self, val: HardwareAcceleration) -> &mut Self {
305 self.set_hardware_acceleration(val);
306 self
307 }
308 #[cfg(web_sys_unstable_apis)]
309 #[deprecated = "Use `set_optimize_for_latency()` instead."]
310 pub fn optimize_for_latency(&mut self, val: bool) -> &mut Self {
311 self.set_optimize_for_latency(val);
312 self
313 }
314 #[cfg(web_sys_unstable_apis)]
315 #[deprecated = "Use `set_rotation()` instead."]
316 pub fn rotation(&mut self, val: f64) -> &mut Self {
317 self.set_rotation(val);
318 self
319 }
320}