mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-11-25 11:01:10 +00:00
pbutils/encoding_profile: Fix up initialization assertion macros
This commit is contained in:
parent
18c7c6a3a6
commit
502a0080f0
1 changed files with 10 additions and 3 deletions
|
@ -172,7 +172,7 @@ impl EncodingAudioProfile {
|
||||||
restriction: Option<&gst::Caps>,
|
restriction: Option<&gst::Caps>,
|
||||||
presence: u32,
|
presence: u32,
|
||||||
) -> EncodingAudioProfile {
|
) -> EncodingAudioProfile {
|
||||||
assert_initialized_main_thread!();
|
skip_assert_initialized!();
|
||||||
let preset = preset.to_glib_none();
|
let preset = preset.to_glib_none();
|
||||||
let restriction = restriction.to_glib_none();
|
let restriction = restriction.to_glib_none();
|
||||||
unsafe {
|
unsafe {
|
||||||
|
@ -187,6 +187,7 @@ impl EncodingAudioProfile {
|
||||||
|
|
||||||
#[doc(alias = "gst_encoding_audio_profile_new")]
|
#[doc(alias = "gst_encoding_audio_profile_new")]
|
||||||
pub fn builder(format: &gst::Caps) -> EncodingAudioProfileBuilder {
|
pub fn builder(format: &gst::Caps) -> EncodingAudioProfileBuilder {
|
||||||
|
assert_initialized_main_thread!();
|
||||||
EncodingAudioProfileBuilder::new(format)
|
EncodingAudioProfileBuilder::new(format)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -201,7 +202,7 @@ impl EncodingVideoProfile {
|
||||||
restriction: Option<&gst::Caps>,
|
restriction: Option<&gst::Caps>,
|
||||||
presence: u32,
|
presence: u32,
|
||||||
) -> EncodingVideoProfile {
|
) -> EncodingVideoProfile {
|
||||||
assert_initialized_main_thread!();
|
skip_assert_initialized!();
|
||||||
let preset = preset.to_glib_none();
|
let preset = preset.to_glib_none();
|
||||||
let restriction = restriction.to_glib_none();
|
let restriction = restriction.to_glib_none();
|
||||||
unsafe {
|
unsafe {
|
||||||
|
@ -216,6 +217,7 @@ impl EncodingVideoProfile {
|
||||||
|
|
||||||
#[doc(alias = "gst_encoding_video_profile_new")]
|
#[doc(alias = "gst_encoding_video_profile_new")]
|
||||||
pub fn builder(format: &gst::Caps) -> EncodingVideoProfileBuilder {
|
pub fn builder(format: &gst::Caps) -> EncodingVideoProfileBuilder {
|
||||||
|
assert_initialized_main_thread!();
|
||||||
EncodingVideoProfileBuilder::new(format)
|
EncodingVideoProfileBuilder::new(format)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -247,7 +249,7 @@ impl EncodingContainerProfile {
|
||||||
format: &gst::Caps,
|
format: &gst::Caps,
|
||||||
preset: Option<&str>,
|
preset: Option<&str>,
|
||||||
) -> EncodingContainerProfile {
|
) -> EncodingContainerProfile {
|
||||||
assert_initialized_main_thread!();
|
skip_assert_initialized!();
|
||||||
let name = name.to_glib_none();
|
let name = name.to_glib_none();
|
||||||
let description = description.to_glib_none();
|
let description = description.to_glib_none();
|
||||||
let preset = preset.to_glib_none();
|
let preset = preset.to_glib_none();
|
||||||
|
@ -263,6 +265,7 @@ impl EncodingContainerProfile {
|
||||||
|
|
||||||
#[doc(alias = "gst_encoding_container_profile_new")]
|
#[doc(alias = "gst_encoding_container_profile_new")]
|
||||||
pub fn builder(format: &gst::Caps) -> EncodingContainerProfileBuilder {
|
pub fn builder(format: &gst::Caps) -> EncodingContainerProfileBuilder {
|
||||||
|
assert_initialized_main_thread!();
|
||||||
EncodingContainerProfileBuilder::new(format)
|
EncodingContainerProfileBuilder::new(format)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -295,6 +298,7 @@ struct EncodingProfileBuilderCommonData<'a> {
|
||||||
|
|
||||||
impl<'a> EncodingProfileBuilderCommonData<'a> {
|
impl<'a> EncodingProfileBuilderCommonData<'a> {
|
||||||
fn new(format: &'a gst::Caps) -> EncodingProfileBuilderCommonData<'a> {
|
fn new(format: &'a gst::Caps) -> EncodingProfileBuilderCommonData<'a> {
|
||||||
|
skip_assert_initialized!();
|
||||||
EncodingProfileBuilderCommonData {
|
EncodingProfileBuilderCommonData {
|
||||||
name: None,
|
name: None,
|
||||||
description: None,
|
description: None,
|
||||||
|
@ -405,6 +409,7 @@ declare_encoding_profile_builder_common!(EncodingAudioProfileBuilder);
|
||||||
|
|
||||||
impl<'a> EncodingAudioProfileBuilder<'a> {
|
impl<'a> EncodingAudioProfileBuilder<'a> {
|
||||||
fn new(format: &'a gst::Caps) -> Self {
|
fn new(format: &'a gst::Caps) -> Self {
|
||||||
|
skip_assert_initialized!();
|
||||||
EncodingAudioProfileBuilder {
|
EncodingAudioProfileBuilder {
|
||||||
base: EncodingProfileBuilderCommonData::new(format),
|
base: EncodingProfileBuilderCommonData::new(format),
|
||||||
restriction: None,
|
restriction: None,
|
||||||
|
@ -443,6 +448,7 @@ declare_encoding_profile_builder_common!(EncodingVideoProfileBuilder);
|
||||||
|
|
||||||
impl<'a> EncodingVideoProfileBuilder<'a> {
|
impl<'a> EncodingVideoProfileBuilder<'a> {
|
||||||
fn new(format: &'a gst::Caps) -> Self {
|
fn new(format: &'a gst::Caps) -> Self {
|
||||||
|
skip_assert_initialized!();
|
||||||
EncodingVideoProfileBuilder {
|
EncodingVideoProfileBuilder {
|
||||||
base: EncodingProfileBuilderCommonData::new(format),
|
base: EncodingProfileBuilderCommonData::new(format),
|
||||||
restriction: None,
|
restriction: None,
|
||||||
|
@ -496,6 +502,7 @@ declare_encoding_profile_builder_common!(EncodingContainerProfileBuilder);
|
||||||
|
|
||||||
impl<'a> EncodingContainerProfileBuilder<'a> {
|
impl<'a> EncodingContainerProfileBuilder<'a> {
|
||||||
fn new(format: &'a gst::Caps) -> Self {
|
fn new(format: &'a gst::Caps) -> Self {
|
||||||
|
skip_assert_initialized!();
|
||||||
EncodingContainerProfileBuilder {
|
EncodingContainerProfileBuilder {
|
||||||
base: EncodingProfileBuilderCommonData::new(format),
|
base: EncodingProfileBuilderCommonData::new(format),
|
||||||
profiles: Vec::new(),
|
profiles: Vec::new(),
|
||||||
|
|
Loading…
Reference in a new issue