[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>
Sun, 18 May 2025 22:58:37 +0000 (00:58 +0200)
commita79b957f3912d253a6cf3c057dcfe38961f169e2
tree7d24b327b70bc677ba005807bbef9c360b336625
parent21af4d6eb2ecd353e6abf79202940604ea40be44
[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