[PATCH] encodedstream: Deprecate setActive() and replace with an explicit API
authorArjen Hiemstra <ahiemstra@heimr.nl>
Tue, 8 Oct 2024 12:03:20 +0000 (14:03 +0200)
committerAurélien COUDERC <coucouf@debian.org>
Tue, 15 Jul 2025 14:45:40 +0000 (16:45 +0200)
commit0b9ec63ea753619431669e19bcf4f4aeaf7d13a2
tree2cf56ff85139ad11b563d83fbabbaec047fb632b
parentbb5535d21395badbf0f8deb015646fed1291236e
[PATCH] encodedstream: Deprecate setActive() and replace with an explicit API

setActive() currently implies starting/stopping the recording process.
However, this is somewhat awkward as everything is rather asynchronous
with multiple threads involved, which means calling setActive() may mean
things are not actually active or may still be active.

To avoid this awkwardness, deprecate setActive() and replace it with an
explicit start() and stop() method that are clearly documented to be
purely requests, with the real active/inactive state matching the stream
state.

This also makes the "Rendering" state more explicit, when "Stop" is
called we immediately switch to the "Rendering" state to indicate we may
still be processing frames but are no longer receiving new frames.

Gbp-Pq: Name upstream_0ac4aa41_encodedstream-Deprecate-setActive-and-replace-with-an-explicit-API.patch
src/pipewirebaseencodedstream.cpp
src/pipewirebaseencodedstream.h
src/pipewireproduce.cpp
src/pipewireproduce_p.h
src/pipewirerecord.cpp
tests/HeadlessTest.cpp