1 // This file was generated by gir (https://github.com/gtk-rs/gir @ d1e88f9) 2 // from gir-files (https://github.com/gtk-rs/gir-files @ 63dd366) 3 // DO NOT EDIT 4 5 #![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)] 6 #![allow( 7 clippy::approx_constant, 8 clippy::type_complexity, 9 clippy::unreadable_literal 10 )] 11 12 extern crate glib_sys as glib; 13 extern crate gstreamer_base_sys as gst_base; 14 extern crate gstreamer_sys as gst; 15 extern crate libc; 16 17 #[allow(unused_imports)] 18 use libc::{ 19 c_char, c_double, c_float, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void, 20 intptr_t, size_t, ssize_t, time_t, uintptr_t, FILE, 21 }; 22 23 #[allow(unused_imports)] 24 use glib::{gboolean, gconstpointer, gpointer, GType}; 25 26 // Enums 27 pub type GstAppStreamType = c_int; 28 pub const GST_APP_STREAM_TYPE_STREAM: GstAppStreamType = 0; 29 pub const GST_APP_STREAM_TYPE_SEEKABLE: GstAppStreamType = 1; 30 pub const GST_APP_STREAM_TYPE_RANDOM_ACCESS: GstAppStreamType = 2; 31 32 // Records 33 #[repr(C)] 34 #[derive(Copy, Clone)] 35 pub struct GstAppSinkCallbacks { 36 pub eos: Option<unsafe extern "C" fn(*mut GstAppSink, gpointer)>, 37 pub new_preroll: Option<unsafe extern "C" fn(*mut GstAppSink, gpointer) -> gst::GstFlowReturn>, 38 pub new_sample: Option<unsafe extern "C" fn(*mut GstAppSink, gpointer) -> gst::GstFlowReturn>, 39 pub _gst_reserved: [gpointer; 4], 40 } 41 42 impl ::std::fmt::Debug for GstAppSinkCallbacks { fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result43 fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { 44 f.debug_struct(&format!("GstAppSinkCallbacks @ {:?}", self as *const _)) 45 .field("eos", &self.eos) 46 .field("new_preroll", &self.new_preroll) 47 .field("new_sample", &self.new_sample) 48 .finish() 49 } 50 } 51 52 #[repr(C)] 53 #[derive(Copy, Clone)] 54 pub struct GstAppSinkClass { 55 pub basesink_class: gst_base::GstBaseSinkClass, 56 pub eos: Option<unsafe extern "C" fn(*mut GstAppSink)>, 57 pub new_preroll: Option<unsafe extern "C" fn(*mut GstAppSink) -> gst::GstFlowReturn>, 58 pub new_sample: Option<unsafe extern "C" fn(*mut GstAppSink) -> gst::GstFlowReturn>, 59 pub pull_preroll: Option<unsafe extern "C" fn(*mut GstAppSink) -> *mut gst::GstSample>, 60 pub pull_sample: Option<unsafe extern "C" fn(*mut GstAppSink) -> *mut gst::GstSample>, 61 pub try_pull_preroll: 62 Option<unsafe extern "C" fn(*mut GstAppSink, gst::GstClockTime) -> *mut gst::GstSample>, 63 pub try_pull_sample: 64 Option<unsafe extern "C" fn(*mut GstAppSink, gst::GstClockTime) -> *mut gst::GstSample>, 65 pub _gst_reserved: [gpointer; 2], 66 } 67 68 impl ::std::fmt::Debug for GstAppSinkClass { fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result69 fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { 70 f.debug_struct(&format!("GstAppSinkClass @ {:?}", self as *const _)) 71 .field("basesink_class", &self.basesink_class) 72 .field("eos", &self.eos) 73 .field("new_preroll", &self.new_preroll) 74 .field("new_sample", &self.new_sample) 75 .field("pull_preroll", &self.pull_preroll) 76 .field("pull_sample", &self.pull_sample) 77 .field("try_pull_preroll", &self.try_pull_preroll) 78 .field("try_pull_sample", &self.try_pull_sample) 79 .finish() 80 } 81 } 82 83 #[repr(C)] 84 pub struct _GstAppSinkPrivate(c_void); 85 86 pub type GstAppSinkPrivate = *mut _GstAppSinkPrivate; 87 88 #[repr(C)] 89 #[derive(Copy, Clone)] 90 pub struct GstAppSrcCallbacks { 91 pub need_data: Option<unsafe extern "C" fn(*mut GstAppSrc, c_uint, gpointer)>, 92 pub enough_data: Option<unsafe extern "C" fn(*mut GstAppSrc, gpointer)>, 93 pub seek_data: Option<unsafe extern "C" fn(*mut GstAppSrc, u64, gpointer) -> gboolean>, 94 pub _gst_reserved: [gpointer; 4], 95 } 96 97 impl ::std::fmt::Debug for GstAppSrcCallbacks { fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result98 fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { 99 f.debug_struct(&format!("GstAppSrcCallbacks @ {:?}", self as *const _)) 100 .field("need_data", &self.need_data) 101 .field("enough_data", &self.enough_data) 102 .field("seek_data", &self.seek_data) 103 .finish() 104 } 105 } 106 107 #[repr(C)] 108 #[derive(Copy, Clone)] 109 pub struct GstAppSrcClass { 110 pub basesrc_class: gst_base::GstBaseSrcClass, 111 pub need_data: Option<unsafe extern "C" fn(*mut GstAppSrc, c_uint)>, 112 pub enough_data: Option<unsafe extern "C" fn(*mut GstAppSrc)>, 113 pub seek_data: Option<unsafe extern "C" fn(*mut GstAppSrc, u64) -> gboolean>, 114 pub push_buffer: 115 Option<unsafe extern "C" fn(*mut GstAppSrc, *mut gst::GstBuffer) -> gst::GstFlowReturn>, 116 pub end_of_stream: Option<unsafe extern "C" fn(*mut GstAppSrc) -> gst::GstFlowReturn>, 117 pub push_sample: 118 Option<unsafe extern "C" fn(*mut GstAppSrc, *mut gst::GstSample) -> gst::GstFlowReturn>, 119 pub push_buffer_list: 120 Option<unsafe extern "C" fn(*mut GstAppSrc, *mut gst::GstBufferList) -> gst::GstFlowReturn>, 121 pub _gst_reserved: [gpointer; 2], 122 } 123 124 impl ::std::fmt::Debug for GstAppSrcClass { fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result125 fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { 126 f.debug_struct(&format!("GstAppSrcClass @ {:?}", self as *const _)) 127 .field("basesrc_class", &self.basesrc_class) 128 .field("need_data", &self.need_data) 129 .field("enough_data", &self.enough_data) 130 .field("seek_data", &self.seek_data) 131 .field("push_buffer", &self.push_buffer) 132 .field("end_of_stream", &self.end_of_stream) 133 .field("push_sample", &self.push_sample) 134 .field("push_buffer_list", &self.push_buffer_list) 135 .finish() 136 } 137 } 138 139 #[repr(C)] 140 pub struct _GstAppSrcPrivate(c_void); 141 142 pub type GstAppSrcPrivate = *mut _GstAppSrcPrivate; 143 144 // Classes 145 #[repr(C)] 146 #[derive(Copy, Clone)] 147 pub struct GstAppSink { 148 pub basesink: gst_base::GstBaseSink, 149 pub priv_: *mut GstAppSinkPrivate, 150 pub _gst_reserved: [gpointer; 4], 151 } 152 153 impl ::std::fmt::Debug for GstAppSink { fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result154 fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { 155 f.debug_struct(&format!("GstAppSink @ {:?}", self as *const _)) 156 .field("basesink", &self.basesink) 157 .finish() 158 } 159 } 160 161 #[repr(C)] 162 #[derive(Copy, Clone)] 163 pub struct GstAppSrc { 164 pub basesrc: gst_base::GstBaseSrc, 165 pub priv_: *mut GstAppSrcPrivate, 166 pub _gst_reserved: [gpointer; 4], 167 } 168 169 impl ::std::fmt::Debug for GstAppSrc { fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result170 fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { 171 f.debug_struct(&format!("GstAppSrc @ {:?}", self as *const _)) 172 .field("basesrc", &self.basesrc) 173 .finish() 174 } 175 } 176 177 extern "C" { 178 179 //========================================================================= 180 // GstAppStreamType 181 //========================================================================= gst_app_stream_type_get_type() -> GType182 pub fn gst_app_stream_type_get_type() -> GType; 183 184 //========================================================================= 185 // GstAppSink 186 //========================================================================= gst_app_sink_get_type() -> GType187 pub fn gst_app_sink_get_type() -> GType; 188 #[cfg(any(feature = "v1_12", feature = "dox"))] gst_app_sink_get_buffer_list_support(appsink: *mut GstAppSink) -> gboolean189 pub fn gst_app_sink_get_buffer_list_support(appsink: *mut GstAppSink) -> gboolean; gst_app_sink_get_caps(appsink: *mut GstAppSink) -> *mut gst::GstCaps190 pub fn gst_app_sink_get_caps(appsink: *mut GstAppSink) -> *mut gst::GstCaps; gst_app_sink_get_drop(appsink: *mut GstAppSink) -> gboolean191 pub fn gst_app_sink_get_drop(appsink: *mut GstAppSink) -> gboolean; gst_app_sink_get_emit_signals(appsink: *mut GstAppSink) -> gboolean192 pub fn gst_app_sink_get_emit_signals(appsink: *mut GstAppSink) -> gboolean; gst_app_sink_get_max_buffers(appsink: *mut GstAppSink) -> c_uint193 pub fn gst_app_sink_get_max_buffers(appsink: *mut GstAppSink) -> c_uint; gst_app_sink_get_wait_on_eos(appsink: *mut GstAppSink) -> gboolean194 pub fn gst_app_sink_get_wait_on_eos(appsink: *mut GstAppSink) -> gboolean; gst_app_sink_is_eos(appsink: *mut GstAppSink) -> gboolean195 pub fn gst_app_sink_is_eos(appsink: *mut GstAppSink) -> gboolean; gst_app_sink_pull_preroll(appsink: *mut GstAppSink) -> *mut gst::GstSample196 pub fn gst_app_sink_pull_preroll(appsink: *mut GstAppSink) -> *mut gst::GstSample; gst_app_sink_pull_sample(appsink: *mut GstAppSink) -> *mut gst::GstSample197 pub fn gst_app_sink_pull_sample(appsink: *mut GstAppSink) -> *mut gst::GstSample; 198 #[cfg(any(feature = "v1_12", feature = "dox"))] gst_app_sink_set_buffer_list_support(appsink: *mut GstAppSink, enable_lists: gboolean)199 pub fn gst_app_sink_set_buffer_list_support(appsink: *mut GstAppSink, enable_lists: gboolean); gst_app_sink_set_callbacks( appsink: *mut GstAppSink, callbacks: *mut GstAppSinkCallbacks, user_data: gpointer, notify: glib::GDestroyNotify, )200 pub fn gst_app_sink_set_callbacks( 201 appsink: *mut GstAppSink, 202 callbacks: *mut GstAppSinkCallbacks, 203 user_data: gpointer, 204 notify: glib::GDestroyNotify, 205 ); gst_app_sink_set_caps(appsink: *mut GstAppSink, caps: *const gst::GstCaps)206 pub fn gst_app_sink_set_caps(appsink: *mut GstAppSink, caps: *const gst::GstCaps); gst_app_sink_set_drop(appsink: *mut GstAppSink, drop: gboolean)207 pub fn gst_app_sink_set_drop(appsink: *mut GstAppSink, drop: gboolean); gst_app_sink_set_emit_signals(appsink: *mut GstAppSink, emit: gboolean)208 pub fn gst_app_sink_set_emit_signals(appsink: *mut GstAppSink, emit: gboolean); gst_app_sink_set_max_buffers(appsink: *mut GstAppSink, max: c_uint)209 pub fn gst_app_sink_set_max_buffers(appsink: *mut GstAppSink, max: c_uint); gst_app_sink_set_wait_on_eos(appsink: *mut GstAppSink, wait: gboolean)210 pub fn gst_app_sink_set_wait_on_eos(appsink: *mut GstAppSink, wait: gboolean); 211 #[cfg(any(feature = "v1_10", feature = "dox"))] gst_app_sink_try_pull_preroll( appsink: *mut GstAppSink, timeout: gst::GstClockTime, ) -> *mut gst::GstSample212 pub fn gst_app_sink_try_pull_preroll( 213 appsink: *mut GstAppSink, 214 timeout: gst::GstClockTime, 215 ) -> *mut gst::GstSample; 216 #[cfg(any(feature = "v1_10", feature = "dox"))] gst_app_sink_try_pull_sample( appsink: *mut GstAppSink, timeout: gst::GstClockTime, ) -> *mut gst::GstSample217 pub fn gst_app_sink_try_pull_sample( 218 appsink: *mut GstAppSink, 219 timeout: gst::GstClockTime, 220 ) -> *mut gst::GstSample; 221 222 //========================================================================= 223 // GstAppSrc 224 //========================================================================= gst_app_src_get_type() -> GType225 pub fn gst_app_src_get_type() -> GType; gst_app_src_end_of_stream(appsrc: *mut GstAppSrc) -> gst::GstFlowReturn226 pub fn gst_app_src_end_of_stream(appsrc: *mut GstAppSrc) -> gst::GstFlowReturn; gst_app_src_get_caps(appsrc: *mut GstAppSrc) -> *mut gst::GstCaps227 pub fn gst_app_src_get_caps(appsrc: *mut GstAppSrc) -> *mut gst::GstCaps; 228 #[cfg(any(feature = "v1_2", feature = "dox"))] gst_app_src_get_current_level_bytes(appsrc: *mut GstAppSrc) -> u64229 pub fn gst_app_src_get_current_level_bytes(appsrc: *mut GstAppSrc) -> u64; 230 #[cfg(any(feature = "v1_10", feature = "dox"))] gst_app_src_get_duration(appsrc: *mut GstAppSrc) -> gst::GstClockTime231 pub fn gst_app_src_get_duration(appsrc: *mut GstAppSrc) -> gst::GstClockTime; gst_app_src_get_emit_signals(appsrc: *mut GstAppSrc) -> gboolean232 pub fn gst_app_src_get_emit_signals(appsrc: *mut GstAppSrc) -> gboolean; gst_app_src_get_latency(appsrc: *mut GstAppSrc, min: *mut u64, max: *mut u64)233 pub fn gst_app_src_get_latency(appsrc: *mut GstAppSrc, min: *mut u64, max: *mut u64); gst_app_src_get_max_bytes(appsrc: *mut GstAppSrc) -> u64234 pub fn gst_app_src_get_max_bytes(appsrc: *mut GstAppSrc) -> u64; gst_app_src_get_size(appsrc: *mut GstAppSrc) -> i64235 pub fn gst_app_src_get_size(appsrc: *mut GstAppSrc) -> i64; gst_app_src_get_stream_type(appsrc: *mut GstAppSrc) -> GstAppStreamType236 pub fn gst_app_src_get_stream_type(appsrc: *mut GstAppSrc) -> GstAppStreamType; gst_app_src_push_buffer( appsrc: *mut GstAppSrc, buffer: *mut gst::GstBuffer, ) -> gst::GstFlowReturn237 pub fn gst_app_src_push_buffer( 238 appsrc: *mut GstAppSrc, 239 buffer: *mut gst::GstBuffer, 240 ) -> gst::GstFlowReturn; 241 #[cfg(any(feature = "v1_14", feature = "dox"))] gst_app_src_push_buffer_list( appsrc: *mut GstAppSrc, buffer_list: *mut gst::GstBufferList, ) -> gst::GstFlowReturn242 pub fn gst_app_src_push_buffer_list( 243 appsrc: *mut GstAppSrc, 244 buffer_list: *mut gst::GstBufferList, 245 ) -> gst::GstFlowReturn; 246 #[cfg(any(feature = "v1_6", feature = "dox"))] gst_app_src_push_sample( appsrc: *mut GstAppSrc, sample: *mut gst::GstSample, ) -> gst::GstFlowReturn247 pub fn gst_app_src_push_sample( 248 appsrc: *mut GstAppSrc, 249 sample: *mut gst::GstSample, 250 ) -> gst::GstFlowReturn; gst_app_src_set_callbacks( appsrc: *mut GstAppSrc, callbacks: *mut GstAppSrcCallbacks, user_data: gpointer, notify: glib::GDestroyNotify, )251 pub fn gst_app_src_set_callbacks( 252 appsrc: *mut GstAppSrc, 253 callbacks: *mut GstAppSrcCallbacks, 254 user_data: gpointer, 255 notify: glib::GDestroyNotify, 256 ); gst_app_src_set_caps(appsrc: *mut GstAppSrc, caps: *const gst::GstCaps)257 pub fn gst_app_src_set_caps(appsrc: *mut GstAppSrc, caps: *const gst::GstCaps); 258 #[cfg(any(feature = "v1_10", feature = "dox"))] gst_app_src_set_duration(appsrc: *mut GstAppSrc, duration: gst::GstClockTime)259 pub fn gst_app_src_set_duration(appsrc: *mut GstAppSrc, duration: gst::GstClockTime); gst_app_src_set_emit_signals(appsrc: *mut GstAppSrc, emit: gboolean)260 pub fn gst_app_src_set_emit_signals(appsrc: *mut GstAppSrc, emit: gboolean); gst_app_src_set_latency(appsrc: *mut GstAppSrc, min: u64, max: u64)261 pub fn gst_app_src_set_latency(appsrc: *mut GstAppSrc, min: u64, max: u64); gst_app_src_set_max_bytes(appsrc: *mut GstAppSrc, max: u64)262 pub fn gst_app_src_set_max_bytes(appsrc: *mut GstAppSrc, max: u64); gst_app_src_set_size(appsrc: *mut GstAppSrc, size: i64)263 pub fn gst_app_src_set_size(appsrc: *mut GstAppSrc, size: i64); gst_app_src_set_stream_type(appsrc: *mut GstAppSrc, type_: GstAppStreamType)264 pub fn gst_app_src_set_stream_type(appsrc: *mut GstAppSrc, type_: GstAppStreamType); 265 266 } 267