mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-12-02 00:11:01 +00:00
Convert NDIlib_recv_color_format_e to a type alias with constants
There are also other values available.
This commit is contained in:
parent
c8f12b8c3b
commit
7483a66b66
3 changed files with 9 additions and 12 deletions
|
@ -263,7 +263,7 @@ impl RecvInstance {
|
|||
url_address,
|
||||
allow_video_fields: true,
|
||||
bandwidth: NDIlib_recv_bandwidth_highest,
|
||||
color_format: NDIlib_recv_color_format_e::NDIlib_recv_color_format_UYVY_BGRA,
|
||||
color_format: NDIlib_recv_color_format_UYVY_BGRA,
|
||||
ndi_recv_name,
|
||||
}
|
||||
}
|
||||
|
|
|
@ -111,16 +111,13 @@ pub const NDIlib_recv_bandwidth_audio_only: NDIlib_recv_bandwidth_e = 10;
|
|||
pub const NDIlib_recv_bandwidth_lowest: NDIlib_recv_bandwidth_e = 0;
|
||||
pub const NDIlib_recv_bandwidth_highest: NDIlib_recv_bandwidth_e = 100;
|
||||
|
||||
#[repr(u32)]
|
||||
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
|
||||
pub enum NDIlib_recv_color_format_e {
|
||||
NDIlib_recv_color_format_BGRX_BGRA = 0,
|
||||
NDIlib_recv_color_format_UYVY_BGRA = 1,
|
||||
NDIlib_recv_color_format_RGBX_RGBA = 2,
|
||||
NDIlib_recv_color_format_UYVY_RGBA = 3,
|
||||
NDIlib_recv_color_format_fastest = 100,
|
||||
NDIlib_recv_color_format_best = 101,
|
||||
}
|
||||
pub type NDIlib_recv_color_format_e = u32;
|
||||
pub const NDIlib_recv_color_format_BGRX_BGRA: NDIlib_recv_color_format_e = 0;
|
||||
pub const NDIlib_recv_color_format_UYVY_BGRA: NDIlib_recv_color_format_e = 1;
|
||||
pub const NDIlib_recv_color_format_RGBX_RGBA: NDIlib_recv_color_format_e = 2;
|
||||
pub const NDIlib_recv_color_format_UYVY_RGBA: NDIlib_recv_color_format_e = 3;
|
||||
pub const NDIlib_recv_color_format_fastest: NDIlib_recv_color_format_e = 100;
|
||||
pub const NDIlib_recv_color_format_best: NDIlib_recv_color_format_e = 101;
|
||||
|
||||
const fn make_fourcc(fourcc: &[u8; 4]) -> u32 {
|
||||
((fourcc[0] as u32) << 0)
|
||||
|
|
|
@ -465,7 +465,7 @@ impl Receiver {
|
|||
// broken with interlaced content currently
|
||||
let recv = RecvInstance::builder(ndi_name, url_address, receiver_ndi_name)
|
||||
.bandwidth(bandwidth)
|
||||
.color_format(NDIlib_recv_color_format_e::NDIlib_recv_color_format_UYVY_BGRA)
|
||||
.color_format(NDIlib_recv_color_format_UYVY_BGRA)
|
||||
.allow_video_fields(true)
|
||||
.build();
|
||||
let recv = match recv {
|
||||
|
|
Loading…
Reference in a new issue