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