gstreamer_pbutils/auto/encoding_video_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::translate::*;
8
9glib::wrapper! {
10 /// Variant of [`EncodingProfile`][crate::EncodingProfile] for video streams, allows specifying the `pass`.
11 ///
12 /// # Implements
13 ///
14 /// [`EncodingProfileExt`][trait@crate::prelude::EncodingProfileExt], [`trait@glib::ObjectExt`]
15 #[doc(alias = "GstEncodingVideoProfile")]
16 pub struct EncodingVideoProfile(Object<ffi::GstEncodingVideoProfile, ffi::GstEncodingVideoProfileClass>) @extends EncodingProfile;
17
18 match fn {
19 type_ => || ffi::gst_encoding_video_profile_get_type(),
20 }
21}
22
23impl EncodingVideoProfile {
24 /// Get the pass number if this is part of a multi-pass profile.
25 ///
26 /// # Returns
27 ///
28 /// The pass number. Starts at 1 for multi-pass. 0 if this is
29 /// not a multi-pass profile
30 #[doc(alias = "gst_encoding_video_profile_get_pass")]
31 #[doc(alias = "get_pass")]
32 pub fn pass(&self) -> u32 {
33 unsafe { ffi::gst_encoding_video_profile_get_pass(self.to_glib_none().0) }
34 }
35
36 /// > *NOTE*: Fixed framerate won't be enforced when `encodebin:avoid-reencoding`
37 /// > is set.
38 ///
39 /// # Returns
40 ///
41 /// Whether non-constant video framerate is allowed for encoding.
42 #[doc(alias = "gst_encoding_video_profile_get_variableframerate")]
43 #[doc(alias = "get_variableframerate")]
44 pub fn is_variableframerate(&self) -> bool {
45 unsafe {
46 from_glib(ffi::gst_encoding_video_profile_get_variableframerate(
47 self.to_glib_none().0,
48 ))
49 }
50 }
51}
52
53unsafe impl Send for EncodingVideoProfile {}
54unsafe impl Sync for EncodingVideoProfile {}