-
Notifications
You must be signed in to change notification settings - Fork 72
Open
Description
Issue Report
Description
The exitEvent callback takes two arguments: player and exit_status. If you call something like player.get_filename(), the program crashes with an OMXPlayerDeadError.
It seems to me that the player is cleaning everything up before calling the exitEvent, making the player argument pretty useless to find out info about what just exited.
Problem reproduction
from omxplayer.player import OMXPlayer
def video_exited(player, exit_status):
print("video exited: {}, status: {}".format(player.get_filename(), exit_status))
VIDEO_PATH = "Your Video File Here.mov"
videoPlayer = OMXPlayer(VIDEO_PATH,
args="--win 0,0,1024,768 --layer 1",
dbus_name="org.mpris.MediaPlayer2.omxplayer1")
videoPlayer.exitEvent = video_exited
# Press return to force the video to exit before it ends naturally.
input("Press Enter to continue...")
videoPlayer.quit()
Environment details
Distributor ID: Raspbian
Description: Raspbian GNU/Linux 10 (buster)
Release: 10
Codename: buster
| Software | Version |
|---|---|
python-omxplayer-wrapper |
0.3.3 |
python-dbus (dpkg -s python-dbus) |
1.2.8-3 |
python (python --version) |
3.7.3 |
omxplayer (omxplayer --version) |
f543a0d |
Metadata
Metadata
Assignees
Labels
No labels