Repository navigation
Closed
Labels
enhancementNew feature or requestportPort a C unit to Rust (four-tier policy)readyMeets the definition of Ready; claimable
Description
Unit
libobs/obs-source-set-name.c.h (obs_source_set_name and its file-local source_set_name_requires_canvas) to rust/obs-source, new module set_name.
Phase and position
Phase 6 core, the core-source group: the next obs-source unit after the scene item bounds setters. The extraction and characterization landed in #4643 (issue #4630).
Dependencies and existing tests
- Characterization exists:
test/cmocka/test_source_set_name.c(global and local signal order, private sources and scenes, canvas-requiring sources, lookup updates, unchanged-name suppression).test_context_namesandtest_canvas_rules_callerscover the name tables and canvas paths too. - It calls, and leaves in C:
obs_canvas_rename_source(obs-canvas.c.h),obs_context_data_setname_htandobs_context_data_setname(obs.c.h). The calldata and signal calls go through the portedobs-callback. - No open PR edits the file.
Notes
- A live adapter
libobs/obs-source-set-name-fields.c.h, in the style ofobs-canvas-set-name-fields.c.h, holds the private field reads (output flags,context.name,context.private,context.signals), the two name-table calls with&obs->data.public_sources, andobs->signals. - Keep the previous name's copy taken before the rename and freed after both signals;
new_nameis the context's own string, read after the rename. No Rust borrow ofcontext.nameis held across a C call. - A NULL or empty name takes the rename path, as in C.
- The name table takes its own lock in C; the port adds none.
- No intentional differences expected. Tier 3 compares the name, the call log and the signal payloads with random names (NULL, empty, equal, long, non-UTF-8 bytes), the private and canvas flags, and NULL sources.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestportPort a C unit to Rust (four-tier policy)readyMeets the definition of Ready; claimable
Type
Projects
- StatusShow more project fieldsDone
Activity
rdoupe commentedon Nov 14, 2026
Claiming: the source rename port to
obs-source::set_name.test_source_set_name.c) and the extraction are already on master (libobs: Extract source name setter without behavior changes (Refs #4630) #4643); RED: Tier 1 cases inrust/obs-source/tests/source/set_name.rsagainsttodo!()shims.obs_source_set_name, and a live field adapterobs-source-set-name-fields.c.hfor the private fields, the two name-table calls andobs->signals; the file's include moves into its own ported unity group.The audio-pause callbacks port planned beside it is left out: #4375 already has a branch with its port. Draft PR today, once the RED commit is in.
obs-source: Test the source rename
obs-source: Port the source rename
obs-source: Compare the source rename with C
docs: Record the source rename port
rdoupe commentedon Nov 14, 2026
Fixed by PR #4860 (merged through the merge queue as d762f20):
obs_source_set_namenow runs inobs-source::set_name, with the C kept behind the live adapterlibobs/obs-source-set-name-fields.c.hand the original file in its own ported group. No intentional differences from C.Left: nothing of this unit. The name-table calls, the canvas rename and signal delivery stay in C by design. The audio-pause callbacks that were planned beside it are not part of this port; issue #4375 already has a branch for them, so no new follow-up issue was needed.
obs-source: Port the source rename (obs-rust#4860)