Open Bug 2066951 Opened 2 months ago Updated 2 months ago

MediaDecoder doesn't tag rotated frames for DecodedStream/VideoDecoder (WebCodecs) consumers

Categories

(Core :: Audio/Video, enhancement)

enhancement

Tracking

()

People

(Reporter: dbaker, Unassigned)

References

Details

Currently only the WebRTC-receive path added in Bug 1340372 (and the fake-camera test-only path) ever populate VideoChunk::mRotation. Decoded file media never does:

  • DecodedStreamData::WriteVideoToSegment() calls aOutput->AppendFrame() with no rotation argument, so container-signalled rotation (e.g. an MP4 tkhd matrix) never reaches VideoChunk::mRotation for a MediaStream sourced from captureStream()/mozCaptureStream() on a rotated <video>.
  • WebCodecs' VideoDecoder's CreateVideoFrame() builds the output dom::VideoFrame from VideoData's image/display size only -- there's no rotation field anywhere in VideoFrame.h/VideoFrame.webidl/WebCodecsUtils.h to carry it even if it were read. This overlaps with the already-tracked upstream WebCodecs rotation work (Bug 1995151, Bug 1995191, Bug 1995193), which should be linked here rather than duplicated.

See Also: Bug 1340372, Bug 1995151, Bug 1995191, Bug 1995193.

You need to log in before you can comment on or make changes to this bug.