[gnome-music/wip/jfelder/gstplayer-state-test: 1/3] gstplayer: Add debug messages



commit d8444dc707d081ece17b237de9e43e907913ab4e
Author: Jean Felder <jfelder src gnome org>
Date:   Mon Oct 15 21:40:57 2018 +0200

    gstplayer: Add debug messages

 gnomemusic/gstplayer.py             | 2 ++
 gnomemusic/widgets/playertoolbar.py | 3 +++
 gnomemusic/widgets/smoothscale.py   | 1 +
 3 files changed, 6 insertions(+)
---
diff --git a/gnomemusic/gstplayer.py b/gnomemusic/gstplayer.py
index ec67891c..bd52f557 100644
--- a/gnomemusic/gstplayer.py
+++ b/gnomemusic/gstplayer.py
@@ -149,6 +149,7 @@ class GstPlayer(GObject.GObject):
 
         # Setting self.state triggers the property signal, which is
         # used down the line.
+        print("gstplayer - bus_state_changed", self.state)
         self.state = self.state
 
     @log
@@ -223,6 +224,7 @@ class GstPlayer(GObject.GObject):
 
         :param Playback state: The state to set
         """
+        print("gstplayer - state setter", state)
         if state == Playback.PAUSED:
             self._player.set_state(Gst.State.PAUSED)
         if state == Playback.STOPPED:
diff --git a/gnomemusic/widgets/playertoolbar.py b/gnomemusic/widgets/playertoolbar.py
index 5091dd13..8dfa8948 100644
--- a/gnomemusic/widgets/playertoolbar.py
+++ b/gnomemusic/widgets/playertoolbar.py
@@ -89,6 +89,9 @@ class PlayerToolbar(Gtk.ActionBar):
     @Gtk.Template.Callback()
     @log
     def _on_seek_finished(self, klass, time):
+        print(
+            'playertoolbar - seek finished',
+            self._player.get_playback_status())
         self._player.play()
 
     @Gtk.Template.Callback()
diff --git a/gnomemusic/widgets/smoothscale.py b/gnomemusic/widgets/smoothscale.py
index e995540b..8d4b54f7 100644
--- a/gnomemusic/widgets/smoothscale.py
+++ b/gnomemusic/widgets/smoothscale.py
@@ -97,6 +97,7 @@ class SmoothScale(Gtk.Scale):
     @log
     def _on_state_change(self, klass, arguments):
         state = self._player.state
+        print("smoothscale - state_changed", state)
 
         self._previous_state = state
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]