OpenIPC / PixelPilot_rk

Application that decodes an RTP Video Stream and displays it on screen, for Rockchip devices.
https://openipc.org
GNU General Public License v3.0
9 stars 8 forks source link

Add some descriptive --screen-mode arguments #26

Open zhouruixi opened 1 month ago

zhouruixi commented 1 month ago

-screen-mode arguments only support <width>x<heigth>@<fps>. How about add some descriptive --screen-mode arguments, like max-fps, min-fps, max-resolution, min-resolution etc. Then PixelPilot_rk selects a suitable screen mode from the screen modes supported by the monitor.

seriyps commented 1 month ago

Great idea :+1:

What is "mix-resolution"?

zhouruixi commented 1 month ago

mix-resolution

it's a typo, min-resolution

seriyps commented 1 month ago

While working on #28, I found interesting is that this structure which represents supported display mode https://www.kernel.org/doc/html/latest/gpu/drm-kms.html#c.drm_display_mode Has a .type field and it can have DRM_MODE_TYPE_PREFERRED flag set, and I think it should be used as default resolution if nothing is explicitly specified

zhouruixi commented 1 month ago

While working on #28, I found interesting is that this structure which represents supported display mode https://www.kernel.org/doc/html/latest/gpu/drm-kms.html#c.drm_display_mode Has a .type field and it can have DRM_MODE_TYPE_PREFERRED flag set, and I think it should be used as default resolution if nothing is explicitly specified

Yes, it had a preferred, This should be the default screenmode. May due to compatibility issues, the preferred may not be the best. Or just order by fps, resolution desc and use the first one screen mode?

apt install drm-info drm_info You can see the connector modes, my monitor supports 2560x1080@75, but the preferred is 2560x1080@60

│   └───Connector 1
│       ├───Object ID: 111
│       ├───Type: HDMI-A
│       ├───Status: connected
│       ├───Physical size: 800x340 mm
│       ├───Subpixel: unknown
│       ├───Encoders: {1}
│       ├───Modes
│       │   ├───2560x1080@59.98 preferred driver phsync nvsync 
│       │   ├───2560x1080@74.99 driver phsync nvsync