web_sys/features/
gen_VideoDecoder.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 = 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://rustwasm.github.io/docs/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://rustwasm.github.io/docs/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://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
41 pub fn decode_queue_size(this: &VideoDecoder) -> u32;
42 #[cfg(web_sys_unstable_apis)]
43 #[cfg(feature = "VideoDecoderInit")]
44 #[wasm_bindgen(catch, constructor, js_class = "VideoDecoder")]
45 #[doc = "The `new VideoDecoder(..)` constructor, creating a new instance of `VideoDecoder`."]
46 #[doc = ""]
47 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoDecoder/VideoDecoder)"]
48 #[doc = ""]
49 #[doc = "*This API requires the following crate features to be activated: `VideoDecoder`, `VideoDecoderInit`*"]
50 #[doc = ""]
51 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
52 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
53 pub fn new(init: &VideoDecoderInit) -> Result<VideoDecoder, JsValue>;
54 #[cfg(web_sys_unstable_apis)]
55 # [wasm_bindgen (catch , method , structural , js_class = "VideoDecoder" , js_name = close)]
56 #[doc = "The `close()` method."]
57 #[doc = ""]
58 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoDecoder/close)"]
59 #[doc = ""]
60 #[doc = "*This API requires the following crate features to be activated: `VideoDecoder`*"]
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://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
64 pub fn close(this: &VideoDecoder) -> Result<(), JsValue>;
65 #[cfg(web_sys_unstable_apis)]
66 #[cfg(feature = "VideoDecoderConfig")]
67 # [wasm_bindgen (catch , method , structural , js_class = "VideoDecoder" , js_name = configure)]
68 #[doc = "The `configure()` method."]
69 #[doc = ""]
70 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoDecoder/configure)"]
71 #[doc = ""]
72 #[doc = "*This API requires the following crate features to be activated: `VideoDecoder`, `VideoDecoderConfig`*"]
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://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
76 pub fn configure(this: &VideoDecoder, config: &VideoDecoderConfig) -> Result<(), JsValue>;
77 #[cfg(web_sys_unstable_apis)]
78 #[cfg(feature = "EncodedVideoChunk")]
79 # [wasm_bindgen (catch , method , structural , js_class = "VideoDecoder" , js_name = decode)]
80 #[doc = "The `decode()` method."]
81 #[doc = ""]
82 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoDecoder/decode)"]
83 #[doc = ""]
84 #[doc = "*This API requires the following crate features to be activated: `EncodedVideoChunk`, `VideoDecoder`*"]
85 #[doc = ""]
86 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
87 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
88 pub fn decode(this: &VideoDecoder, chunk: &EncodedVideoChunk) -> Result<(), JsValue>;
89 #[cfg(web_sys_unstable_apis)]
90 # [wasm_bindgen (method , structural , js_class = "VideoDecoder" , js_name = flush)]
91 #[doc = "The `flush()` method."]
92 #[doc = ""]
93 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoDecoder/flush)"]
94 #[doc = ""]
95 #[doc = "*This API requires the following crate features to be activated: `VideoDecoder`*"]
96 #[doc = ""]
97 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
98 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
99 pub fn flush(this: &VideoDecoder) -> ::js_sys::Promise;
100 #[cfg(web_sys_unstable_apis)]
101 #[cfg(feature = "VideoDecoderConfig")]
102 # [wasm_bindgen (static_method_of = VideoDecoder , js_class = "VideoDecoder" , js_name = isConfigSupported)]
103 #[doc = "The `isConfigSupported()` method."]
104 #[doc = ""]
105 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoDecoder/isConfigSupported_static)"]
106 #[doc = ""]
107 #[doc = "*This API requires the following crate features to be activated: `VideoDecoder`, `VideoDecoderConfig`*"]
108 #[doc = ""]
109 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
110 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
111 pub fn is_config_supported(config: &VideoDecoderConfig) -> ::js_sys::Promise;
112 #[cfg(web_sys_unstable_apis)]
113 # [wasm_bindgen (catch , method , structural , js_class = "VideoDecoder" , js_name = reset)]
114 #[doc = "The `reset()` method."]
115 #[doc = ""]
116 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoDecoder/reset)"]
117 #[doc = ""]
118 #[doc = "*This API requires the following crate features to be activated: `VideoDecoder`*"]
119 #[doc = ""]
120 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
121 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
122 pub fn reset(this: &VideoDecoder) -> Result<(), JsValue>;
123}