Closed Bug 1821803 Opened 2 years ago Closed 2 years ago

[wmfme] fix issues for connecting CDM to the media engine

Categories

(Core :: Audio/Video: Playback, task, P2)

task

Tracking

()

RESOLVED FIXED
113 Branch
Tracking Status
firefox113 --- fixed

People

(Reporter: alwu, Assigned: alwu)

References

(Blocks 1 open bug)

Details

Attachments

(4 files)

MFMediaEngineStream::IsEncrypted() didn't return the correct result, because we didn't serialize the crypto information. This bug will fix some issues related with that.

This patch makes MFMediaEngineStream::IsEncrypted() return correct
result by checking the serialized crypto information.

Once we set the media source to the media engine, if it's an encrypted
content, MFMediaSource::GetInputTrustAuthority will be called by the
media engine.

There is no return code [1] indicating the CDM proxy would be set later,
so we can't set the source too early. Otherwise, media engine would
treat an encrypted content as a clear content, which results in errors.

[1]
https://learn.microsoft.com/en-us/windows/win32/api/mfidl/nf-mfidl-imftrustedinput-getinputtrustauthority

Depends on D172486

The ctor for the nsTArray only sets the capacity, not size, so we need
to set it explicitly.

Depends on D172487

Summary: [wmfme] fix incorrect result for MFMediaEngineStream::IsEncrypted() → [wmfme] fix issues for connecting CDM to the media engine
Attachment #9322840 - Attachment description: WIP: Bug 1821803 - part1 : serialize crypto info over IPC. → Bug 1821803 - part1 : serialize crypto info over IPC.
Attachment #9322841 - Attachment description: WIP: Bug 1821803 - part2 : for encrypted content, set the media source after ensuring the cdm proxy. → Bug 1821803 - part2 : for encrypted content, set the media source after ensuring the cdm proxy.
Attachment #9322842 - Attachment description: WIP: Bug 1821803 - part3 : set size on the streamBlob. → Bug 1821803 - part3 : set size on the streamBlob.
Attachment #9322843 - Attachment description: WIP: Bug 1821803 - part4 : prevent setting CDM before the engine initialization. → Bug 1821803 - part4 : prevent setting CDM before the engine initialization.
Pushed by alwu@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/14892860eaee part1 : serialize crypto info over IPC. r=jolin https://hg.mozilla.org/integration/autoland/rev/a2ddd3db75c2 part2 : for encrypted content, set the media source after ensuring the cdm proxy. r=jolin https://hg.mozilla.org/integration/autoland/rev/ec91bc6abbd4 part3 : set size on the streamBlob. r=jolin https://hg.mozilla.org/integration/autoland/rev/75db8a0db46f part4 : prevent setting CDM before the engine initialization. r=jolin

Backed out 4 changesets (Bug 1821803) for build bustages on MFMediaEngineParent.cpp.
Backout link
Push with failures <--> B
Failure Log

Flags: needinfo?(alwu)

Try result looks good.

Flags: needinfo?(alwu)
Pushed by alwu@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/33243f7459b8 part1 : serialize crypto info over IPC. r=jolin https://hg.mozilla.org/integration/autoland/rev/e30242a2764c part2 : for encrypted content, set the media source after ensuring the cdm proxy. r=jolin https://hg.mozilla.org/integration/autoland/rev/05ff31b997f9 part3 : set size on the streamBlob. r=jolin https://hg.mozilla.org/integration/autoland/rev/51fc535f06ec part4 : prevent setting CDM before the engine initialization. r=jolin
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: