You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
rust: port process_media_actions (the media action queue drain) to obs-source #5902
process_media_actions() in libobs/obs-source.c.h is still C. It is the last C step of the media control path: the obs_source_media_* calls that fill source->media_actions are Rust since #5617, and the dispatch and signal decisions it asks are Rust since #2257 (obs-source-media-admission). obs_source_video_tick() runs it once per tick for a source with OBS_SOURCE_CONTROLLABLE_MEDIA.
Behavior the port keeps:
Loops until the queue is empty: each round takes media_actions_mutex, copies and pops the front action (or sets MEDIA_ACTION_NONE when empty), and drops the lock before any callback, so a callback may queue more actions and they run in the same tick.
Asks obs_source_media_dispatch() for the step; RETURN ends the loop, SKIP calls nothing.
Calls the matching info.media_* callback with context.data (action.pause for play/pause, action.ms for set time), callback before signal.
Emits obs_source_media_signal() through obs_source_dosignal(source, NULL, ...), reading action.pause only for play/pause.
Plan (the shape of #5900): move the body verbatim into its own reference-only file in a ported group; a safe core in obs-source over a trait (pop front under the lock, call, signal); the C entry through hidden, non-EXPORT adapters next to obs-source-media-controls-fields.c.h; Tier 1 RED against todo!() in obs-source's existing source test binary; Tier 3 parity against the original C in obs-c-oracle; Tier 2 unchanged plus a cmocka case that queues every action type through the public obs_source_media_* calls, ticks the source, and checks the callback order, arguments and signals, including an action queued from inside a callback.
Activity
rdoupe commentedon Nov 28, 2026
Claiming: port process_media_actions to obs-source
libobs: extract process_media_actions verbatim (Refs #5902)
test/cmocka: characterize process_media_actions (Refs #5902)
obs-source: Tier 1 for process_media_actions, RED (Refs #5902)
obs-source: port process_media_actions to Rust (Fixes #5902)
libobs: extract process_media_actions verbatim (Refs #5902)
test/cmocka: characterize process_media_actions (Refs #5902)
obs-source: Tier 1 for process_media_actions, RED (Refs #5902)
obs-source: port process_media_actions to Rust (Fixes #5902)
libobs: extract process_media_actions verbatim (Refs #5902)
test/cmocka: characterize process_media_actions (Refs #5902)
obs-source: Tier 1 for process_media_actions, RED (Refs #5902)
obs-source: port process_media_actions to Rust (Fixes #5902)
obs-source: port process_media_actions to Rust (Fixes obs-rust#5902) (o…