Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MPRIS volume property getter hangs after it was set to 0 #780

Closed
azymohliad opened this issue Jul 29, 2023 · 0 comments · Fixed by #928
Closed

MPRIS volume property getter hangs after it was set to 0 #780

azymohliad opened this issue Jul 29, 2023 · 0 comments · Fixed by #928

Comments

@azymohliad
Copy link
Contributor

azymohliad commented Jul 29, 2023

Bug/Feature description

An attempt to read MPRIS Volume property after it was set to 0 hangs the client. It might be a GStreamer issue, as it seems to block on gst_player.py:L114. But I'm not very familiar with it to be sure, so reporting here for now just to not forget about it.

It also prints this warning:

(com.github.geigi.cozy:2): GLib-GIO-WARNING **: 20:04:47.256: Type of return value is incorrect: expected '(v)', got '()'

So I guess there's a D-Bus call to GStreamer under the hood, which hangs for a similar reason as #777 (returning unexpected empty value).

I guess as a workaround volume setter in GskPlayer could only propagate the value to GStreamer if it's not 0, and otherwise just set mute to True. And in the getter, read mute first, return 0 if it's True, and otherwise read volume property. But not sure if such workaround is reasonable.

Steps to reproduce

  1. Set the volume to 0:
busctl set-property --user org.mpris.MediaPlayer2.Cozy /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player Volume d 0
  1. Read the volume:
busctl get-property --user org.mpris.MediaPlayer2.Cozy /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player Volume

The last command hangs.

System Information

  • Operating System: Arch Linux
  • Installation source: Flathub
  • Version of cozy: 1.2.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant