Add H264 bitstream rewriting to limit frame reordering marker in header
The VUI part an SPS may specify max_num_reorder_frames and
max_dec_frame_buffering. These may cause a decoder to buffer a number
of frame prior allowing decode, leading to delays, even if no frames
using such references (ie B-frames) are sent.
Because of this we update any SPS block emitted by the encoder.
Also, a bunch of refactoring of H264-related code to reduce code
duplication.
BUG=
Review-Url: https://codereview.webrtc.org/1979443004
Cr-Commit-Position: refs/heads/master@{#13010}
diff --git a/webrtc/common_video/BUILD.gn b/webrtc/common_video/BUILD.gn
index 7474974..4714606 100644
--- a/webrtc/common_video/BUILD.gn
+++ b/webrtc/common_video/BUILD.gn
@@ -18,6 +18,14 @@
source_set("common_video") {
sources = [
"bitrate_adjuster.cc",
+ "h264/h264_common.cc",
+ "h264/h264_common.h",
+ "h264/pps_parser.cc",
+ "h264/pps_parser.h",
+ "h264/sps_parser.cc",
+ "h264/sps_parser.h",
+ "h264/sps_vui_rewriter.cc",
+ "h264/sps_vui_rewriter.h",
"i420_buffer_pool.cc",
"include/bitrate_adjuster.h",
"include/frame_callback.h",