2019-10-04 16:27:46 +00:00
|
|
|
// This file was generated by gir (https://github.com/gtk-rs/gir @ 7cca816)
|
2018-03-02 19:16:11 +00:00
|
|
|
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
2017-12-16 12:33:19 +00:00
|
|
|
// DO NOT EDIT
|
|
|
|
|
2018-02-07 16:49:22 +00:00
|
|
|
#![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)]
|
2019-06-18 10:04:39 +00:00
|
|
|
#![allow(
|
|
|
|
clippy::approx_constant,
|
|
|
|
clippy::type_complexity,
|
|
|
|
clippy::unreadable_literal
|
|
|
|
)]
|
2017-12-16 12:33:19 +00:00
|
|
|
|
2019-06-18 10:04:39 +00:00
|
|
|
extern crate gio_sys as gio;
|
2017-12-16 12:33:19 +00:00
|
|
|
extern crate glib_sys as glib;
|
|
|
|
extern crate gobject_sys as gobject;
|
|
|
|
extern crate gstreamer_sys as gst;
|
2019-06-18 10:04:39 +00:00
|
|
|
extern crate libc;
|
2017-12-16 12:33:19 +00:00
|
|
|
|
|
|
|
#[allow(unused_imports)]
|
2019-06-18 10:04:39 +00:00
|
|
|
use libc::{
|
|
|
|
c_char, c_double, c_float, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void,
|
|
|
|
intptr_t, size_t, ssize_t, time_t, uintptr_t, FILE,
|
|
|
|
};
|
2017-12-16 12:33:19 +00:00
|
|
|
|
|
|
|
#[allow(unused_imports)]
|
2018-04-23 17:07:07 +00:00
|
|
|
use glib::{gboolean, gconstpointer, gpointer, GType};
|
2017-12-16 12:33:19 +00:00
|
|
|
|
|
|
|
// Constants
|
|
|
|
pub const GST_NET_TIME_PACKET_SIZE: c_int = 16;
|
|
|
|
pub const GST_PTP_CLOCK_ID_NONE: u64 = 18446744073709551615;
|
2019-06-18 10:04:39 +00:00
|
|
|
pub const GST_PTP_STATISTICS_BEST_MASTER_CLOCK_SELECTED: *const c_char =
|
|
|
|
b"GstPtpStatisticsBestMasterClockSelected\0" as *const u8 as *const c_char;
|
|
|
|
pub const GST_PTP_STATISTICS_NEW_DOMAIN_FOUND: *const c_char =
|
|
|
|
b"GstPtpStatisticsNewDomainFound\0" as *const u8 as *const c_char;
|
|
|
|
pub const GST_PTP_STATISTICS_PATH_DELAY_MEASURED: *const c_char =
|
|
|
|
b"GstPtpStatisticsPathDelayMeasured\0" as *const u8 as *const c_char;
|
|
|
|
pub const GST_PTP_STATISTICS_TIME_UPDATED: *const c_char =
|
|
|
|
b"GstPtpStatisticsTimeUpdated\0" as *const u8 as *const c_char;
|
2017-12-16 12:33:19 +00:00
|
|
|
|
|
|
|
// Callbacks
|
2019-06-18 10:04:39 +00:00
|
|
|
pub type GstPtpStatisticsCallback =
|
|
|
|
Option<unsafe extern "C" fn(u8, *const gst::GstStructure, gpointer) -> gboolean>;
|
2017-12-16 12:33:19 +00:00
|
|
|
|
|
|
|
// Records
|
|
|
|
#[repr(C)]
|
2018-02-07 16:49:22 +00:00
|
|
|
#[derive(Copy, Clone)]
|
2017-12-16 12:33:19 +00:00
|
|
|
pub struct GstNetAddressMeta {
|
|
|
|
pub meta: gst::GstMeta,
|
|
|
|
pub addr: *mut gio::GSocketAddress,
|
|
|
|
}
|
|
|
|
|
|
|
|
impl ::std::fmt::Debug for GstNetAddressMeta {
|
|
|
|
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
|
2018-02-07 16:49:22 +00:00
|
|
|
f.debug_struct(&format!("GstNetAddressMeta @ {:?}", self as *const _))
|
2019-06-18 10:04:39 +00:00
|
|
|
.field("meta", &self.meta)
|
|
|
|
.field("addr", &self.addr)
|
|
|
|
.finish()
|
2017-12-16 12:33:19 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#[repr(C)]
|
2018-02-07 16:49:22 +00:00
|
|
|
#[derive(Copy, Clone)]
|
2017-12-16 12:33:19 +00:00
|
|
|
pub struct GstNetClientClockClass {
|
|
|
|
pub parent_class: gst::GstSystemClockClass,
|
|
|
|
pub _gst_reserved: [gpointer; 4],
|
|
|
|
}
|
|
|
|
|
|
|
|
impl ::std::fmt::Debug for GstNetClientClockClass {
|
|
|
|
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
|
2018-02-07 16:49:22 +00:00
|
|
|
f.debug_struct(&format!("GstNetClientClockClass @ {:?}", self as *const _))
|
2019-06-18 10:04:39 +00:00
|
|
|
.field("parent_class", &self.parent_class)
|
|
|
|
.finish()
|
2017-12-16 12:33:19 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#[repr(C)]
|
2019-06-18 10:02:27 +00:00
|
|
|
pub struct _GstNetClientClockPrivate(c_void);
|
2017-12-16 12:33:19 +00:00
|
|
|
|
2019-06-18 10:02:27 +00:00
|
|
|
pub type GstNetClientClockPrivate = *mut _GstNetClientClockPrivate;
|
2017-12-16 12:33:19 +00:00
|
|
|
|
|
|
|
#[repr(C)]
|
2018-02-07 16:49:22 +00:00
|
|
|
#[derive(Copy, Clone)]
|
2017-12-16 12:33:19 +00:00
|
|
|
pub struct GstNetControlMessageMeta {
|
|
|
|
pub meta: gst::GstMeta,
|
|
|
|
pub message: *mut gio::GSocketControlMessage,
|
|
|
|
}
|
|
|
|
|
|
|
|
impl ::std::fmt::Debug for GstNetControlMessageMeta {
|
|
|
|
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
|
2019-06-18 10:04:39 +00:00
|
|
|
f.debug_struct(&format!(
|
|
|
|
"GstNetControlMessageMeta @ {:?}",
|
|
|
|
self as *const _
|
|
|
|
))
|
|
|
|
.field("meta", &self.meta)
|
|
|
|
.field("message", &self.message)
|
|
|
|
.finish()
|
2017-12-16 12:33:19 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#[repr(C)]
|
2018-02-07 16:49:22 +00:00
|
|
|
#[derive(Copy, Clone)]
|
2017-12-16 12:33:19 +00:00
|
|
|
pub struct GstNetTimePacket {
|
|
|
|
pub local_time: gst::GstClockTime,
|
|
|
|
pub remote_time: gst::GstClockTime,
|
|
|
|
}
|
|
|
|
|
|
|
|
impl ::std::fmt::Debug for GstNetTimePacket {
|
|
|
|
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
|
2018-02-07 16:49:22 +00:00
|
|
|
f.debug_struct(&format!("GstNetTimePacket @ {:?}", self as *const _))
|
2019-06-18 10:04:39 +00:00
|
|
|
.field("local_time", &self.local_time)
|
|
|
|
.field("remote_time", &self.remote_time)
|
|
|
|
.finish()
|
2017-12-16 12:33:19 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#[repr(C)]
|
2018-02-07 16:49:22 +00:00
|
|
|
#[derive(Copy, Clone)]
|
2017-12-16 12:33:19 +00:00
|
|
|
pub struct GstNetTimeProviderClass {
|
|
|
|
pub parent_class: gst::GstObjectClass,
|
|
|
|
pub _gst_reserved: [gpointer; 4],
|
|
|
|
}
|
|
|
|
|
|
|
|
impl ::std::fmt::Debug for GstNetTimeProviderClass {
|
|
|
|
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
|
2018-02-07 16:49:22 +00:00
|
|
|
f.debug_struct(&format!("GstNetTimeProviderClass @ {:?}", self as *const _))
|
2019-06-18 10:04:39 +00:00
|
|
|
.field("parent_class", &self.parent_class)
|
|
|
|
.field("_gst_reserved", &self._gst_reserved)
|
|
|
|
.finish()
|
2017-12-16 12:33:19 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#[repr(C)]
|
2019-06-18 10:02:27 +00:00
|
|
|
pub struct _GstNetTimeProviderPrivate(c_void);
|
2017-12-16 12:33:19 +00:00
|
|
|
|
2019-06-18 10:02:27 +00:00
|
|
|
pub type GstNetTimeProviderPrivate = *mut _GstNetTimeProviderPrivate;
|
2017-12-16 12:33:19 +00:00
|
|
|
|
|
|
|
#[repr(C)]
|
2018-02-07 16:49:22 +00:00
|
|
|
#[derive(Copy, Clone)]
|
2017-12-16 12:33:19 +00:00
|
|
|
pub struct GstNtpClockClass {
|
|
|
|
pub parent_class: gst::GstSystemClockClass,
|
|
|
|
pub _gst_reserved: [gpointer; 4],
|
|
|
|
}
|
|
|
|
|
|
|
|
impl ::std::fmt::Debug for GstNtpClockClass {
|
|
|
|
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
|
2018-02-07 16:49:22 +00:00
|
|
|
f.debug_struct(&format!("GstNtpClockClass @ {:?}", self as *const _))
|
2019-06-18 10:04:39 +00:00
|
|
|
.field("parent_class", &self.parent_class)
|
|
|
|
.finish()
|
2017-12-16 12:33:19 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#[repr(C)]
|
2018-02-07 16:49:22 +00:00
|
|
|
#[derive(Copy, Clone)]
|
2017-12-16 12:33:19 +00:00
|
|
|
pub struct GstPtpClockClass {
|
|
|
|
pub parent_class: gst::GstSystemClockClass,
|
|
|
|
pub _gst_reserved: [gpointer; 4],
|
|
|
|
}
|
|
|
|
|
|
|
|
impl ::std::fmt::Debug for GstPtpClockClass {
|
|
|
|
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
|
2018-02-07 16:49:22 +00:00
|
|
|
f.debug_struct(&format!("GstPtpClockClass @ {:?}", self as *const _))
|
2019-06-18 10:04:39 +00:00
|
|
|
.field("parent_class", &self.parent_class)
|
|
|
|
.finish()
|
2017-12-16 12:33:19 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#[repr(C)]
|
2019-06-18 10:02:27 +00:00
|
|
|
pub struct _GstPtpClockPrivate(c_void);
|
2017-12-16 12:33:19 +00:00
|
|
|
|
2019-06-18 10:02:27 +00:00
|
|
|
pub type GstPtpClockPrivate = *mut _GstPtpClockPrivate;
|
2017-12-16 12:33:19 +00:00
|
|
|
|
|
|
|
// Classes
|
|
|
|
#[repr(C)]
|
2018-02-07 16:49:22 +00:00
|
|
|
#[derive(Copy, Clone)]
|
2017-12-16 12:33:19 +00:00
|
|
|
pub struct GstNetClientClock {
|
|
|
|
pub clock: gst::GstSystemClock,
|
|
|
|
pub priv_: *mut GstNetClientClockPrivate,
|
|
|
|
pub _gst_reserved: [gpointer; 4],
|
|
|
|
}
|
|
|
|
|
|
|
|
impl ::std::fmt::Debug for GstNetClientClock {
|
|
|
|
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
|
|
|
|
f.debug_struct(&format!("GstNetClientClock @ {:?}", self as *const _))
|
2019-06-18 10:04:39 +00:00
|
|
|
.field("clock", &self.clock)
|
|
|
|
.finish()
|
2017-12-16 12:33:19 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#[repr(C)]
|
2018-02-07 16:49:22 +00:00
|
|
|
#[derive(Copy, Clone)]
|
2017-12-16 12:33:19 +00:00
|
|
|
pub struct GstNetTimeProvider {
|
|
|
|
pub parent: gst::GstObject,
|
|
|
|
pub priv_: *mut GstNetTimeProviderPrivate,
|
|
|
|
pub _gst_reserved: [gpointer; 4],
|
|
|
|
}
|
|
|
|
|
|
|
|
impl ::std::fmt::Debug for GstNetTimeProvider {
|
|
|
|
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
|
|
|
|
f.debug_struct(&format!("GstNetTimeProvider @ {:?}", self as *const _))
|
2019-06-18 10:04:39 +00:00
|
|
|
.field("parent", &self.parent)
|
|
|
|
.finish()
|
2017-12-16 12:33:19 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#[repr(C)]
|
2018-02-07 16:49:22 +00:00
|
|
|
#[derive(Copy, Clone)]
|
2017-12-16 12:33:19 +00:00
|
|
|
pub struct GstNtpClock {
|
|
|
|
pub clock: gst::GstSystemClock,
|
|
|
|
pub priv_: *mut GstNetClientClockPrivate,
|
|
|
|
pub _gst_reserved: [gpointer; 4],
|
|
|
|
}
|
|
|
|
|
|
|
|
impl ::std::fmt::Debug for GstNtpClock {
|
|
|
|
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
|
|
|
|
f.debug_struct(&format!("GstNtpClock @ {:?}", self as *const _))
|
2019-06-18 10:04:39 +00:00
|
|
|
.field("clock", &self.clock)
|
|
|
|
.finish()
|
2017-12-16 12:33:19 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#[repr(C)]
|
2018-02-07 16:49:22 +00:00
|
|
|
#[derive(Copy, Clone)]
|
2017-12-16 12:33:19 +00:00
|
|
|
pub struct GstPtpClock {
|
|
|
|
pub clock: gst::GstSystemClock,
|
|
|
|
pub priv_: *mut GstPtpClockPrivate,
|
|
|
|
pub _gst_reserved: [gpointer; 4],
|
|
|
|
}
|
|
|
|
|
|
|
|
impl ::std::fmt::Debug for GstPtpClock {
|
|
|
|
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
|
|
|
|
f.debug_struct(&format!("GstPtpClock @ {:?}", self as *const _))
|
2019-06-18 10:04:39 +00:00
|
|
|
.field("clock", &self.clock)
|
|
|
|
.finish()
|
2017-12-16 12:33:19 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
extern "C" {
|
|
|
|
|
|
|
|
//=========================================================================
|
|
|
|
// GstNetAddressMeta
|
|
|
|
//=========================================================================
|
|
|
|
pub fn gst_net_address_meta_get_info() -> *const gst::GstMetaInfo;
|
|
|
|
|
|
|
|
//=========================================================================
|
|
|
|
// GstNetControlMessageMeta
|
|
|
|
//=========================================================================
|
|
|
|
pub fn gst_net_control_message_meta_get_info() -> *const gst::GstMetaInfo;
|
|
|
|
|
|
|
|
//=========================================================================
|
|
|
|
// GstNetTimePacket
|
|
|
|
//=========================================================================
|
|
|
|
pub fn gst_net_time_packet_get_type() -> GType;
|
2018-10-30 19:15:27 +00:00
|
|
|
pub fn gst_net_time_packet_new(buffer: *const u8) -> *mut GstNetTimePacket;
|
2017-12-16 12:33:19 +00:00
|
|
|
pub fn gst_net_time_packet_copy(packet: *const GstNetTimePacket) -> *mut GstNetTimePacket;
|
|
|
|
pub fn gst_net_time_packet_free(packet: *mut GstNetTimePacket);
|
2019-06-18 10:04:39 +00:00
|
|
|
pub fn gst_net_time_packet_send(
|
|
|
|
packet: *const GstNetTimePacket,
|
|
|
|
socket: *mut gio::GSocket,
|
|
|
|
dest_address: *mut gio::GSocketAddress,
|
|
|
|
error: *mut *mut glib::GError,
|
|
|
|
) -> gboolean;
|
2017-12-16 12:33:19 +00:00
|
|
|
pub fn gst_net_time_packet_serialize(packet: *const GstNetTimePacket) -> *mut u8;
|
2019-06-18 10:04:39 +00:00
|
|
|
pub fn gst_net_time_packet_receive(
|
|
|
|
socket: *mut gio::GSocket,
|
|
|
|
src_address: *mut *mut gio::GSocketAddress,
|
|
|
|
error: *mut *mut glib::GError,
|
|
|
|
) -> *mut GstNetTimePacket;
|
2017-12-16 12:33:19 +00:00
|
|
|
|
|
|
|
//=========================================================================
|
|
|
|
// GstNetClientClock
|
|
|
|
//=========================================================================
|
|
|
|
pub fn gst_net_client_clock_get_type() -> GType;
|
2019-06-18 10:04:39 +00:00
|
|
|
pub fn gst_net_client_clock_new(
|
|
|
|
name: *const c_char,
|
|
|
|
remote_address: *const c_char,
|
|
|
|
remote_port: c_int,
|
|
|
|
base_time: gst::GstClockTime,
|
|
|
|
) -> *mut gst::GstClock;
|
2017-12-16 12:33:19 +00:00
|
|
|
|
|
|
|
//=========================================================================
|
|
|
|
// GstNetTimeProvider
|
|
|
|
//=========================================================================
|
|
|
|
pub fn gst_net_time_provider_get_type() -> GType;
|
2019-06-18 10:04:39 +00:00
|
|
|
pub fn gst_net_time_provider_new(
|
|
|
|
clock: *mut gst::GstClock,
|
|
|
|
address: *const c_char,
|
|
|
|
port: c_int,
|
|
|
|
) -> *mut GstNetTimeProvider;
|
2017-12-16 12:33:19 +00:00
|
|
|
|
|
|
|
//=========================================================================
|
|
|
|
// GstNtpClock
|
|
|
|
//=========================================================================
|
|
|
|
pub fn gst_ntp_clock_get_type() -> GType;
|
|
|
|
#[cfg(any(feature = "v1_6", feature = "dox"))]
|
2019-06-18 10:04:39 +00:00
|
|
|
pub fn gst_ntp_clock_new(
|
|
|
|
name: *const c_char,
|
|
|
|
remote_address: *const c_char,
|
|
|
|
remote_port: c_int,
|
|
|
|
base_time: gst::GstClockTime,
|
|
|
|
) -> *mut gst::GstClock;
|
2017-12-16 12:33:19 +00:00
|
|
|
|
|
|
|
//=========================================================================
|
|
|
|
// GstPtpClock
|
|
|
|
//=========================================================================
|
|
|
|
pub fn gst_ptp_clock_get_type() -> GType;
|
|
|
|
#[cfg(any(feature = "v1_6", feature = "dox"))]
|
|
|
|
pub fn gst_ptp_clock_new(name: *const c_char, domain: c_uint) -> *mut gst::GstClock;
|
|
|
|
|
|
|
|
//=========================================================================
|
|
|
|
// Other functions
|
|
|
|
//=========================================================================
|
2019-06-18 10:04:39 +00:00
|
|
|
pub fn gst_buffer_add_net_address_meta(
|
|
|
|
buffer: *mut gst::GstBuffer,
|
|
|
|
addr: *mut gio::GSocketAddress,
|
|
|
|
) -> *mut GstNetAddressMeta;
|
|
|
|
pub fn gst_buffer_add_net_control_message_meta(
|
|
|
|
buffer: *mut gst::GstBuffer,
|
|
|
|
message: *mut gio::GSocketControlMessage,
|
|
|
|
) -> *mut GstNetControlMessageMeta;
|
2017-12-16 12:33:19 +00:00
|
|
|
pub fn gst_buffer_get_net_address_meta(buffer: *mut gst::GstBuffer) -> *mut GstNetAddressMeta;
|
|
|
|
pub fn gst_net_address_meta_api_get_type() -> GType;
|
|
|
|
pub fn gst_net_control_message_meta_api_get_type() -> GType;
|
|
|
|
#[cfg(any(feature = "v1_6", feature = "dox"))]
|
|
|
|
pub fn gst_ptp_deinit();
|
|
|
|
#[cfg(any(feature = "v1_6", feature = "dox"))]
|
|
|
|
pub fn gst_ptp_init(clock_id: u64, interfaces: *mut *mut c_char) -> gboolean;
|
|
|
|
#[cfg(any(feature = "v1_6", feature = "dox"))]
|
|
|
|
pub fn gst_ptp_is_initialized() -> gboolean;
|
|
|
|
#[cfg(any(feature = "v1_6", feature = "dox"))]
|
|
|
|
pub fn gst_ptp_is_supported() -> gboolean;
|
|
|
|
#[cfg(any(feature = "v1_6", feature = "dox"))]
|
2019-06-18 10:04:39 +00:00
|
|
|
pub fn gst_ptp_statistics_callback_add(
|
|
|
|
callback: GstPtpStatisticsCallback,
|
|
|
|
user_data: gpointer,
|
|
|
|
destroy_data: glib::GDestroyNotify,
|
|
|
|
) -> c_ulong;
|
2017-12-16 12:33:19 +00:00
|
|
|
#[cfg(any(feature = "v1_6", feature = "dox"))]
|
|
|
|
pub fn gst_ptp_statistics_callback_remove(id: c_ulong);
|
|
|
|
|
|
|
|
}
|