wasalm / hello_video

An example script for the Raspberry Pi 4 to play a video hardware accelerated.
2 stars 0 forks source link

modify for quad view #1

Open Katsuryoku opened 3 years ago

Katsuryoku commented 3 years ago

hello,

I want to display a quad grid view, is-it possible to config output size to display 4 outputs at the same time ? (actually it's output say "drmModeSetPlane failed: Permission denied" when I do it.)

wasalm commented 3 years ago

That should be possible. For this you display each output into a different layer/plane and in the function drmModeSetPlane you can specify where each plane is positioned. Look at the multiplane-test branch to do this.

About your error, are you using X or any other window manager? This code acts like its own window manager and hence is incompatible with other ones.

Lastly, if you want to preview multiple video's at the same time, check if the rpi is able to do that. According to https://www.raspberrypi.org/forums/viewtopic.php?t=296626 it is not possible for all video codecs.

cosmostreamer commented 3 months ago

I tested your multi-plane and it works fine on Raspberry PI 4, but both planes are on the same HDMI out. How to configure secondary plane to be placed on the second HDMI out?

wasalm commented 3 months ago

Pff. This is years ago I played with this. What you can do is to look at the code of kmscube (https://gitlab.freedesktop.org/mesa/kmscube) That is better documented and helps with the setup of the drm side of video playback.

cosmostreamer commented 3 months ago

Pff. This is years ago I played with this. What you can do is to look at the code of kmscube (https://gitlab.freedesktop.org/mesa/kmscube) That is better documented and helps with the setup of the drm side of video playback. Got it, thank you!