mirror of
https://github.com/librespot-org/librespot.git
synced 2024-12-18 17:11:53 +00:00
Mostly fix play/pause/stop behavior. Pause is latent.
This commit is contained in:
parent
664c76b201
commit
d30ffcd1c0
1 changed files with 2 additions and 2 deletions
|
@ -78,6 +78,8 @@ impl Open for GstreamerSink {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
pipeline.set_state(gst::State::Playing).expect("Unable to set the pipeline to the `Playing` state");
|
||||||
|
|
||||||
GstreamerSink {
|
GstreamerSink {
|
||||||
tx: tx,
|
tx: tx,
|
||||||
pipeline: pipeline
|
pipeline: pipeline
|
||||||
|
@ -87,11 +89,9 @@ impl Open for GstreamerSink {
|
||||||
|
|
||||||
impl Sink for GstreamerSink {
|
impl Sink for GstreamerSink {
|
||||||
fn start(&mut self) -> io::Result<()> {
|
fn start(&mut self) -> io::Result<()> {
|
||||||
self.pipeline.set_state(gst::State::Playing).expect("Unable to set the pipeline to the `Playing` state");
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
fn stop(&mut self) -> io::Result<()> {
|
fn stop(&mut self) -> io::Result<()> {
|
||||||
self.pipeline.set_state(gst::State::Ready).expect("Unable to set the pipeline to the `Ready` state");
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
fn write(&mut self, data: &[i16]) -> io::Result<()> {
|
fn write(&mut self, data: &[i16]) -> io::Result<()> {
|
||||||
|
|
Loading…
Reference in a new issue