HDMI pass-through in hdmiin-demo: How is it done, and can it be modified?

Which system do you use? Android, Ubuntu, OOWOW or others?

Ubuntu 22,

Which version of system do you use? Khadas official images, self built images, or others?

Khadas Image, built using fenix from Khadas github repo

Please describe your issue below:

We want to get a 2160p60 video stream (no HDCP) from VIM4 HDMI in to HDMI out and apply some changes/processing to the video frames on the fly. I see two possibilities:

  1. HDMI input through V4L into an OpenGL texture and render the HDMI output using OpenGL ES (one textured rectangle), applying image changes on the fly in a Fragment shader
  2. Same path as tvserver uses as seen e.g. in the hdmiin-demo. Some questions on that:
  • From looking at the hdmiin-demo sources, I assume that the whole handling of the image streams is done in the media kernel module. Question is which code modules do the connection between HDMI Input and HDMI output ?
  • hdmiin-demo can do some frame rate conversion, so there must be a frame buffer. Is it possible to acces this one?

I’d prefer the second way if possible. Thanks Khadas team for any advice.