2023-05-08, 18:50
I want to create a custom external player to play some special contents (actually a slideshow with on-the-fly crop and zoom). I plan to develop the player in Python with Pygame, the platform is a Raspberry Pi with the Raspberry OS.
When Kodi is stopped, my proof-of-concept player runs nicely from the command line; it uses the fbcon driver and it shows its graphical output on the screen.
Then I declared my custom player into userdata/playercorefactory.xml: it appears under the context menu and I can start it. Unfortunately the player is executed but it fails to initialize the graphics driver. Using Pygame I try to initialize three drivers: directfb, fbcon and svgalib, but none of them succeed.
I got an strace of the failing process and I see the following open() which fails (instead it succeed when Kodi is not running):
I tried to toggle some settings of the external player definition (hidexbmc and hideconsole), but without success.
It seems tha Kodi does not allow the external player to use the screen. Any suggestion?
When Kodi is stopped, my proof-of-concept player runs nicely from the command line; it uses the fbcon driver and it shows its graphical output on the screen.
Then I declared my custom player into userdata/playercorefactory.xml: it appears under the context menu and I can start it. Unfortunately the player is executed but it fails to initialize the graphics driver. Using Pygame I try to initialize three drivers: directfb, fbcon and svgalib, but none of them succeed.
I got an strace of the failing process and I see the following open() which fails (instead it succeed when Kodi is not running):
openat(AT_FDCWD, "/dev/tty", O_RDWR) = -1 ENXIO (No such device or address)
I tried to toggle some settings of the external player definition (hidexbmc and hideconsole), but without success.
It seems tha Kodi does not allow the external player to use the screen. Any suggestion?