Open Bug 1920687 Opened 6 months ago Updated 5 months ago

Enable libwebrtc's ZeroHertzAdapterMode in FrameCadenceAdapter

Categories

(Core :: WebRTC: Audio/Video, task)

task

Tracking

()

ASSIGNED

People

(Reporter: pehrsons, Assigned: pehrsons)

References

(Depends on 1 open bug, Blocks 1 open bug)

Details

Attachments

(12 files)

48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review

Without ZeroHertzAdapterMode we'll use PassthroughAdapterMode which does what it sounds like -- lets frames through 1 by 1.

With ZeroHertzAdapterMode on the other hand, which is only used for desktop capture, libwebrtc assumes the capture framerate is dynamic based on whether what is visible on screen has changed. When the capture framerate is lower than configured, for instance zero for some period of time, the ZeroHertzAdapterMode schedules re-encodings of the latest frame to ensure the receiving end receives something of good visual quality.

Imagine a bandwidth-constrained scenario. On the capture side the user changes slide. That's a lot of new information to encode. Bandwidth is low so the first encoded frame is of low visual quality. But no more frames are captured because the slide is static on the screen. This is where the ZeroHertzAdapterMode re-encodes the latest frame several times so that the visual quality gradually improves. It seems to use a heuristic based on the codec's quantization parameter to decide whether quality is good or not.

This is a prerequisite of bug 1917191.

Depends on: 1920942
Depends on: 1920972

This allows these classes to be used in StateMirroring.

Passing frameRate:min == 0 and frameRate:max > 0 to the send stream sink enables
the ZeroHertz FrameCadenceAdapter mode if we're sending screen content.

Without this we can't trigger ZeroHertzAdapterMode unless some constraints were
explicitly requested.

Depends on: 1925039
No longer depends on: 1925039
Depends on: 1925062
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: