Open hagna opened 9 years ago
I am able to reproduce this issue with the pre-installed version of omxplayer on a freshly imaged Pi using the 2015-05-05 stock Raspbian image.
It looks like properties under the org.freedesktop.DBus.Properties
interface—CanQuit
, Duration
, Position
, etc.—are working, but anything under the org.mpris.MediaPlayer2.Player
interface—PlayPause
, ShowSubtitles
, etc.—are giving the "missing .service file" error.
I will continue looking into this issue as my free time permits.
Upon further investigation, this looks like a timing issue. If I add a five second sleep before the initial call to player.PlayPause()
, everything seems to work fine:
player.WaitForReady()
time.Sleep(5 * time.Second)
err = player.PlayPause()
Clearly the player.WaitForReady()
is not fulfilling it's intended purpose. I'll continue trying to figure out a better implementation for it.
Even if I pause for 15 seconds ShowSubtitles will not work.
omxplayer is Version : 843744e [master](Build date: Sat, 27 Jun 2015 00:49:24 +0000) golang is 1.4.2 cross compiler for arm (5g) you can find dbuscontrol.sh (which does work) here https://github.com/popcornmix/omxplayer/blob/master/dbuscontrol.sh
The code I run is the example provided with logging:
And this is what it does:
Although if I can use dbuscontrol.sh while ./omx is running to see that the video is paused: