Repository navigation
fix(pipewire): fill the framerate list for the format the properties show (#1068) - #3070
Conversation
…ies show (#1068) A source whose settings carry no valid "format" yet shows a format label that names its framerate, while the framerate list beside it stays empty. RED on master, run in the Tier 2 Linux container (private PipeWire daemon, fake camera portal, both libobs modes): [ RUN ] initial_settings_fill_framerate_list first format: 64x48 (1.33:1) - 30 FPS - YUYV422 framerate items: 0, enabled: 1 0 framerates listed under a format label that names one [ FAILED ] initial_settings_fill_framerate_list The case also pins one entry per framerate: the fake camera repeats its default size, so the same framerate reaches the list twice.
…show (#1068) When the source's settings hold no valid format yet (a source just added, or one saved before the field existed), format_selected() returned early: the format list still labelled the camera's formats, framerates included, but the framerate list was never filled, so it showed nothing next to a label that named a framerate. Fill the list for the first format the properties show, and register the framerate callback so a pick still reaches the stream. The source's own format stays unset, so the stream negotiates one exactly as before. camera_framerates() collects one entry per framerate now: a libcamera camera repeats its default size's EnumFormat, so the same framerate arrived once per copy and the list showed it twice. GREEN, Tier 2 Linux container, both modes (libobs-c-reference and libobs): [ RUN ] initial_settings_fill_framerate_list first format: 64x48 (1.33:1) - 30 FPS - YUYV422 framerate items: 1, enabled: 1 [ OK ] initial_settings_fill_framerate_list The other eight pipewire camera and context cmocka tests pass in both modes.
|
Opened with the RED/GREEN evidence from the Tier 2 Linux container; watching CI. |
zackees
left a comment
There was a problem hiding this comment.
Coordinator review: LGTM. It addresses both points the closed #3053 left open:
- RED → GREEN is shown from the Tier 2 container (0 → 1 framerate items), not "pending".
- It no longer writes
settings["format"]from the modified callback. The list is filled for the format shown first, and the source's own format stays unset, so the stream negotiates as before. No saved scene changes behind the user's back.
append_framerate deduplicates by value (30/1 == 60/2), which also fixes the doubled entries from libcamera's repeated EnumFormat. Using Refs rather than Fixes is honest, since the reporter's IPU3 camera hasn't been tested yet. The features line is present. Queue on green.
|
Status: CI green except Evidence run locally, in this checkout's Tier 2 Linux build tree (same container the harness uses, private PipeWire daemon + Xvfb):
Not done here: the full local gate ( |
Refs #1068 (part 2). Not
Fixes: the property code is exercised under Xvfb by the Tier 2 cmocka test below, not by eye in a running OBS, so the report's own camera (Intel IPU3 behind libcamera) is still unverified.Why
format_selected()returned early whenparse_format()found no validformatin the settings — a source just added, or one saved before the field existed. The format list still labelled every camera format with its framerate (64x48 (1.33:1) - 30 FPS - YUYV422), but the framerate list was never filled: the dropdown was empty next to a label that named a framerate.RED
test/cmocka/test_pipewire_camera_format_dedup.c, new caseinitial_settings_fill_framerate_list, on master in the Tier 2 Linux container (private PipeWire daemon, fake camera portal, fake camera with libcamera's param order):The case also pins one entry per framerate: the fake camera repeats its default size, so the same framerate reaches
camera_framerates()once per copy and showed up twice.GREEN
format_selected()fills the framerate list for the first format the properties show and registersframerate_selected, so a pick still reaches the stream. The source's own format stays unset, so the stream negotiates one exactly as before — no restart, no pinned size.camera_framerates()now keeps one entry per framerate (append_framerate(), same value comparison asframerates_contain()).Checks
rust/tools/linux-validate/run.pybuild tree),test_pipewire_camera*andtest_pipewire_context_fail: 9/9 pass in both modes (libobs-c-referenceandlibobs).clang-format --dry-run --Werroron both files: clean../lint: theclang-formatlane passes; the run ends onci/test_check_changes.pyfailing withgit: command not foundin its own subprocess (environment, not this change).Test cost
New cmocka case: 1.2 s wall in both modes, no threads of its own, one fake PipeWire stream plus the existing fixture. The test file's whole binary runs in 1.2 s (one new case, one existing).
Not done
Running OBS with the change and opening the camera's properties on the reporter's IPU3 camera — no libcamera hardware here. The label/list consistency case is the contract; if a camera still disagrees, its
pw-dumpbelongs on the issue.