gstreamer_pbutils/auto/encoding_container_profile.rs
1// This file was generated by gir (https://github.com/gtk-rs/gir)
2// from gir-files (https://github.com/gtk-rs/gir-files)
3// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git)
4// DO NOT EDIT
5
6use crate::{ffi, EncodingProfile};
7use glib::{prelude::*, translate::*};
8
9glib::wrapper! {
10 /// Encoding profiles for containers. Keeps track of a list of [`EncodingProfile`][crate::EncodingProfile]
11 ///
12 /// # Implements
13 ///
14 /// [`EncodingProfileExt`][trait@crate::prelude::EncodingProfileExt], [`trait@glib::ObjectExt`]
15 #[doc(alias = "GstEncodingContainerProfile")]
16 pub struct EncodingContainerProfile(Object<ffi::GstEncodingContainerProfile, ffi::GstEncodingContainerProfileClass>) @extends EncodingProfile;
17
18 match fn {
19 type_ => || ffi::gst_encoding_container_profile_get_type(),
20 }
21}
22
23impl EncodingContainerProfile {
24 /// Checks if `self` contains a [`EncodingProfile`][crate::EncodingProfile] identical to
25 /// `profile`.
26 /// ## `profile`
27 /// a [`EncodingProfile`][crate::EncodingProfile]
28 ///
29 /// # Returns
30 ///
31 /// [`true`] if `self` contains a [`EncodingProfile`][crate::EncodingProfile] identical
32 /// to `profile`, else [`false`].
33 #[doc(alias = "gst_encoding_container_profile_contains_profile")]
34 pub fn contains_profile(&self, profile: &impl IsA<EncodingProfile>) -> bool {
35 unsafe {
36 from_glib(ffi::gst_encoding_container_profile_contains_profile(
37 self.to_glib_none().0,
38 profile.as_ref().to_glib_none().0,
39 ))
40 }
41 }
42
43 ///
44 /// # Returns
45 ///
46 ///
47 /// the list of contained [`EncodingProfile`][crate::EncodingProfile].
48 #[doc(alias = "gst_encoding_container_profile_get_profiles")]
49 #[doc(alias = "get_profiles")]
50 pub fn profiles(&self) -> Vec<EncodingProfile> {
51 unsafe {
52 FromGlibPtrContainer::from_glib_none(ffi::gst_encoding_container_profile_get_profiles(
53 self.to_glib_none().0,
54 ))
55 }
56 }
57}
58
59unsafe impl Send for EncodingContainerProfile {}
60unsafe impl Sync for EncodingContainerProfile {}