mirror of
https://gitlab.freedesktop.org/dabrain34/GstPipelineStudio.git
synced 2025-01-18 04:45:33 +00:00
player: handle EOS message
This commit is contained in:
parent
741f863ed9
commit
4cb965fe7f
1 changed files with 6 additions and 1 deletions
|
@ -280,6 +280,11 @@ impl Player {
|
|||
fn on_pipeline_message(&self, msg: &gst::MessageRef) {
|
||||
use gst::MessageView;
|
||||
match msg.view() {
|
||||
MessageView::Eos(_) => {
|
||||
GPS_INFO!("EOS received");
|
||||
self.set_state(PipelineState::Stopped)
|
||||
.expect("Unable to set state to stopped");
|
||||
}
|
||||
MessageView::Error(err) => {
|
||||
GPS_ERROR!(
|
||||
"Error from {:?}: {} ({:?})",
|
||||
|
@ -288,7 +293,7 @@ impl Player {
|
|||
err.debug()
|
||||
);
|
||||
self.set_state(PipelineState::Error)
|
||||
.expect("Unable to set state to stopped");
|
||||
.expect("Unable to set state to Error");
|
||||
}
|
||||
MessageView::Application(msg) => match msg.structure() {
|
||||
// Here we can send ourselves messages from any thread and show them to the user in
|
||||
|
|
Loading…
Reference in a new issue