2018-05-13 18:31:10 +00:00
|
|
|
// This file was generated by gir (https://github.com/gtk-rs/gir)
|
|
|
|
// from gir-files (https://github.com/gtk-rs/gir-files)
|
2018-03-18 17:42:45 +00:00
|
|
|
// DO NOT EDIT
|
|
|
|
|
|
|
|
use DiscovererInfo;
|
|
|
|
use ffi;
|
2018-12-09 16:06:12 +00:00
|
|
|
use glib::GString;
|
2018-03-18 17:42:45 +00:00
|
|
|
use glib::object::IsA;
|
|
|
|
use glib::translate::*;
|
|
|
|
use gst;
|
|
|
|
|
|
|
|
glib_wrapper! {
|
2019-01-16 11:32:39 +00:00
|
|
|
pub struct EncodingProfile(Object<ffi::GstEncodingProfile, ffi::GstEncodingProfileClass, EncodingProfileClass>);
|
2018-03-18 17:42:45 +00:00
|
|
|
|
|
|
|
match fn {
|
|
|
|
get_type => || ffi::gst_encoding_profile_get_type(),
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
impl EncodingProfile {
|
|
|
|
pub fn find<'a, 'b, P: Into<Option<&'a str>>, Q: Into<Option<&'b str>>>(targetname: &str, profilename: P, category: Q) -> Option<EncodingProfile> {
|
|
|
|
assert_initialized_main_thread!();
|
|
|
|
let profilename = profilename.into();
|
|
|
|
let category = category.into();
|
|
|
|
unsafe {
|
2019-01-16 11:32:39 +00:00
|
|
|
from_glib_full(ffi::gst_encoding_profile_find(targetname.to_glib_none().0, profilename.to_glib_none().0, category.to_glib_none().0))
|
2018-03-18 17:42:45 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-01-21 20:00:48 +00:00
|
|
|
pub fn from_discoverer(info: &DiscovererInfo) -> Option<EncodingProfile> {
|
2018-03-18 17:42:45 +00:00
|
|
|
skip_assert_initialized!();
|
|
|
|
unsafe {
|
2019-01-21 20:00:48 +00:00
|
|
|
from_glib_full(ffi::gst_encoding_profile_from_discoverer(info.to_glib_none().0))
|
2018-03-18 17:42:45 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
unsafe impl Send for EncodingProfile {}
|
|
|
|
unsafe impl Sync for EncodingProfile {}
|
|
|
|
|
2019-01-16 11:32:39 +00:00
|
|
|
pub const NONE_ENCODING_PROFILE: Option<&EncodingProfile> = None;
|
|
|
|
|
2018-12-08 09:05:20 +00:00
|
|
|
pub trait EncodingProfileExt: 'static {
|
2018-03-18 17:42:45 +00:00
|
|
|
fn copy(&self) -> EncodingProfile;
|
|
|
|
|
|
|
|
fn get_allow_dynamic_output(&self) -> bool;
|
|
|
|
|
2018-12-09 16:06:12 +00:00
|
|
|
fn get_description(&self) -> Option<GString>;
|
2018-03-18 17:42:45 +00:00
|
|
|
|
2018-12-09 16:06:12 +00:00
|
|
|
fn get_file_extension(&self) -> Option<GString>;
|
2018-03-18 17:42:45 +00:00
|
|
|
|
|
|
|
fn get_format(&self) -> gst::Caps;
|
|
|
|
|
|
|
|
fn get_input_caps(&self) -> gst::Caps;
|
|
|
|
|
2018-12-09 16:06:12 +00:00
|
|
|
fn get_name(&self) -> Option<GString>;
|
2018-03-18 17:42:45 +00:00
|
|
|
|
|
|
|
fn get_presence(&self) -> u32;
|
|
|
|
|
2018-12-09 16:06:12 +00:00
|
|
|
fn get_preset(&self) -> Option<GString>;
|
2018-03-18 17:42:45 +00:00
|
|
|
|
2018-12-09 16:06:12 +00:00
|
|
|
fn get_preset_name(&self) -> Option<GString>;
|
2018-03-18 17:42:45 +00:00
|
|
|
|
|
|
|
fn get_restriction(&self) -> Option<gst::Caps>;
|
|
|
|
|
2018-12-09 16:06:12 +00:00
|
|
|
fn get_type_nick(&self) -> Option<GString>;
|
2018-03-18 17:42:45 +00:00
|
|
|
|
|
|
|
fn is_enabled(&self) -> bool;
|
|
|
|
|
2018-10-08 04:44:17 +00:00
|
|
|
fn is_equal<P: IsA<EncodingProfile>>(&self, b: &P) -> bool;
|
2018-03-18 17:42:45 +00:00
|
|
|
}
|
|
|
|
|
2018-10-08 04:44:17 +00:00
|
|
|
impl<O: IsA<EncodingProfile>> EncodingProfileExt for O {
|
2018-03-18 17:42:45 +00:00
|
|
|
fn copy(&self) -> EncodingProfile {
|
|
|
|
unsafe {
|
2019-01-16 11:32:39 +00:00
|
|
|
from_glib_full(ffi::gst_encoding_profile_copy(self.as_ref().to_glib_none().0))
|
2018-03-18 17:42:45 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn get_allow_dynamic_output(&self) -> bool {
|
|
|
|
unsafe {
|
2019-01-16 11:32:39 +00:00
|
|
|
from_glib(ffi::gst_encoding_profile_get_allow_dynamic_output(self.as_ref().to_glib_none().0))
|
2018-03-18 17:42:45 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-12-09 16:06:12 +00:00
|
|
|
fn get_description(&self) -> Option<GString> {
|
2018-03-18 17:42:45 +00:00
|
|
|
unsafe {
|
2019-01-16 11:32:39 +00:00
|
|
|
from_glib_none(ffi::gst_encoding_profile_get_description(self.as_ref().to_glib_none().0))
|
2018-03-18 17:42:45 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-12-09 16:06:12 +00:00
|
|
|
fn get_file_extension(&self) -> Option<GString> {
|
2018-03-18 17:42:45 +00:00
|
|
|
unsafe {
|
2019-01-16 11:32:39 +00:00
|
|
|
from_glib_none(ffi::gst_encoding_profile_get_file_extension(self.as_ref().to_glib_none().0))
|
2018-03-18 17:42:45 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn get_format(&self) -> gst::Caps {
|
|
|
|
unsafe {
|
2019-01-16 11:32:39 +00:00
|
|
|
from_glib_full(ffi::gst_encoding_profile_get_format(self.as_ref().to_glib_none().0))
|
2018-03-18 17:42:45 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn get_input_caps(&self) -> gst::Caps {
|
|
|
|
unsafe {
|
2019-01-16 11:32:39 +00:00
|
|
|
from_glib_full(ffi::gst_encoding_profile_get_input_caps(self.as_ref().to_glib_none().0))
|
2018-03-18 17:42:45 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-12-09 16:06:12 +00:00
|
|
|
fn get_name(&self) -> Option<GString> {
|
2018-03-18 17:42:45 +00:00
|
|
|
unsafe {
|
2019-01-16 11:32:39 +00:00
|
|
|
from_glib_none(ffi::gst_encoding_profile_get_name(self.as_ref().to_glib_none().0))
|
2018-03-18 17:42:45 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn get_presence(&self) -> u32 {
|
|
|
|
unsafe {
|
2019-01-16 11:32:39 +00:00
|
|
|
ffi::gst_encoding_profile_get_presence(self.as_ref().to_glib_none().0)
|
2018-03-18 17:42:45 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-12-09 16:06:12 +00:00
|
|
|
fn get_preset(&self) -> Option<GString> {
|
2018-03-18 17:42:45 +00:00
|
|
|
unsafe {
|
2019-01-16 11:32:39 +00:00
|
|
|
from_glib_none(ffi::gst_encoding_profile_get_preset(self.as_ref().to_glib_none().0))
|
2018-03-18 17:42:45 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-12-09 16:06:12 +00:00
|
|
|
fn get_preset_name(&self) -> Option<GString> {
|
2018-03-18 17:42:45 +00:00
|
|
|
unsafe {
|
2019-01-16 11:32:39 +00:00
|
|
|
from_glib_none(ffi::gst_encoding_profile_get_preset_name(self.as_ref().to_glib_none().0))
|
2018-03-18 17:42:45 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn get_restriction(&self) -> Option<gst::Caps> {
|
|
|
|
unsafe {
|
2019-01-16 11:32:39 +00:00
|
|
|
from_glib_full(ffi::gst_encoding_profile_get_restriction(self.as_ref().to_glib_none().0))
|
2018-03-18 17:42:45 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-12-09 16:06:12 +00:00
|
|
|
fn get_type_nick(&self) -> Option<GString> {
|
2018-03-18 17:42:45 +00:00
|
|
|
unsafe {
|
2019-01-16 11:32:39 +00:00
|
|
|
from_glib_none(ffi::gst_encoding_profile_get_type_nick(self.as_ref().to_glib_none().0))
|
2018-03-18 17:42:45 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn is_enabled(&self) -> bool {
|
|
|
|
unsafe {
|
2019-01-16 11:32:39 +00:00
|
|
|
from_glib(ffi::gst_encoding_profile_is_enabled(self.as_ref().to_glib_none().0))
|
2018-03-18 17:42:45 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-10-08 04:44:17 +00:00
|
|
|
fn is_equal<P: IsA<EncodingProfile>>(&self, b: &P) -> bool {
|
2018-03-18 17:42:45 +00:00
|
|
|
unsafe {
|
2019-01-16 11:32:39 +00:00
|
|
|
from_glib(ffi::gst_encoding_profile_is_equal(self.as_ref().to_glib_none().0, b.as_ref().to_glib_none().0))
|
2018-03-18 17:42:45 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|