Skip to content

Enable media task queue priorities by default on m150 - #342

Open
xianshijing-lk wants to merge 1 commit into
m150_releasefrom
fix/m150-media-task-queue-priorities
Open

xianshijing-lk wants to merge 1 commit into
m150_releasefrom
fix/m150-media-task-queue-priorities

Conversation

@xianshijing-lk

Copy link
Copy Markdown

Windows VP8 publishing can stall under CPU contention because libvpx worker threads run above normal priority while the calling VideoEncoderQueue runs at normal priority. Workers waiting for progress can starve the calling thread, particularly when the process is pinned to one core. See livekit/rust-sdks#1694.

Backport upstream https://webrtc.googlesource.com/src/+/af859639f9f4de19773c3ea972aebbb68dad8bb8 to m150_release: replace the five MediaTaskQueuePriorities IsEnabled checks with !IsDisabled. Audio encoding uses kAudio, and video encoding, decoding, rendering, and frame transformation use kVideo by default on all platforms. Existing platform mappings are unchanged. WebRTC-MediaTaskQueuePriorities/Disabled/ preserves the previous priorities as an opt-out.

Enable this across platforms to match upstream behavior rather than introduce a Windows-only policy. This also changes the audio queue defaults; the confirmed stall report concerns Windows VP8, and cross-platform runtime validation remains necessary.

Validation: clang-format checks on changed lines and git diff --check passed. Reviewed the five replacements against the upstream patch. No full build or runtime testing was run: this standalone checkout has no build dependencies or output directory. Windows VP8 single-core reproduction and audio/video smoke tests on supported platforms remain to be run.

SDK consumers will need rebuilt WebRTC artifacts and a dependency bump to receive this change.

Backport upstream af859639f9f4de19773c3ea972aebbb68dad8bb8 to use the platform-specific audio and video task queue priorities by default. Retain WebRTC-MediaTaskQueuePriorities/Disabled/ as an opt-out.

Addresses Windows VP8 encoder stalls under CPU contention reported in livekit/rust-sdks#1694.

@cloudwebrtc cloudwebrtc left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants