Adds new class DecodeSynchronizer that will coalesce the decoding of received streams on the metronome. This feature is experimental and is backed by a field trial WebRTC-FrameBuffer3. This experiment now has 3 arms to it, "WebRTC-FrameBuffer3/arm:FrameBuffer2/": Default, uses old frame buffer. "WebRTC-FrameBuffer3/arm:FrameBuffer3/": Uses new frame buffer. "WebRTC-FrameBuffer3/arm:SyncDecoding/": Uses new frame buffer with frame scheduled on the metronome. The SyncDecoding arm will not work until it is wired up in the follow-up CL. This change also makes the following modifications, * Adds FakeMetronome utilities for tests using a metronome. * Makes FrameDecodeScheduler an interface. The default implementation is TaskQueueFrameDecodeScheduler. * FrameDecodeScheduler now has a Stop() method, which must be called before destruction. TBR=philipel@webrtc.org Change-Id: I58a306bb883604b0be3eb2a04b3d07dbdf185c71 Bug: webrtc:13658 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/250665 Reviewed-by: Henrik Boström <hbos@webrtc.org> Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org> Reviewed-by: Stefan Holmer <holmer@google.com> Reviewed-by: Stefan Holmer <stefan@webrtc.org> Commit-Queue: Evan Shrubsole <eshr@webrtc.org> Cr-Commit-Position: refs/heads/main@{#35988}
How to write code in the api/ directory
Mostly, just follow the regular style guide, but:
- Note that
api/code is not exempt from the “.hand.ccfiles come in pairs” rule, so if you declare something inapi/path/to/foo.h, it should be defined inapi/path/to/foo.cc. - Headers in
api/should, if possible, not#includeheaders outsideapi/. It’s not always possible to avoid this, but be aware that it adds to a small mountain of technical debt that we’re trying to shrink. .ccfiles inapi/, on the other hand, are free to#includeheaders outsideapi/.
That is, the preferred way for api/ code to access non-api/ code is to call
it from a .cc file, so that users of our API headers won’t transitively
#include non-public headers.
For headers in api/ that need to refer to non-public types, forward
declarations are often a lesser evil than including non-public header files. The
usual rules still apply, though.
.cc files in api/ should preferably be kept reasonably small. If a
substantial implementation is needed, consider putting it with our non-public
code, and just call it from the api/ .cc file.