mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-09-29 07:12:25 +00:00
promise: Remove unneeded feature gates
This commit is contained in:
parent
cd55f02e20
commit
d69e8e237f
1 changed files with 0 additions and 8 deletions
|
@ -32,13 +32,11 @@ pub enum PromiseError {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Promise {
|
impl Promise {
|
||||||
#[cfg(any(feature = "v1_14", feature = "dox"))]
|
|
||||||
pub fn new() -> Promise {
|
pub fn new() -> Promise {
|
||||||
assert_initialized_main_thread!();
|
assert_initialized_main_thread!();
|
||||||
unsafe { from_glib_full(gst_sys::gst_promise_new()) }
|
unsafe { from_glib_full(gst_sys::gst_promise_new()) }
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(any(feature = "v1_14", feature = "dox"))]
|
|
||||||
pub fn new_with_change_func<F>(func: F) -> Promise
|
pub fn new_with_change_func<F>(func: F) -> Promise
|
||||||
where
|
where
|
||||||
F: FnOnce(Result<&StructureRef, PromiseError>) + Send + 'static,
|
F: FnOnce(Result<&StructureRef, PromiseError>) + Send + 'static,
|
||||||
|
@ -88,14 +86,12 @@ impl Promise {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(any(feature = "v1_14", feature = "dox"))]
|
|
||||||
pub fn expire(&self) {
|
pub fn expire(&self) {
|
||||||
unsafe {
|
unsafe {
|
||||||
gst_sys::gst_promise_expire(self.to_glib_none().0);
|
gst_sys::gst_promise_expire(self.to_glib_none().0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(any(feature = "v1_14", feature = "dox"))]
|
|
||||||
pub fn get_reply(&self) -> Option<&StructureRef> {
|
pub fn get_reply(&self) -> Option<&StructureRef> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let s = gst_sys::gst_promise_get_reply(self.to_glib_none().0);
|
let s = gst_sys::gst_promise_get_reply(self.to_glib_none().0);
|
||||||
|
@ -107,27 +103,23 @@ impl Promise {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(any(feature = "v1_14", feature = "dox"))]
|
|
||||||
pub fn interrupt(&self) {
|
pub fn interrupt(&self) {
|
||||||
unsafe {
|
unsafe {
|
||||||
gst_sys::gst_promise_interrupt(self.to_glib_none().0);
|
gst_sys::gst_promise_interrupt(self.to_glib_none().0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(any(feature = "v1_14", feature = "dox"))]
|
|
||||||
pub fn reply(&self, s: Structure) {
|
pub fn reply(&self, s: Structure) {
|
||||||
unsafe {
|
unsafe {
|
||||||
gst_sys::gst_promise_reply(self.to_glib_none().0, s.into_ptr());
|
gst_sys::gst_promise_reply(self.to_glib_none().0, s.into_ptr());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(any(feature = "v1_14", feature = "dox"))]
|
|
||||||
pub fn wait(&self) -> PromiseResult {
|
pub fn wait(&self) -> PromiseResult {
|
||||||
unsafe { from_glib(gst_sys::gst_promise_wait(self.to_glib_none().0)) }
|
unsafe { from_glib(gst_sys::gst_promise_wait(self.to_glib_none().0)) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(any(feature = "v1_14", feature = "dox"))]
|
|
||||||
impl Default for Promise {
|
impl Default for Promise {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
Self::new()
|
Self::new()
|
||||||
|
|
Loading…
Reference in a new issue