Closed Bug 1896758 Opened 28 days ago Closed 15 days ago

Implement a VideoEncoder by GMP APIs

Categories

(Core :: Audio/Video: Web Codecs, task, P3)

task

Tracking

()

RESOLVED FIXED
128 Branch
Tracking Status
firefox128 --- fixed

People

(Reporter: chunmin, Assigned: aosmond)

References

(Blocks 1 open bug)

Details

Attachments

(7 files)

To have to SW H264 encoder outside of WebRTC usages if user has no platform-encoder-support/FFmpeg/libx264/libopenh264 installation, we should implement a MediaDataEncoder by GMP APIs, something like WebrtcGmpVideoEncoder for WebRTC cases (by GMPVideoEncoderProxy).

See Also: → 1895582
Severity: -- → N/A
Priority: -- → P3
Assignee: cchang → aosmond

This patch makes MediaDataEncoder declare its refcounting as virtual.
This will allow a future patch in this series to add subclasses that
have multiple superclasses using refcounting.

This patch adds a new class, MediaDataEncoderProxy, that is the
equivalent of MediaDataDecoderProxy for encoders. It allows using
encoders that must be accessed on a particular thread. It will be used
by a later patch in this series.

This patch moves a method used to determine if one is on the GMP thread
from a static method for GMPVideoDecoder into GMPUtils. This allows for
sharing it between the decoder and encoder implementations. It also
ensures we can pack/unpack the latest GMPVideoCodec structure which has
parameters relevant for encoding.

This patch carves out the code in the GMP encoder wrapper in WebRTC that
modifies encoded OpenH264 frames to be acceptable for WebRTC.

Attachment #9403964 - Attachment description: Bug 1896758 - Part 5. Implement GMPVideoEncoder as a subclass of MediaDataEncoder. → Bug 1896758 - Part 6. Implement GMPVideoEncoder as a subclass of MediaDataEncoder.
Attachment #9403965 - Attachment description: Bug 1896758 - Part 6. Plumb GMP video encoding into the PlatformEncoderModule framework. → Bug 1896758 - Part 7. Plumb GMP video encoding into the PlatformEncoderModule framework.
Pushed by aosmond@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/d35fe1a37020
Part 1. Make MediaDataEncoder refcounting virtual. r=media-playback-reviewers,padenot
https://hg.mozilla.org/integration/autoland/rev/ee8a31fcc5d7
Part 2. Add MediaDataEncoderProxy to wrap encoders that run on a particular thread. r=media-playback-reviewers,padenot
https://hg.mozilla.org/integration/autoland/rev/a34c0bfdb429
Part 3. Add min/max bitrate to EncoderConfig. r=media-playback-reviewers,padenot
https://hg.mozilla.org/integration/autoland/rev/0e961f2d98b3
Part 4. Expose more GMP parameters/methods for/to encoders. r=media-playback-reviewers,padenot
https://hg.mozilla.org/integration/autoland/rev/c902b3cc68c7
Part 5. Expose method to massage encoded OpenH264 frames for WebRTC. r=media-playback-reviewers,padenot
https://hg.mozilla.org/integration/autoland/rev/60d43ceb8a2c
Part 6. Implement GMPVideoEncoder as a subclass of MediaDataEncoder. r=media-playback-reviewers,padenot
https://hg.mozilla.org/integration/autoland/rev/c5f3a49a9e44
Part 7. Plumb GMP video encoding into the PlatformEncoderModule framework. r=media-playback-reviewers,padenot
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: