gstreamer-rs/gstreamer-pbutils/src/auto/encoding_container_profile.rs

40 lines
1.3 KiB
Rust
Raw Normal View History

// This file was generated by gir (https://github.com/gtk-rs/gir)
// from gir-files (https://github.com/gtk-rs/gir-files)
// DO NOT EDIT
2020-11-22 10:08:08 +00:00
use crate::EncodingProfile;
use glib::object::IsA;
use glib::translate::*;
2020-11-22 10:08:08 +00:00
glib::glib_wrapper! {
pub struct EncodingContainerProfile(Object<ffi::GstEncodingContainerProfile, ffi::GstEncodingContainerProfileClass>) @extends EncodingProfile;
match fn {
2020-11-22 10:08:08 +00:00
get_type => || ffi::gst_encoding_container_profile_get_type(),
}
}
2019-06-18 10:10:46 +00:00
impl EncodingContainerProfile {
2020-12-08 13:00:17 +00:00
#[doc(alias = "gst_encoding_container_profile_contains_profile")]
2019-06-18 10:10:46 +00:00
pub fn contains_profile<P: IsA<EncodingProfile>>(&self, profile: &P) -> bool {
unsafe {
2020-11-22 10:08:08 +00:00
from_glib(ffi::gst_encoding_container_profile_contains_profile(
self.to_glib_none().0,
profile.as_ref().to_glib_none().0,
))
}
}
2020-12-08 13:00:17 +00:00
#[doc(alias = "gst_encoding_container_profile_get_profiles")]
2019-06-18 10:10:46 +00:00
pub fn get_profiles(&self) -> Vec<EncodingProfile> {
unsafe {
2020-11-22 10:08:08 +00:00
FromGlibPtrContainer::from_glib_none(ffi::gst_encoding_container_profile_get_profiles(
self.to_glib_none().0,
))
}
}
}
2019-06-18 10:10:46 +00:00
unsafe impl Send for EncodingContainerProfile {}
unsafe impl Sync for EncodingContainerProfile {}