gstreamer-rs/gstreamer-pbutils/src/auto/encoding_audio_profile.rs
2018-10-08 09:06:46 +03:00

37 lines
1.2 KiB
Rust

// This file was generated by gir (https://github.com/gtk-rs/gir @ fe7a6ff+)
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
// DO NOT EDIT
use EncodingProfile;
use ffi;
use glib::translate::*;
use glib_ffi;
use gobject_ffi;
use gst;
use std::mem;
use std::ptr;
glib_wrapper! {
pub struct EncodingAudioProfile(Object<ffi::GstEncodingAudioProfile, ffi::GstEncodingAudioProfileClass>): EncodingProfile;
match fn {
get_type => || ffi::gst_encoding_audio_profile_get_type(),
}
}
impl EncodingAudioProfile {
pub fn new<'a, 'b, P: Into<Option<&'a str>>, Q: Into<Option<&'b gst::Caps>>>(format: &gst::Caps, preset: P, restriction: Q, presence: u32) -> EncodingAudioProfile {
assert_initialized_main_thread!();
let preset = preset.into();
let preset = preset.to_glib_none();
let restriction = restriction.into();
let restriction = restriction.to_glib_none();
unsafe {
from_glib_full(ffi::gst_encoding_audio_profile_new(format.to_glib_none().0, preset.0, restriction.0, presence))
}
}
}
unsafe impl Send for EncodingAudioProfile {}
unsafe impl Sync for EncodingAudioProfile {}