Skip to content

🐛 Properly updates v4l2 properties instead of nuking and rebuilding them

Guillaume Riou requested to merge fix/properly-updates-v4l2-properties into develop

This replaces the property remove in the v4l2src quiddity by property replace which preserves the callback attached to the properties by potential clients (i.e. : scenic).

  • Uses PBag::replace_and_notify on properties that get reset on certain events instead of deleting and recreating them. This makes it so the event listeners attached to properties are not lost. This fixes sat-mtl/tools/scenic/scenic#547 (closed)
  • Coalesces the standard_framerate_ and framerates_enum_ properties to a single property. In the original code, both were mutually exclusive and had the same display name.
  • Removes 3840x2160 from the list of standard resolution since this very high resolution caused issues with the capture cards used with the scenic stations and caused very strange rescaling bugs when selected. This fixes an undocumented bug that has probably existed for years. (This does not prevent v4l2 from outputting a resolution higher than this when the v4l2 device declares a possible resolution that is higher than that.)
  • Puts 1920x1080 as a default resolution
  • Puts 30fps as the default fps. Note that every time the resolution or pixel format or TV format changes, the fps property will be rebuilt and replaced and will revert back to 30fps. This fixes sat-mtl/tools/scenic/scenic#545 (closed)
  • Removes tv_standard property
  • Fixes using devices that offers discrete resolutions
  • Adds some documentation for the replace family of methods in PBag
  • Changes some random white spaces.
Edited by Olivier Gauthier

Merge request reports