gecko-dev/dom/media/gmp-plugin-openh264
Dan Minor 9ec710cad0 Bug 1376873 - Fix fake h.264 encoder; r=pehrsons
Upstream webrtc.org has added more stringent checks for SPS and PPS identifiers.
This breaks out the SPS and PPS NALUs into separate binary blobs to ensure that
the identifiers are zero. It is also necessary to set pragma pack so that the
structure does not contain values which trick the parser into thinking a new
NALU has begun. The ENCODED_FRAME_MAGIC is changed for a similar reason. All of
the constants were determined by running mochitests with the actual h.264
encoder.

For similar reasons, this also changes things so that only IFrames are sent,
as the upstream code is now checking for previous IFrame identifiers and will
drop frames if they are not sent.

The SPS and PPS NALUs are now embedded into a single frame rather than being sent
as separate frames as was previously done. This is consistent with the real
H.264 plugin, and fixes a problem with intermittent failures due to occasionally
bad timestamps.

Differential Revision: https://phabricator.services.mozilla.com/D7447

--HG--
extra : rebase_source : 34ce1e8e5d11a346b2ccb8e8121d5526c02c9911
2018-07-16 11:50:40 -04:00
..
fakeopenh264.info
gmp-fake-openh264.cpp Bug 1376873 - Fix fake h.264 encoder; r=pehrsons 2018-07-16 11:50:40 -04:00
moz.build