1 | // This file was generated by gir (https://github.com/gtk-rs/gir) |
2 | // from gir-files (https://github.com/gtk-rs/gir-files) |
3 | // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) |
4 | // DO NOT EDIT |
5 | |
6 | #![allow (non_camel_case_types, non_upper_case_globals, non_snake_case)] |
7 | #![allow ( |
8 | clippy::approx_constant, |
9 | clippy::type_complexity, |
10 | clippy::unreadable_literal, |
11 | clippy::upper_case_acronyms |
12 | )] |
13 | #![cfg_attr (docsrs, feature(doc_cfg))] |
14 | |
15 | #[allow (unused_imports)] |
16 | use libc::{ |
17 | c_char, c_double, c_float, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void, |
18 | intptr_t, size_t, ssize_t, uintptr_t, FILE, |
19 | }; |
20 | |
21 | #[allow (unused_imports)] |
22 | use glib::{gboolean, gconstpointer, gpointer, GType}; |
23 | |
24 | // Enums |
25 | pub type GstAppLeakyType = c_int; |
26 | pub const GST_APP_LEAKY_TYPE_NONE: GstAppLeakyType = 0; |
27 | pub const GST_APP_LEAKY_TYPE_UPSTREAM: GstAppLeakyType = 1; |
28 | pub const GST_APP_LEAKY_TYPE_DOWNSTREAM: GstAppLeakyType = 2; |
29 | |
30 | pub type GstAppStreamType = c_int; |
31 | pub const GST_APP_STREAM_TYPE_STREAM: GstAppStreamType = 0; |
32 | pub const GST_APP_STREAM_TYPE_SEEKABLE: GstAppStreamType = 1; |
33 | pub const GST_APP_STREAM_TYPE_RANDOM_ACCESS: GstAppStreamType = 2; |
34 | |
35 | // Records |
36 | #[derive (Copy, Clone)] |
37 | #[repr (C)] |
38 | pub struct GstAppSinkCallbacks { |
39 | pub eos: Option<unsafe extern "C" fn(*mut GstAppSink, gpointer)>, |
40 | pub new_preroll: Option<unsafe extern "C" fn(*mut GstAppSink, gpointer) -> gst::GstFlowReturn>, |
41 | pub new_sample: Option<unsafe extern "C" fn(*mut GstAppSink, gpointer) -> gst::GstFlowReturn>, |
42 | pub new_event: Option<unsafe extern "C" fn(*mut GstAppSink, gpointer) -> gboolean>, |
43 | pub propose_allocation: |
44 | Option<unsafe extern "C" fn(*mut GstAppSink, *mut gst::GstQuery, gpointer) -> gboolean>, |
45 | pub _gst_reserved: [gpointer; 2], |
46 | } |
47 | |
48 | impl ::std::fmt::Debug for GstAppSinkCallbacks { |
49 | fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { |
50 | f&mut DebugStruct<'_, '_>.debug_struct(&format!("GstAppSinkCallbacks @ {self:p}" )) |
51 | .field("eos" , &self.eos) |
52 | .field("new_preroll" , &self.new_preroll) |
53 | .field("new_sample" , &self.new_sample) |
54 | .field("new_event" , &self.new_event) |
55 | .field(name:"propose_allocation" , &self.propose_allocation) |
56 | .finish() |
57 | } |
58 | } |
59 | |
60 | #[derive (Copy, Clone)] |
61 | #[repr (C)] |
62 | pub struct GstAppSinkClass { |
63 | pub basesink_class: gst_base::GstBaseSinkClass, |
64 | pub eos: Option<unsafe extern "C" fn(*mut GstAppSink)>, |
65 | pub new_preroll: Option<unsafe extern "C" fn(*mut GstAppSink) -> gst::GstFlowReturn>, |
66 | pub new_sample: Option<unsafe extern "C" fn(*mut GstAppSink) -> gst::GstFlowReturn>, |
67 | pub pull_preroll: Option<unsafe extern "C" fn(*mut GstAppSink) -> *mut gst::GstSample>, |
68 | pub pull_sample: Option<unsafe extern "C" fn(*mut GstAppSink) -> *mut gst::GstSample>, |
69 | pub try_pull_preroll: |
70 | Option<unsafe extern "C" fn(*mut GstAppSink, gst::GstClockTime) -> *mut gst::GstSample>, |
71 | pub try_pull_sample: |
72 | Option<unsafe extern "C" fn(*mut GstAppSink, gst::GstClockTime) -> *mut gst::GstSample>, |
73 | pub try_pull_object: |
74 | Option<unsafe extern "C" fn(*mut GstAppSink, gst::GstClockTime) -> *mut gst::GstMiniObject>, |
75 | pub _gst_reserved: [gpointer; 1], |
76 | } |
77 | |
78 | impl ::std::fmt::Debug for GstAppSinkClass { |
79 | fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { |
80 | f&mut DebugStruct<'_, '_>.debug_struct(&format!("GstAppSinkClass @ {self:p}" )) |
81 | .field("basesink_class" , &self.basesink_class) |
82 | .field("eos" , &self.eos) |
83 | .field("new_preroll" , &self.new_preroll) |
84 | .field("new_sample" , &self.new_sample) |
85 | .field("pull_preroll" , &self.pull_preroll) |
86 | .field("pull_sample" , &self.pull_sample) |
87 | .field("try_pull_preroll" , &self.try_pull_preroll) |
88 | .field("try_pull_sample" , &self.try_pull_sample) |
89 | .field(name:"try_pull_object" , &self.try_pull_object) |
90 | .finish() |
91 | } |
92 | } |
93 | |
94 | #[repr (C)] |
95 | pub struct _GstAppSinkPrivate { |
96 | _data: [u8; 0], |
97 | _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>, |
98 | } |
99 | |
100 | pub type GstAppSinkPrivate = *mut _GstAppSinkPrivate; |
101 | |
102 | #[derive (Copy, Clone)] |
103 | #[repr (C)] |
104 | pub struct GstAppSrcCallbacks { |
105 | pub need_data: Option<unsafe extern "C" fn(*mut GstAppSrc, c_uint, gpointer)>, |
106 | pub enough_data: Option<unsafe extern "C" fn(*mut GstAppSrc, gpointer)>, |
107 | pub seek_data: Option<unsafe extern "C" fn(*mut GstAppSrc, u64, gpointer) -> gboolean>, |
108 | pub _gst_reserved: [gpointer; 4], |
109 | } |
110 | |
111 | impl ::std::fmt::Debug for GstAppSrcCallbacks { |
112 | fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { |
113 | f&mut DebugStruct<'_, '_>.debug_struct(&format!("GstAppSrcCallbacks @ {self:p}" )) |
114 | .field("need_data" , &self.need_data) |
115 | .field("enough_data" , &self.enough_data) |
116 | .field(name:"seek_data" , &self.seek_data) |
117 | .finish() |
118 | } |
119 | } |
120 | |
121 | #[derive (Copy, Clone)] |
122 | #[repr (C)] |
123 | pub struct GstAppSrcClass { |
124 | pub basesrc_class: gst_base::GstBaseSrcClass, |
125 | pub need_data: Option<unsafe extern "C" fn(*mut GstAppSrc, c_uint)>, |
126 | pub enough_data: Option<unsafe extern "C" fn(*mut GstAppSrc)>, |
127 | pub seek_data: Option<unsafe extern "C" fn(*mut GstAppSrc, u64) -> gboolean>, |
128 | pub push_buffer: |
129 | Option<unsafe extern "C" fn(*mut GstAppSrc, *mut gst::GstBuffer) -> gst::GstFlowReturn>, |
130 | pub end_of_stream: Option<unsafe extern "C" fn(*mut GstAppSrc) -> gst::GstFlowReturn>, |
131 | pub push_sample: |
132 | Option<unsafe extern "C" fn(*mut GstAppSrc, *mut gst::GstSample) -> gst::GstFlowReturn>, |
133 | pub push_buffer_list: |
134 | Option<unsafe extern "C" fn(*mut GstAppSrc, *mut gst::GstBufferList) -> gst::GstFlowReturn>, |
135 | pub _gst_reserved: [gpointer; 2], |
136 | } |
137 | |
138 | impl ::std::fmt::Debug for GstAppSrcClass { |
139 | fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { |
140 | f&mut DebugStruct<'_, '_>.debug_struct(&format!("GstAppSrcClass @ {self:p}" )) |
141 | .field("basesrc_class" , &self.basesrc_class) |
142 | .field("need_data" , &self.need_data) |
143 | .field("enough_data" , &self.enough_data) |
144 | .field("seek_data" , &self.seek_data) |
145 | .field("push_buffer" , &self.push_buffer) |
146 | .field("end_of_stream" , &self.end_of_stream) |
147 | .field("push_sample" , &self.push_sample) |
148 | .field(name:"push_buffer_list" , &self.push_buffer_list) |
149 | .finish() |
150 | } |
151 | } |
152 | |
153 | #[repr (C)] |
154 | pub struct _GstAppSrcPrivate { |
155 | _data: [u8; 0], |
156 | _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>, |
157 | } |
158 | |
159 | pub type GstAppSrcPrivate = *mut _GstAppSrcPrivate; |
160 | |
161 | // Classes |
162 | #[derive (Copy, Clone)] |
163 | #[repr (C)] |
164 | pub struct GstAppSink { |
165 | pub basesink: gst_base::GstBaseSink, |
166 | pub priv_: *mut GstAppSinkPrivate, |
167 | pub _gst_reserved: [gpointer; 4], |
168 | } |
169 | |
170 | impl ::std::fmt::Debug for GstAppSink { |
171 | fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { |
172 | f&mut DebugStruct<'_, '_>.debug_struct(&format!("GstAppSink @ {self:p}" )) |
173 | .field(name:"basesink" , &self.basesink) |
174 | .finish() |
175 | } |
176 | } |
177 | |
178 | #[derive (Copy, Clone)] |
179 | #[repr (C)] |
180 | pub struct GstAppSrc { |
181 | pub basesrc: gst_base::GstBaseSrc, |
182 | pub priv_: *mut GstAppSrcPrivate, |
183 | pub _gst_reserved: [gpointer; 4], |
184 | } |
185 | |
186 | impl ::std::fmt::Debug for GstAppSrc { |
187 | fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { |
188 | f&mut DebugStruct<'_, '_>.debug_struct(&format!("GstAppSrc @ {self:p}" )) |
189 | .field(name:"basesrc" , &self.basesrc) |
190 | .finish() |
191 | } |
192 | } |
193 | |
194 | #[link (name = "gstapp-1.0" )] |
195 | extern "C" { |
196 | |
197 | //========================================================================= |
198 | // GstAppLeakyType |
199 | //========================================================================= |
200 | #[cfg (feature = "v1_20" )] |
201 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_20" )))] |
202 | pub fn gst_app_leaky_type_get_type() -> GType; |
203 | |
204 | //========================================================================= |
205 | // GstAppStreamType |
206 | //========================================================================= |
207 | pub fn gst_app_stream_type_get_type() -> GType; |
208 | |
209 | //========================================================================= |
210 | // GstAppSink |
211 | //========================================================================= |
212 | pub fn gst_app_sink_get_type() -> GType; |
213 | pub fn gst_app_sink_get_buffer_list_support(appsink: *mut GstAppSink) -> gboolean; |
214 | pub fn gst_app_sink_get_caps(appsink: *mut GstAppSink) -> *mut gst::GstCaps; |
215 | pub fn gst_app_sink_get_drop(appsink: *mut GstAppSink) -> gboolean; |
216 | pub fn gst_app_sink_get_emit_signals(appsink: *mut GstAppSink) -> gboolean; |
217 | pub fn gst_app_sink_get_max_buffers(appsink: *mut GstAppSink) -> c_uint; |
218 | #[cfg (feature = "v1_24" )] |
219 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_24" )))] |
220 | pub fn gst_app_sink_get_max_bytes(appsink: *mut GstAppSink) -> u64; |
221 | #[cfg (feature = "v1_24" )] |
222 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_24" )))] |
223 | pub fn gst_app_sink_get_max_time(appsink: *mut GstAppSink) -> gst::GstClockTime; |
224 | pub fn gst_app_sink_get_wait_on_eos(appsink: *mut GstAppSink) -> gboolean; |
225 | pub fn gst_app_sink_is_eos(appsink: *mut GstAppSink) -> gboolean; |
226 | #[cfg (feature = "v1_20" )] |
227 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_20" )))] |
228 | pub fn gst_app_sink_pull_object(appsink: *mut GstAppSink) -> *mut gst::GstMiniObject; |
229 | pub fn gst_app_sink_pull_preroll(appsink: *mut GstAppSink) -> *mut gst::GstSample; |
230 | pub fn gst_app_sink_pull_sample(appsink: *mut GstAppSink) -> *mut gst::GstSample; |
231 | pub fn gst_app_sink_set_buffer_list_support(appsink: *mut GstAppSink, enable_lists: gboolean); |
232 | pub fn gst_app_sink_set_callbacks( |
233 | appsink: *mut GstAppSink, |
234 | callbacks: *mut GstAppSinkCallbacks, |
235 | user_data: gpointer, |
236 | notify: glib::GDestroyNotify, |
237 | ); |
238 | pub fn gst_app_sink_set_caps(appsink: *mut GstAppSink, caps: *const gst::GstCaps); |
239 | pub fn gst_app_sink_set_drop(appsink: *mut GstAppSink, drop: gboolean); |
240 | pub fn gst_app_sink_set_emit_signals(appsink: *mut GstAppSink, emit: gboolean); |
241 | pub fn gst_app_sink_set_max_buffers(appsink: *mut GstAppSink, max: c_uint); |
242 | #[cfg (feature = "v1_24" )] |
243 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_24" )))] |
244 | pub fn gst_app_sink_set_max_bytes(appsink: *mut GstAppSink, max: u64); |
245 | #[cfg (feature = "v1_24" )] |
246 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_24" )))] |
247 | pub fn gst_app_sink_set_max_time(appsink: *mut GstAppSink, max: gst::GstClockTime); |
248 | pub fn gst_app_sink_set_wait_on_eos(appsink: *mut GstAppSink, wait: gboolean); |
249 | #[cfg (feature = "v1_20" )] |
250 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_20" )))] |
251 | pub fn gst_app_sink_try_pull_object( |
252 | appsink: *mut GstAppSink, |
253 | timeout: gst::GstClockTime, |
254 | ) -> *mut gst::GstMiniObject; |
255 | pub fn gst_app_sink_try_pull_preroll( |
256 | appsink: *mut GstAppSink, |
257 | timeout: gst::GstClockTime, |
258 | ) -> *mut gst::GstSample; |
259 | pub fn gst_app_sink_try_pull_sample( |
260 | appsink: *mut GstAppSink, |
261 | timeout: gst::GstClockTime, |
262 | ) -> *mut gst::GstSample; |
263 | |
264 | //========================================================================= |
265 | // GstAppSrc |
266 | //========================================================================= |
267 | pub fn gst_app_src_get_type() -> GType; |
268 | pub fn gst_app_src_end_of_stream(appsrc: *mut GstAppSrc) -> gst::GstFlowReturn; |
269 | pub fn gst_app_src_get_caps(appsrc: *mut GstAppSrc) -> *mut gst::GstCaps; |
270 | #[cfg (feature = "v1_20" )] |
271 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_20" )))] |
272 | pub fn gst_app_src_get_current_level_buffers(appsrc: *mut GstAppSrc) -> u64; |
273 | pub fn gst_app_src_get_current_level_bytes(appsrc: *mut GstAppSrc) -> u64; |
274 | #[cfg (feature = "v1_20" )] |
275 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_20" )))] |
276 | pub fn gst_app_src_get_current_level_time(appsrc: *mut GstAppSrc) -> gst::GstClockTime; |
277 | pub fn gst_app_src_get_duration(appsrc: *mut GstAppSrc) -> gst::GstClockTime; |
278 | pub fn gst_app_src_get_emit_signals(appsrc: *mut GstAppSrc) -> gboolean; |
279 | pub fn gst_app_src_get_latency(appsrc: *mut GstAppSrc, min: *mut u64, max: *mut u64); |
280 | #[cfg (feature = "v1_20" )] |
281 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_20" )))] |
282 | pub fn gst_app_src_get_leaky_type(appsrc: *mut GstAppSrc) -> GstAppLeakyType; |
283 | #[cfg (feature = "v1_20" )] |
284 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_20" )))] |
285 | pub fn gst_app_src_get_max_buffers(appsrc: *mut GstAppSrc) -> u64; |
286 | pub fn gst_app_src_get_max_bytes(appsrc: *mut GstAppSrc) -> u64; |
287 | #[cfg (feature = "v1_20" )] |
288 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_20" )))] |
289 | pub fn gst_app_src_get_max_time(appsrc: *mut GstAppSrc) -> gst::GstClockTime; |
290 | pub fn gst_app_src_get_size(appsrc: *mut GstAppSrc) -> i64; |
291 | pub fn gst_app_src_get_stream_type(appsrc: *mut GstAppSrc) -> GstAppStreamType; |
292 | pub fn gst_app_src_push_buffer( |
293 | appsrc: *mut GstAppSrc, |
294 | buffer: *mut gst::GstBuffer, |
295 | ) -> gst::GstFlowReturn; |
296 | pub fn gst_app_src_push_buffer_list( |
297 | appsrc: *mut GstAppSrc, |
298 | buffer_list: *mut gst::GstBufferList, |
299 | ) -> gst::GstFlowReturn; |
300 | pub fn gst_app_src_push_sample( |
301 | appsrc: *mut GstAppSrc, |
302 | sample: *mut gst::GstSample, |
303 | ) -> gst::GstFlowReturn; |
304 | pub fn gst_app_src_set_callbacks( |
305 | appsrc: *mut GstAppSrc, |
306 | callbacks: *mut GstAppSrcCallbacks, |
307 | user_data: gpointer, |
308 | notify: glib::GDestroyNotify, |
309 | ); |
310 | pub fn gst_app_src_set_caps(appsrc: *mut GstAppSrc, caps: *const gst::GstCaps); |
311 | pub fn gst_app_src_set_duration(appsrc: *mut GstAppSrc, duration: gst::GstClockTime); |
312 | pub fn gst_app_src_set_emit_signals(appsrc: *mut GstAppSrc, emit: gboolean); |
313 | pub fn gst_app_src_set_latency(appsrc: *mut GstAppSrc, min: u64, max: u64); |
314 | #[cfg (feature = "v1_20" )] |
315 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_20" )))] |
316 | pub fn gst_app_src_set_leaky_type(appsrc: *mut GstAppSrc, leaky: GstAppLeakyType); |
317 | #[cfg (feature = "v1_20" )] |
318 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_20" )))] |
319 | pub fn gst_app_src_set_max_buffers(appsrc: *mut GstAppSrc, max: u64); |
320 | pub fn gst_app_src_set_max_bytes(appsrc: *mut GstAppSrc, max: u64); |
321 | #[cfg (feature = "v1_20" )] |
322 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_20" )))] |
323 | pub fn gst_app_src_set_max_time(appsrc: *mut GstAppSrc, max: gst::GstClockTime); |
324 | pub fn gst_app_src_set_size(appsrc: *mut GstAppSrc, size: i64); |
325 | pub fn gst_app_src_set_stream_type(appsrc: *mut GstAppSrc, type_: GstAppStreamType); |
326 | |
327 | } |
328 | |