[rhythmbox] replaygain: use BLOCK_DOWNSTREAM probe rather than IDLE
- From: Jonathan Matthew <jmatthew src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rhythmbox] replaygain: use BLOCK_DOWNSTREAM probe rather than IDLE
- Date: Fri, 2 Aug 2013 13:30:32 +0000 (UTC)
commit 51b0878349980b125c0c7bd24b177d86201479b2
Author: Jonathan Matthew <jonathan d14n org>
Date: Fri Aug 2 23:28:49 2013 +1000
replaygain: use BLOCK_DOWNSTREAM probe rather than IDLE
IDLE probes run way too much risk of recursive and simultaneous
callbacks in multiple threads. At the point we're probing, we
know data is flowing, so BLOCK_DOWNSTREAM should work fine.
https://bugzilla.gnome.org/show_bug.cgi?id=700401
plugins/replaygain/player.py | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/plugins/replaygain/player.py b/plugins/replaygain/player.py
index a1d3ceb..903e493 100644
--- a/plugins/replaygain/player.py
+++ b/plugins/replaygain/player.py
@@ -146,9 +146,8 @@ class ReplayGainPlayer(object):
rgvolume.set_state(Gst.State.READY)
rgvolume.set_state(Gst.State.PLAYING)
#self.resetting_rgvolume = False
- pad.remove_probe(info.id)
self.set_rgvolume(rgvolume)
- return Gst.PadProbeReturn.OK
+ return Gst.PadProbeReturn.REMOVE
def playing_entry_changed(self, player, entry):
if entry is None:
@@ -159,8 +158,8 @@ class ReplayGainPlayer(object):
if self.got_replaygain is False:
print("blocking rgvolume to reset it")
- pad = self.rgvolume.get_static_pad("sink").get_peer()
- pad.add_probe(Gst.PadProbeType.IDLE, self.rgvolume_blocked, self.rgvolume)
+ pad = self.rgvolume.get_static_pad("sink")
+ pad.add_probe(Gst.PadProbeType.BLOCK_DOWNSTREAM, self.rgvolume_blocked, self.rgvolume)
else:
print("no need to reset rgvolume")
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]