web_sys/features/
gen_VideoEncoder.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 = VideoEncoder , typescript_type = "VideoEncoder")]
9 #[derive(Debug, Clone, PartialEq, Eq)]
10 #[doc = "The `VideoEncoder` class."]
11 #[doc = ""]
12 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoEncoder)"]
13 #[doc = ""]
14 #[doc = "*This API requires the following crate features to be activated: `VideoEncoder`*"]
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 VideoEncoder;
19 #[cfg(web_sys_unstable_apis)]
20 #[cfg(feature = "CodecState")]
21 # [wasm_bindgen (structural , method , getter , js_class = "VideoEncoder" , 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/VideoEncoder/state)"]
25 #[doc = ""]
26 #[doc = "*This API requires the following crate features to be activated: `CodecState`, `VideoEncoder`*"]
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: &VideoEncoder) -> CodecState;
31 #[cfg(web_sys_unstable_apis)]
32 # [wasm_bindgen (structural , method , getter , js_class = "VideoEncoder" , js_name = encodeQueueSize)]
33 #[doc = "Getter for the `encodeQueueSize` field of this object."]
34 #[doc = ""]
35 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoEncoder/encodeQueueSize)"]
36 #[doc = ""]
37 #[doc = "*This API requires the following crate features to be activated: `VideoEncoder`*"]
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 encode_queue_size(this: &VideoEncoder) -> u32;
42 #[cfg(web_sys_unstable_apis)]
43 #[cfg(feature = "VideoEncoderInit")]
44 #[wasm_bindgen(catch, constructor, js_class = "VideoEncoder")]
45 #[doc = "The `new VideoEncoder(..)` constructor, creating a new instance of `VideoEncoder`."]
46 #[doc = ""]
47 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoEncoder/VideoEncoder)"]
48 #[doc = ""]
49 #[doc = "*This API requires the following crate features to be activated: `VideoEncoder`, `VideoEncoderInit`*"]
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: &VideoEncoderInit) -> Result<VideoEncoder, JsValue>;
54 #[cfg(web_sys_unstable_apis)]
55 # [wasm_bindgen (catch , method , structural , js_class = "VideoEncoder" , js_name = close)]
56 #[doc = "The `close()` method."]
57 #[doc = ""]
58 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoEncoder/close)"]
59 #[doc = ""]
60 #[doc = "*This API requires the following crate features to be activated: `VideoEncoder`*"]
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: &VideoEncoder) -> Result<(), JsValue>;
65 #[cfg(web_sys_unstable_apis)]
66 #[cfg(feature = "VideoEncoderConfig")]
67 # [wasm_bindgen (catch , method , structural , js_class = "VideoEncoder" , js_name = configure)]
68 #[doc = "The `configure()` method."]
69 #[doc = ""]
70 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoEncoder/configure)"]
71 #[doc = ""]
72 #[doc = "*This API requires the following crate features to be activated: `VideoEncoder`, `VideoEncoderConfig`*"]
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: &VideoEncoder, config: &VideoEncoderConfig) -> Result<(), JsValue>;
77 #[cfg(web_sys_unstable_apis)]
78 #[cfg(feature = "VideoFrame")]
79 # [wasm_bindgen (catch , method , structural , js_class = "VideoEncoder" , js_name = encode)]
80 #[doc = "The `encode()` method."]
81 #[doc = ""]
82 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoEncoder/encode)"]
83 #[doc = ""]
84 #[doc = "*This API requires the following crate features to be activated: `VideoEncoder`, `VideoFrame`*"]
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 encode(this: &VideoEncoder, frame: &VideoFrame) -> Result<(), JsValue>;
89 #[cfg(web_sys_unstable_apis)]
90 #[cfg(all(feature = "VideoEncoderEncodeOptions", feature = "VideoFrame",))]
91 # [wasm_bindgen (catch , method , structural , js_class = "VideoEncoder" , js_name = encode)]
92 #[doc = "The `encode()` method."]
93 #[doc = ""]
94 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoEncoder/encode)"]
95 #[doc = ""]
96 #[doc = "*This API requires the following crate features to be activated: `VideoEncoder`, `VideoEncoderEncodeOptions`, `VideoFrame`*"]
97 #[doc = ""]
98 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
99 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
100 pub fn encode_with_options(
101 this: &VideoEncoder,
102 frame: &VideoFrame,
103 options: &VideoEncoderEncodeOptions,
104 ) -> Result<(), JsValue>;
105 #[cfg(web_sys_unstable_apis)]
106 # [wasm_bindgen (method , structural , js_class = "VideoEncoder" , js_name = flush)]
107 #[doc = "The `flush()` method."]
108 #[doc = ""]
109 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoEncoder/flush)"]
110 #[doc = ""]
111 #[doc = "*This API requires the following crate features to be activated: `VideoEncoder`*"]
112 #[doc = ""]
113 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
114 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
115 pub fn flush(this: &VideoEncoder) -> ::js_sys::Promise;
116 #[cfg(web_sys_unstable_apis)]
117 #[cfg(feature = "VideoEncoderConfig")]
118 # [wasm_bindgen (static_method_of = VideoEncoder , js_class = "VideoEncoder" , js_name = isConfigSupported)]
119 #[doc = "The `isConfigSupported()` method."]
120 #[doc = ""]
121 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoEncoder/isConfigSupported_static)"]
122 #[doc = ""]
123 #[doc = "*This API requires the following crate features to be activated: `VideoEncoder`, `VideoEncoderConfig`*"]
124 #[doc = ""]
125 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
126 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
127 pub fn is_config_supported(config: &VideoEncoderConfig) -> ::js_sys::Promise;
128 #[cfg(web_sys_unstable_apis)]
129 # [wasm_bindgen (catch , method , structural , js_class = "VideoEncoder" , js_name = reset)]
130 #[doc = "The `reset()` method."]
131 #[doc = ""]
132 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoEncoder/reset)"]
133 #[doc = ""]
134 #[doc = "*This API requires the following crate features to be activated: `VideoEncoder`*"]
135 #[doc = ""]
136 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
137 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
138 pub fn reset(this: &VideoEncoder) -> Result<(), JsValue>;
139}