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

Added dbus method SetLoop to switch looping on / off by dbus. #679

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dronus
Copy link

@dronus dronus commented Jan 8, 2019

No description provided.

@dronus
Copy link
Author

dronus commented Jan 8, 2019

Any further concerns?

@superlou
Copy link

superlou commented Jan 8, 2019

Is it possible to add a DBus request to determine if looping is currently set, similar to PlaybackStatus but returning a boolean? This would be useful if the client controlling OMXPlayer is restarted or has an otherwise unreliable connection. I really appreciate the work put into this!

@dronus
Copy link
Author

dronus commented Jan 8, 2019

A IsLooping query would be possible, but not very useful, as one can just set the desired state again at any time, there is no overhead on top of the DBUS messaging, even less as there is no response to be evaluated by the caller. So I won't implement that.

@superlou
Copy link

superlou commented Jan 8, 2019

Understood.

@jehutting
Copy link

Great... but shouldn't this be the MPRIS2 LoopStatus property (despite the Playlist posibility)?

And isn't superlou just right in his statement regarding the usefulness of reading the LoopStatus?

@dronus
Copy link
Author

dronus commented Jan 10, 2019

Ok, if there is already definition in a standard we should implement it that way. However, some properties are implemented as setter functions by omxplayer, for example SetAlphaand SetLayer, which is also not by the book, I guess?

@jehutting
Copy link

Yes and purely as a personal opinion, strictly taken these methods SetAlpha and SetLayer are "wrong" as they where better off as properties. For example, when superlou (:-)) decides to adjust the alpha, he doesn't know what the current value is.

Therefore the reading of the current LoopStatus is essential when you just want to know the current value.

Just as an idea -and probably out of your scope here- , wouldn't it be handy to have a PlayerInfo (object) to which we can ask some current values. E.g. then OMXControl just does a player_info->loop_status to retrieve the current LoopStatus (m_loop) value.

By the way, I like your idea of having a key(board key) mapped to this LoopStatus.

@superlou
Copy link

I think that simply being able to send the DBUS command as the PR currently stands is pretty useful. Would there be anything else required to merge? Maybe it would simplify the debate to handle the "getter" or method vs. property arguments in another issue?

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 this pull request may close these issues.

3 participants