web_sys/features/
gen_EncodedVideoChunkMetadata.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 = EncodedVideoChunkMetadata)]
9 #[derive(Debug, Clone, PartialEq, Eq)]
10 #[doc = "The `EncodedVideoChunkMetadata` dictionary."]
11 #[doc = ""]
12 #[doc = "*This API requires the following crate features to be activated: `EncodedVideoChunkMetadata`*"]
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 EncodedVideoChunkMetadata;
17 #[cfg(web_sys_unstable_apis)]
18 #[doc = "Get the `alphaSideData` field of this object."]
19 #[doc = ""]
20 #[doc = "*This API requires the following crate features to be activated: `EncodedVideoChunkMetadata`*"]
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 = "alphaSideData")]
25 pub fn get_alpha_side_data(this: &EncodedVideoChunkMetadata) -> Option<::js_sys::Object>;
26 #[cfg(web_sys_unstable_apis)]
27 #[doc = "Change the `alphaSideData` field of this object."]
28 #[doc = ""]
29 #[doc = "*This API requires the following crate features to be activated: `EncodedVideoChunkMetadata`*"]
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 = "alphaSideData")]
34 pub fn set_alpha_side_data(this: &EncodedVideoChunkMetadata, val: &::js_sys::Object);
35 #[cfg(web_sys_unstable_apis)]
36 #[doc = "Change the `alphaSideData` field of this object."]
37 #[doc = ""]
38 #[doc = "*This API requires the following crate features to be activated: `EncodedVideoChunkMetadata`*"]
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 #[doc = "# Safety"]
43 #[doc = ""]
44 #[doc = "The `val` slice must outlive any use of the dictionary on the JavaScript side. wasm-bindgen passes a raw view into wasm linear memory — if the underlying data is freed or moved before JS is done reading the field, the behaviour is undefined. Prefer the `_array` variant (takes `&Uint8Array`) for a safe alternative that copies the data."]
45 #[wasm_bindgen(method, setter = "alphaSideData")]
46 pub unsafe fn set_alpha_side_data_u8_slice(this: &EncodedVideoChunkMetadata, val: &mut [u8]);
47 #[cfg(web_sys_unstable_apis)]
48 #[doc = "Change the `alphaSideData` field of this object."]
49 #[doc = ""]
50 #[doc = "*This API requires the following crate features to be activated: `EncodedVideoChunkMetadata`*"]
51 #[doc = ""]
52 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
53 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
54 #[wasm_bindgen(method, setter = "alphaSideData")]
55 pub fn set_alpha_side_data_u8_array(
56 this: &EncodedVideoChunkMetadata,
57 val: &::js_sys::Uint8Array,
58 );
59 #[cfg(web_sys_unstable_apis)]
60 #[cfg(feature = "VideoDecoderConfig")]
61 #[doc = "Get the `decoderConfig` field of this object."]
62 #[doc = ""]
63 #[doc = "*This API requires the following crate features to be activated: `EncodedVideoChunkMetadata`, `VideoDecoderConfig`*"]
64 #[doc = ""]
65 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
66 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
67 #[wasm_bindgen(method, getter = "decoderConfig")]
68 pub fn get_decoder_config(this: &EncodedVideoChunkMetadata) -> Option<VideoDecoderConfig>;
69 #[cfg(web_sys_unstable_apis)]
70 #[cfg(feature = "VideoDecoderConfig")]
71 #[doc = "Change the `decoderConfig` field of this object."]
72 #[doc = ""]
73 #[doc = "*This API requires the following crate features to be activated: `EncodedVideoChunkMetadata`, `VideoDecoderConfig`*"]
74 #[doc = ""]
75 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
76 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
77 #[wasm_bindgen(method, setter = "decoderConfig")]
78 pub fn set_decoder_config(this: &EncodedVideoChunkMetadata, val: &VideoDecoderConfig);
79 #[cfg(web_sys_unstable_apis)]
80 #[cfg(feature = "SvcOutputMetadata")]
81 #[doc = "Get the `svc` field of this object."]
82 #[doc = ""]
83 #[doc = "*This API requires the following crate features to be activated: `EncodedVideoChunkMetadata`, `SvcOutputMetadata`*"]
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 #[wasm_bindgen(method, getter = "svc")]
88 pub fn get_svc(this: &EncodedVideoChunkMetadata) -> Option<SvcOutputMetadata>;
89 #[cfg(web_sys_unstable_apis)]
90 #[cfg(feature = "SvcOutputMetadata")]
91 #[doc = "Change the `svc` field of this object."]
92 #[doc = ""]
93 #[doc = "*This API requires the following crate features to be activated: `EncodedVideoChunkMetadata`, `SvcOutputMetadata`*"]
94 #[doc = ""]
95 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
96 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
97 #[wasm_bindgen(method, setter = "svc")]
98 pub fn set_svc(this: &EncodedVideoChunkMetadata, val: &SvcOutputMetadata);
99}
100#[cfg(web_sys_unstable_apis)]
101impl EncodedVideoChunkMetadata {
102 #[doc = "Construct a new `EncodedVideoChunkMetadata`."]
103 #[doc = ""]
104 #[doc = "*This API requires the following crate features to be activated: `EncodedVideoChunkMetadata`*"]
105 #[doc = ""]
106 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
107 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
108 pub fn new() -> Self {
109 #[allow(unused_mut)]
110 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
111 ret
112 }
113 #[cfg(web_sys_unstable_apis)]
114 #[deprecated = "Use `set_alpha_side_data()` instead."]
115 pub fn alpha_side_data(&mut self, val: &::js_sys::Object) -> &mut Self {
116 self.set_alpha_side_data(val);
117 self
118 }
119 #[cfg(web_sys_unstable_apis)]
120 #[cfg(feature = "VideoDecoderConfig")]
121 #[deprecated = "Use `set_decoder_config()` instead."]
122 pub fn decoder_config(&mut self, val: &VideoDecoderConfig) -> &mut Self {
123 self.set_decoder_config(val);
124 self
125 }
126 #[cfg(web_sys_unstable_apis)]
127 #[cfg(feature = "SvcOutputMetadata")]
128 #[deprecated = "Use `set_svc()` instead."]
129 pub fn svc(&mut self, val: &SvcOutputMetadata) -> &mut Self {
130 self.set_svc(val);
131 self
132 }
133}
134#[cfg(web_sys_unstable_apis)]
135impl Default for EncodedVideoChunkMetadata {
136 fn default() -> Self {
137 Self::new()
138 }
139}