Closed Bug 1833207 Opened 2 years ago Closed 2 years ago

Load dmabuf modifiers from off main thread

Categories

(Core :: Audio/Video: Web Codecs, defect, P1)

defect

Tracking

()

RESOLVED FIXED
115 Branch
Tracking Status
firefox-esr102 --- unaffected
firefox113 --- unaffected
firefox114 --- unaffected
firefox115 --- fixed

People

(Reporter: chunmin, Assigned: stransky)

References

(Blocks 1 open bug, Regression)

Details

(Keywords: regression)

Attachments

(1 file)

DMABufDevice::LoadFormatModifiers() requires to be called on main thread , which implicitly implies FFmpegVideoDecoder::Init() needs to be run on the main thread as well since DMABufDevice::LoadFormatModifiers() will be called via the following path:

  1. FFmpegVideoDecoder::Init()
  2. FFmpegVideoDecoder::InitVAAPIDecoder() // MOZ_WAYLAND_USE_VAAPI
  3. FFmpegVideoDecoder::CreateVAAPIDeviceContext()
  4. widget::GetDMABufDevice()
  5. widget::DMABufDevice::Configure()
  6. widget::DMABufDevice::LoadFormatModifiers()

However, FFmpegVideoDecoder::Init() can be called on a non-main thread in some cases. For example, in WebCodecs, the media decoder is going to be exposed to both the main thread and the worker thread. This means either MediaDataDecoder works on the main thread or worker thread, or MediaDataDecoder works in a dedicated task queue (off-main thread) that is operated by the main thread and worker thread, depending on the implementation of VideoDecoder interface.

Hey :stransky, do you have idea how to make DMABufDevice::LoadFormatModifiers() work off main thread?

Flags: needinfo?(stransky)

Set release status flags based on info from the regressing bug 1830162

(In reply to C.M.Chang[:chunmin] from comment #1)

Hey :stransky, do you have idea how to make DMABufDevice::LoadFormatModifiers() work off main thread?

Yes, will look at it. We need to run it on main thread on parent process only where dmabuf modifiers are loaded from wayland compositor.

Flags: needinfo?(stransky)
Assignee: nobody → stransky
Status: NEW → ASSIGNED
Pushed by stransky@redhat.com: https://hg.mozilla.org/integration/autoland/rev/9345307f5a06 [Wayland] Request to load dmabuf modifiers on main thread for parent process only r=emilio
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 115 Branch
Component: Audio/Video → Audio/Video: Web Codecs
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: