format/context/input: implement pause()
and play()
This commit is contained in:
parent
e7cd9fd94f
commit
5a07671b92
@ -97,6 +97,24 @@ impl Input {
|
|||||||
pub fn packets(&mut self) -> PacketIter {
|
pub fn packets(&mut self) -> PacketIter {
|
||||||
PacketIter::new(self)
|
PacketIter::new(self)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn pause(&mut self) -> Result<(), Error> {
|
||||||
|
unsafe {
|
||||||
|
match av_read_pause(self.as_mut_ptr()) {
|
||||||
|
0 => Ok(()),
|
||||||
|
e => Err(Error::from(e)),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn play(&mut self) -> Result<(), Error> {
|
||||||
|
unsafe {
|
||||||
|
match av_read_play(self.as_mut_ptr()) {
|
||||||
|
0 => Ok(()),
|
||||||
|
e => Err(Error::from(e)),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Deref for Input {
|
impl Deref for Input {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user