mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-11-22 01:21:05 +00:00
audio,video: Delete manual implementations for now-autogenerated enum funcs
This commit is contained in:
parent
15d8774e6b
commit
c215acb7f9
2 changed files with 0 additions and 96 deletions
|
@ -289,12 +289,6 @@ impl ToGlib for VideoEndianness {
|
|||
}
|
||||
|
||||
impl crate::VideoFormat {
|
||||
pub fn from_fourcc(fourcc: u32) -> crate::VideoFormat {
|
||||
assert_initialized_main_thread!();
|
||||
|
||||
unsafe { from_glib(ffi::gst_video_format_from_fourcc(fourcc)) }
|
||||
}
|
||||
|
||||
pub fn from_masks(
|
||||
depth: u32,
|
||||
bpp: u32,
|
||||
|
|
|
@ -203,96 +203,6 @@ impl fmt::Display for crate::VideoChromaSite {
|
|||
}
|
||||
}
|
||||
|
||||
impl crate::VideoTransferFunction {
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
|
||||
pub fn from_iso(iso: u32) -> Result<crate::VideoTransferFunction, glib::BoolError> {
|
||||
assert_initialized_main_thread!();
|
||||
|
||||
unsafe {
|
||||
let value = from_glib(ffi::gst_video_transfer_function_from_iso(iso));
|
||||
match value {
|
||||
crate::VideoTransferFunction::__Unknown(_) => {
|
||||
Err(glib::glib_bool_error!("Invalid ISO value"))
|
||||
}
|
||||
_ => Ok(value),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
|
||||
pub fn to_iso(&self) -> u32 {
|
||||
unsafe { ffi::gst_video_transfer_function_to_iso(self.to_glib()) }
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
|
||||
pub fn is_equivalent(
|
||||
&self,
|
||||
from_bpp: u32,
|
||||
to_func: crate::VideoTransferFunction,
|
||||
to_bpp: u32,
|
||||
) -> bool {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_video_transfer_function_is_equivalent(
|
||||
self.to_glib(),
|
||||
from_bpp,
|
||||
to_func.to_glib(),
|
||||
to_bpp,
|
||||
))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl crate::VideoColorMatrix {
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
|
||||
pub fn from_iso(iso: u32) -> Result<crate::VideoColorMatrix, glib::BoolError> {
|
||||
assert_initialized_main_thread!();
|
||||
|
||||
unsafe {
|
||||
let value = from_glib(ffi::gst_video_color_matrix_from_iso(iso));
|
||||
match value {
|
||||
crate::VideoColorMatrix::__Unknown(_) => {
|
||||
Err(glib::glib_bool_error!("Invalid ISO value"))
|
||||
}
|
||||
_ => Ok(value),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
|
||||
pub fn to_iso(&self) -> u32 {
|
||||
unsafe { ffi::gst_video_color_matrix_to_iso(self.to_glib()) }
|
||||
}
|
||||
}
|
||||
|
||||
impl crate::VideoColorPrimaries {
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
|
||||
pub fn from_iso(iso: u32) -> Result<crate::VideoColorPrimaries, glib::BoolError> {
|
||||
assert_initialized_main_thread!();
|
||||
|
||||
unsafe {
|
||||
let value = from_glib(ffi::gst_video_color_primaries_from_iso(iso));
|
||||
match value {
|
||||
crate::VideoColorPrimaries::__Unknown(_) => {
|
||||
Err(glib::glib_bool_error!("Invalid ISO value"))
|
||||
}
|
||||
_ => Ok(value),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
|
||||
pub fn to_iso(&self) -> u32 {
|
||||
unsafe { ffi::gst_video_color_primaries_to_iso(self.to_glib()) }
|
||||
}
|
||||
}
|
||||
|
||||
impl From<crate::VideoMultiviewFramePacking> for crate::VideoMultiviewMode {
|
||||
fn from(v: crate::VideoMultiviewFramePacking) -> Self {
|
||||
skip_assert_initialized!();
|
||||
|
|
Loading…
Reference in a new issue