Closed nohmad closed 10 years ago
Something like a command line option --seek "BL BS FS FL" with Back Large / Back Small / Forward Small / Forward Large values in seconds?
For D-Bus there is already a MediaPlayer2.Player.Seek method. Doesn't this work? Checked it. It isn't correctly implemented: a positive offset gives a forward small (with the fixed 30 sec) and a negative offset gives a backward small (also with a fixed value of 30 sec).
@jehutting Yes, option like you brought might be sufficient.
I didn't know that dbus is already being supported. It'd be great if the method works accepting arbitrary integer second.
You need a 0.3.? omxplayer release to use the D-Bus interface. For the implementation and usage see OMXControl.h & .cpp files, and the MPRIS2 specifications. Notice that not all of this spec. is implemented (e.g. the playlist functionality).
Have a look at https://github.com/blakee/omxplayer/tree/dbusfixes , I fixed Seek and added SetPosition.
@blakee Could you submit a PR? Looks good, but will require a little testing.
Nice work @blakee. Your dbuscontrol.sh pops up at the right time. I was just looking for code to check the D-Bus interface! Thanks!
Submitted PR #146
This is now implemented. Updated omxplayer here http://omxplayer.sconde.net. Can you test? Try: pi@raspberrypi:~ $ ./dbuscontrol.sh setposition 30000000 to seek to 30 seconds (using this https://github.com/popcornmix/omxplayer/blob/master/dbuscontrol.sh)
@popcornmix It works nice. I also tested seek subcommand with negative number, and it works as I expected.
Thanks for @blakee and @popcornmix.
Good to hear.
Key-config option exposes following actions:
SEEK_BACK_SMALL SEEK_FORWARD_SMALL SEEK_BACK_LARGE SEEK_FORWARD_LARGE
However these seeking times are fixed as constants in the code. Can you make users adjust those variables? I'll be just happy with either command line options or environment variables, or even dbus messages.