mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-12-01 14:01:32 +00:00
Add get_current_state & get_pending_state to ElementExtManual
Convenient API to simply get the current or pending state of the element.
This commit is contained in:
parent
a3f6f710a9
commit
4a92966ed5
1 changed files with 8 additions and 0 deletions
|
@ -138,6 +138,14 @@ pub trait ElementExtManual: 'static {
|
||||||
) -> (Result<StateChangeSuccess, StateChangeError>, State, State);
|
) -> (Result<StateChangeSuccess, StateChangeError>, State, State);
|
||||||
fn set_state(&self, state: State) -> Result<StateChangeSuccess, StateChangeError>;
|
fn set_state(&self, state: State) -> Result<StateChangeSuccess, StateChangeError>;
|
||||||
|
|
||||||
|
fn get_current_state(&self) -> State {
|
||||||
|
self.get_state(ClockTime::from(0)).1
|
||||||
|
}
|
||||||
|
|
||||||
|
fn get_pending_state(&self) -> State {
|
||||||
|
self.get_state(ClockTime::from(0)).2
|
||||||
|
}
|
||||||
|
|
||||||
fn query(&self, query: &mut QueryRef) -> bool;
|
fn query(&self, query: &mut QueryRef) -> bool;
|
||||||
|
|
||||||
fn send_event(&self, event: Event) -> bool;
|
fn send_event(&self, event: Event) -> bool;
|
||||||
|
|
Loading…
Reference in a new issue