mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-11-29 23:11:01 +00:00
Remove unused FFI code
This commit is contained in:
parent
861d216eed
commit
71d8f7108c
1 changed files with 0 additions and 107 deletions
107
src/ndisys.rs
107
src/ndisys.rs
|
@ -1,7 +1,5 @@
|
|||
#![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)]
|
||||
|
||||
use std::ptr;
|
||||
|
||||
#[cfg_attr(all(target_arch = "x86_64", target_os = "windows"), link(name = "Processing.NDI.Lib.x64"))]
|
||||
#[cfg_attr(all(target_arch = "x86", target_os = "windows"), link(name = "Processing.NDI.Lib.x86"))]
|
||||
#[cfg_attr(not(any(target_os = "windows", target_os = "macos")), link(name = "ndi"))]
|
||||
|
@ -63,16 +61,6 @@ pub struct NDIlib_find_create_t {
|
|||
pub p_extra_ips: *const ::std::os::raw::c_char,
|
||||
}
|
||||
|
||||
impl Default for NDIlib_find_create_t {
|
||||
fn default() -> Self {
|
||||
NDIlib_find_create_t {
|
||||
show_local_sources: true,
|
||||
p_groups: ptr::null(),
|
||||
p_extra_ips: ptr::null(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[repr(C)]
|
||||
#[derive(Debug, Copy, Clone)]
|
||||
pub struct NDIlib_source_t {
|
||||
|
@ -80,15 +68,6 @@ pub struct NDIlib_source_t {
|
|||
pub p_ip_address: *const ::std::os::raw::c_char,
|
||||
}
|
||||
|
||||
impl Default for NDIlib_source_t {
|
||||
fn default() -> Self {
|
||||
NDIlib_source_t {
|
||||
p_ndi_name: ptr::null(),
|
||||
p_ip_address: ptr::null(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[repr(i32)]
|
||||
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
|
||||
pub enum NDIlib_frame_type_e {
|
||||
|
@ -153,28 +132,8 @@ pub struct NDIlib_recv_create_v3_t {
|
|||
pub p_ndi_name: *const ::std::os::raw::c_char,
|
||||
}
|
||||
|
||||
impl Default for NDIlib_recv_create_v3_t {
|
||||
fn default() -> Self {
|
||||
NDIlib_recv_create_v3_t {
|
||||
source_to_connect_to: Default::default(),
|
||||
allow_video_fields: true,
|
||||
bandwidth: NDIlib_recv_bandwidth_e::NDIlib_recv_bandwidth_highest,
|
||||
color_format: NDIlib_recv_color_format_e::NDIlib_recv_color_format_UYVY_BGRA,
|
||||
p_ndi_name: ptr::null(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub type NDIlib_recv_instance_t = *mut ::std::os::raw::c_void;
|
||||
|
||||
//Rust wrapper around *mut ::std::os::raw::c_void
|
||||
pub struct NdiInstance {
|
||||
pub recv: NDIlib_recv_instance_t,
|
||||
// pub audio: bool,
|
||||
}
|
||||
|
||||
unsafe impl ::std::marker::Send for NdiInstance {}
|
||||
|
||||
#[repr(C)]
|
||||
#[derive(Debug, Copy, Clone)]
|
||||
pub struct NDIlib_tally_t {
|
||||
|
@ -182,15 +141,6 @@ pub struct NDIlib_tally_t {
|
|||
pub on_preview: bool,
|
||||
}
|
||||
|
||||
impl Default for NDIlib_tally_t {
|
||||
fn default() -> Self {
|
||||
NDIlib_tally_t {
|
||||
on_program: false,
|
||||
on_preview: false,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[repr(C)]
|
||||
#[derive(Debug, Copy, Clone)]
|
||||
pub struct NDIlib_metadata_frame_t {
|
||||
|
@ -199,16 +149,6 @@ pub struct NDIlib_metadata_frame_t {
|
|||
pub p_data: *const ::std::os::raw::c_char,
|
||||
}
|
||||
|
||||
impl Default for NDIlib_metadata_frame_t {
|
||||
fn default() -> Self {
|
||||
NDIlib_metadata_frame_t {
|
||||
length: 0,
|
||||
timecode: 0, //NDIlib_send_timecode_synthesize,
|
||||
p_data: ptr::null(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[repr(C)]
|
||||
#[derive(Debug, Copy, Clone)]
|
||||
pub struct NDIlib_video_frame_v2_t {
|
||||
|
@ -226,25 +166,6 @@ pub struct NDIlib_video_frame_v2_t {
|
|||
pub timestamp: i64,
|
||||
}
|
||||
|
||||
impl Default for NDIlib_video_frame_v2_t {
|
||||
fn default() -> Self {
|
||||
NDIlib_video_frame_v2_t {
|
||||
xres: 0,
|
||||
yres: 0,
|
||||
FourCC: NDIlib_FourCC_type_e::NDIlib_FourCC_type_UYVY,
|
||||
frame_rate_N: 30000,
|
||||
frame_rate_D: 1001,
|
||||
picture_aspect_ratio: 0.0,
|
||||
frame_format_type: NDIlib_frame_format_type_e::NDIlib_frame_format_type_progressive,
|
||||
timecode: NDIlib_send_timecode_synthesize,
|
||||
p_data: ptr::null(),
|
||||
line_stride_in_bytes: 0,
|
||||
p_metadata: ptr::null(),
|
||||
timestamp: NDIlib_send_timecode_empty,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[repr(C)]
|
||||
#[derive(Debug, Copy, Clone)]
|
||||
pub struct NDIlib_audio_frame_v2_t {
|
||||
|
@ -258,21 +179,6 @@ pub struct NDIlib_audio_frame_v2_t {
|
|||
pub timestamp: i64,
|
||||
}
|
||||
|
||||
impl Default for NDIlib_audio_frame_v2_t {
|
||||
fn default() -> Self {
|
||||
NDIlib_audio_frame_v2_t {
|
||||
sample_rate: 48000,
|
||||
no_channels: 2,
|
||||
no_samples: 0,
|
||||
timecode: NDIlib_send_timecode_synthesize,
|
||||
p_data: ptr::null(),
|
||||
channel_stride_in_bytes: 0,
|
||||
p_metadata: ptr::null(),
|
||||
timestamp: NDIlib_send_timecode_empty,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extern "C" {
|
||||
pub fn NDIlib_util_audio_to_interleaved_16s_v2(
|
||||
p_src: *const NDIlib_audio_frame_v2_t,
|
||||
|
@ -295,16 +201,3 @@ pub struct NDIlib_audio_frame_interleaved_16s_t {
|
|||
pub reference_level: ::std::os::raw::c_int,
|
||||
pub p_data: *mut ::std::os::raw::c_short,
|
||||
}
|
||||
|
||||
impl Default for NDIlib_audio_frame_interleaved_16s_t {
|
||||
fn default() -> Self {
|
||||
NDIlib_audio_frame_interleaved_16s_t {
|
||||
sample_rate: 48000,
|
||||
no_channels: 2,
|
||||
no_samples: 0,
|
||||
timecode: NDIlib_send_timecode_synthesize,
|
||||
reference_level: 0,
|
||||
p_data: ptr::null_mut(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue