From 8e4b705e60c2e0f29dcb840a45901d7a05e7bd2e Mon Sep 17 00:00:00 2001 From: Jordan Petridis Date: Fri, 15 Jun 2018 13:02:27 +0300 Subject: [PATCH] PlayerWidget: Log the gst warnings. --- hammond-gtk/src/widgets/player.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hammond-gtk/src/widgets/player.rs b/hammond-gtk/src/widgets/player.rs index c9e2416..9dd5c3a 100644 --- a/hammond-gtk/src/widgets/player.rs +++ b/hammond-gtk/src/widgets/player.rs @@ -177,6 +177,10 @@ impl PlayerWidget { // Connect the fast-forward button to the gst Player. s.controls.forward.connect_clicked(clone!(s => move |_| s.fast_forward())); + // Log gst warnings. + s.player.connect_warning(move |_, warn| warn!("gst warning: {}", warn)); + + // Log gst errors. s.player.connect_error(clone!(sender => move |_, error| { // FIXME: should never occur and should not be user facing. sender.send(Action::ErrorNotification(format!("Player Error: {}", error)))