Skip to main content

web_sys/features/
gen_VideoFrameCopyToOptions.rs

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 = VideoFrameCopyToOptions)]
9    #[derive(Debug, Clone, PartialEq, Eq)]
10    #[doc = "The `VideoFrameCopyToOptions` dictionary."]
11    #[doc = ""]
12    #[doc = "*This API requires the following crate features to be activated: `VideoFrameCopyToOptions`*"]
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 VideoFrameCopyToOptions;
17    #[cfg(web_sys_unstable_apis)]
18    #[cfg(feature = "VideoPixelFormat")]
19    #[doc = "Get the `format` field of this object."]
20    #[doc = ""]
21    #[doc = "*This API requires the following crate features to be activated: `VideoFrameCopyToOptions`, `VideoPixelFormat`*"]
22    #[doc = ""]
23    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
24    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
25    #[wasm_bindgen(method, getter = "format")]
26    pub fn get_format(this: &VideoFrameCopyToOptions) -> Option<VideoPixelFormat>;
27    #[cfg(web_sys_unstable_apis)]
28    #[cfg(feature = "VideoPixelFormat")]
29    #[doc = "Change the `format` field of this object."]
30    #[doc = ""]
31    #[doc = "*This API requires the following crate features to be activated: `VideoFrameCopyToOptions`, `VideoPixelFormat`*"]
32    #[doc = ""]
33    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
34    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
35    #[wasm_bindgen(method, setter = "format")]
36    pub fn set_format(this: &VideoFrameCopyToOptions, val: VideoPixelFormat);
37    #[cfg(web_sys_unstable_apis)]
38    #[cfg(feature = "PlaneLayout")]
39    #[doc = "Get the `layout` field of this object."]
40    #[doc = ""]
41    #[doc = "*This API requires the following crate features to be activated: `PlaneLayout`, `VideoFrameCopyToOptions`*"]
42    #[doc = ""]
43    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
44    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
45    #[wasm_bindgen(method, getter = "layout")]
46    pub fn get_layout(this: &VideoFrameCopyToOptions) -> Option<::js_sys::Array<PlaneLayout>>;
47    #[cfg(web_sys_unstable_apis)]
48    #[cfg(feature = "PlaneLayout")]
49    #[doc = "Change the `layout` field of this object."]
50    #[doc = ""]
51    #[doc = "*This API requires the following crate features to be activated: `PlaneLayout`, `VideoFrameCopyToOptions`*"]
52    #[doc = ""]
53    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
54    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
55    #[wasm_bindgen(method, setter = "layout")]
56    pub fn set_layout(this: &VideoFrameCopyToOptions, val: &[PlaneLayout]);
57    #[cfg(web_sys_unstable_apis)]
58    #[cfg(feature = "DomRectInit")]
59    #[doc = "Get the `rect` field of this object."]
60    #[doc = ""]
61    #[doc = "*This API requires the following crate features to be activated: `DomRectInit`, `VideoFrameCopyToOptions`*"]
62    #[doc = ""]
63    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
64    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
65    #[wasm_bindgen(method, getter = "rect")]
66    pub fn get_rect(this: &VideoFrameCopyToOptions) -> Option<DomRectInit>;
67    #[cfg(web_sys_unstable_apis)]
68    #[cfg(feature = "DomRectInit")]
69    #[doc = "Change the `rect` field of this object."]
70    #[doc = ""]
71    #[doc = "*This API requires the following crate features to be activated: `DomRectInit`, `VideoFrameCopyToOptions`*"]
72    #[doc = ""]
73    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
74    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
75    #[wasm_bindgen(method, setter = "rect")]
76    pub fn set_rect(this: &VideoFrameCopyToOptions, val: &DomRectInit);
77}
78#[cfg(web_sys_unstable_apis)]
79impl VideoFrameCopyToOptions {
80    #[doc = "Construct a new `VideoFrameCopyToOptions`."]
81    #[doc = ""]
82    #[doc = "*This API requires the following crate features to be activated: `VideoFrameCopyToOptions`*"]
83    #[doc = ""]
84    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
85    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
86    pub fn new() -> Self {
87        #[allow(unused_mut)]
88        let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
89        ret
90    }
91    #[cfg(web_sys_unstable_apis)]
92    #[cfg(feature = "VideoPixelFormat")]
93    #[deprecated = "Use `set_format()` instead."]
94    pub fn format(&mut self, val: VideoPixelFormat) -> &mut Self {
95        self.set_format(val);
96        self
97    }
98    #[cfg(web_sys_unstable_apis)]
99    #[cfg(feature = "PlaneLayout")]
100    #[deprecated = "Use `set_layout()` instead."]
101    pub fn layout(&mut self, val: &[PlaneLayout]) -> &mut Self {
102        self.set_layout(val);
103        self
104    }
105    #[cfg(web_sys_unstable_apis)]
106    #[cfg(feature = "DomRectInit")]
107    #[deprecated = "Use `set_rect()` instead."]
108    pub fn rect(&mut self, val: &DomRectInit) -> &mut Self {
109        self.set_rect(val);
110        self
111    }
112}
113#[cfg(web_sys_unstable_apis)]
114impl Default for VideoFrameCopyToOptions {
115    fn default() -> Self {
116        Self::new()
117    }
118}