Skip to main content

web_sys/features/
gen_VideoDecoder.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 = EventTarget , extends = :: js_sys :: Object , js_name = VideoDecoder , typescript_type = "VideoDecoder")]
9    #[derive(Debug, Clone, PartialEq, Eq)]
10    #[doc = "The `VideoDecoder` class."]
11    #[doc = ""]
12    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoDecoder)"]
13    #[doc = ""]
14    #[doc = "*This API requires the following crate features to be activated: `VideoDecoder`*"]
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 VideoDecoder;
19    #[cfg(web_sys_unstable_apis)]
20    #[cfg(feature = "CodecState")]
21    # [wasm_bindgen (structural , method , getter , js_class = "VideoDecoder" , js_name = state)]
22    #[doc = "Getter for the `state` field of this object."]
23    #[doc = ""]
24    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoDecoder/state)"]
25    #[doc = ""]
26    #[doc = "*This API requires the following crate features to be activated: `CodecState`, `VideoDecoder`*"]
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 state(this: &VideoDecoder) -> CodecState;
31    #[cfg(web_sys_unstable_apis)]
32    # [wasm_bindgen (structural , method , getter , js_class = "VideoDecoder" , js_name = decodeQueueSize)]
33    #[doc = "Getter for the `decodeQueueSize` field of this object."]
34    #[doc = ""]
35    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoDecoder/decodeQueueSize)"]
36    #[doc = ""]
37    #[doc = "*This API requires the following crate features to be activated: `VideoDecoder`*"]
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 decode_queue_size(this: &VideoDecoder) -> u32;
42    #[cfg(web_sys_unstable_apis)]
43    # [wasm_bindgen (structural , method , getter , js_class = "VideoDecoder" , js_name = ondequeue)]
44    #[doc = "Getter for the `ondequeue` field of this object."]
45    #[doc = ""]
46    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoDecoder/ondequeue)"]
47    #[doc = ""]
48    #[doc = "*This API requires the following crate features to be activated: `VideoDecoder`*"]
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 ondequeue(this: &VideoDecoder) -> Option<::js_sys::Function>;
53    #[cfg(web_sys_unstable_apis)]
54    # [wasm_bindgen (structural , method , setter , js_class = "VideoDecoder" , js_name = ondequeue)]
55    #[doc = "Setter for the `ondequeue` field of this object."]
56    #[doc = ""]
57    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoDecoder/ondequeue)"]
58    #[doc = ""]
59    #[doc = "*This API requires the following crate features to be activated: `VideoDecoder`*"]
60    #[doc = ""]
61    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
62    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
63    pub fn set_ondequeue(this: &VideoDecoder, value: Option<&::js_sys::Function>);
64    #[cfg(web_sys_unstable_apis)]
65    #[cfg(feature = "VideoDecoderInit")]
66    #[wasm_bindgen(catch, constructor, js_class = "VideoDecoder")]
67    #[doc = "The `new VideoDecoder(..)` constructor, creating a new instance of `VideoDecoder`."]
68    #[doc = ""]
69    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoDecoder/VideoDecoder)"]
70    #[doc = ""]
71    #[doc = "*This API requires the following crate features to be activated: `VideoDecoder`, `VideoDecoderInit`*"]
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    pub fn new(init: &VideoDecoderInit) -> Result<VideoDecoder, JsValue>;
76    #[cfg(web_sys_unstable_apis)]
77    # [wasm_bindgen (catch , method , structural , js_class = "VideoDecoder" , js_name = close)]
78    #[doc = "The `close()` method."]
79    #[doc = ""]
80    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoDecoder/close)"]
81    #[doc = ""]
82    #[doc = "*This API requires the following crate features to be activated: `VideoDecoder`*"]
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 close(this: &VideoDecoder) -> Result<(), JsValue>;
87    #[cfg(web_sys_unstable_apis)]
88    #[cfg(feature = "VideoDecoderConfig")]
89    # [wasm_bindgen (catch , method , structural , js_class = "VideoDecoder" , js_name = configure)]
90    #[doc = "The `configure()` method."]
91    #[doc = ""]
92    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoDecoder/configure)"]
93    #[doc = ""]
94    #[doc = "*This API requires the following crate features to be activated: `VideoDecoder`, `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    pub fn configure(this: &VideoDecoder, config: &VideoDecoderConfig) -> Result<(), JsValue>;
99    #[cfg(web_sys_unstable_apis)]
100    #[cfg(feature = "EncodedVideoChunk")]
101    # [wasm_bindgen (catch , method , structural , js_class = "VideoDecoder" , js_name = decode)]
102    #[doc = "The `decode()` method."]
103    #[doc = ""]
104    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoDecoder/decode)"]
105    #[doc = ""]
106    #[doc = "*This API requires the following crate features to be activated: `EncodedVideoChunk`, `VideoDecoder`*"]
107    #[doc = ""]
108    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
109    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
110    pub fn decode(this: &VideoDecoder, chunk: &EncodedVideoChunk) -> Result<(), JsValue>;
111    #[cfg(web_sys_unstable_apis)]
112    # [wasm_bindgen (method , structural , js_class = "VideoDecoder" , js_name = flush)]
113    #[doc = "The `flush()` method."]
114    #[doc = ""]
115    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoDecoder/flush)"]
116    #[doc = ""]
117    #[doc = "*This API requires the following crate features to be activated: `VideoDecoder`*"]
118    #[doc = ""]
119    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
120    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
121    pub fn flush(this: &VideoDecoder) -> ::js_sys::Promise<::js_sys::Undefined>;
122    #[cfg(web_sys_unstable_apis)]
123    #[cfg(all(feature = "VideoDecoderConfig", feature = "VideoDecoderSupport",))]
124    # [wasm_bindgen (static_method_of = VideoDecoder , js_class = "VideoDecoder" , js_name = isConfigSupported)]
125    #[doc = "The `isConfigSupported()` method."]
126    #[doc = ""]
127    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoDecoder/isConfigSupported_static)"]
128    #[doc = ""]
129    #[doc = "*This API requires the following crate features to be activated: `VideoDecoder`, `VideoDecoderConfig`, `VideoDecoderSupport`*"]
130    #[doc = ""]
131    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
132    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
133    pub fn is_config_supported(
134        config: &VideoDecoderConfig,
135    ) -> ::js_sys::Promise<VideoDecoderSupport>;
136    #[cfg(web_sys_unstable_apis)]
137    # [wasm_bindgen (catch , method , structural , js_class = "VideoDecoder" , js_name = reset)]
138    #[doc = "The `reset()` method."]
139    #[doc = ""]
140    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoDecoder/reset)"]
141    #[doc = ""]
142    #[doc = "*This API requires the following crate features to be activated: `VideoDecoder`*"]
143    #[doc = ""]
144    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
145    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
146    pub fn reset(this: &VideoDecoder) -> Result<(), JsValue>;
147}