New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable low latency mode #169
Conversation
This change enables HEVC support after rebasing to M108. HEVC related structures are always declared, but the codec is only implemented when GN arg rtc_use_h265 is enabled (macro WEBRTC_USE_H265 is defined).
* Add HEVC support for iOS/Android * Some changes for building with OWT * Enable openssl * Add create_peerconnection_factory to WebRTC.framework. (open-webrtc-toolkit#46) * Set kVTCompressionPropertyKey_RealTime to true. (open-webrtc-toolkit#51) * H265 packetization_mode setting fix (open-webrtc-toolkit#53) * add H.265 QP parsing logic (open-webrtc-toolkit#47) * Fix linux build error. (open-webrtc-toolkit#54) * Add h264 prefix NAL parser implmentation for enabling frame-marking for h.264 (open-webrtc-toolkit#58) * Make hevc rtp depacketizer/tracker conforming to h.264 design Co-authored-by: jianjunz <jianjun.zhu@intel.com> Co-authored-by: Cyril Lashkevich <notorca@gmail.com> Co-authored-by: Piasy <xz4215@gmail.com> Co-authored-by: ShiJinCheng <874042641@qq.com>
…t lower/upper bounds of bitrate for gpra (open-webrtc-toolkit#83)
* Set generic frame descriptor extension for HEVC * Enable more rtcp feedbacks for loss/reference indication
There is code to set different protection levels for keyframes vs. delta frames, but because this set_is_key_frame was never called, the distinction was never used. Also, clear old media packets from a previous frame, which can happen if a keyframe request comes from the receiver.
…-webrtc-toolkit#128) Enable flex-fec by application instead of hard-code.
This reverts commit 61912d5. This change introduced too much code in header, and some code doesn't with 108. Revert it and apply it manually later if it's needed.
a3cbef5
to
a0eef49
Compare
@@ -8,6 +8,8 @@ | |||
|
|||
import("../../../webrtc.gni") | |||
|
|||
defines = [] | |||
|
|||
config("bwe_test_logging") { | |||
if (rtc_enable_bwe_test_logging) { | |||
defines = [ "BWE_TEST_LOGGING_COMPILE_TIME_ENABLE=1" ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
defines +=
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Checked with the latest code, defines=[]
can be removed from line 11 because all paths below has defines.
pc/used_ids.h
Outdated
@@ -168,8 +168,8 @@ class UsedRtpHeaderExtensionIds : public UsedIds<webrtc::RtpExtension> { | |||
} | |||
} | |||
} | |||
RTC_DCHECK(next_extension_id_ >= min_allowed_id_); | |||
RTC_DCHECK(next_extension_id_ <= max_allowed_id_); | |||
//RTC_DCHECK(next_extension_id_ >= min_allowed_id_); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These two lines were commented out in old cg branch only. Instead of removing them, I'm recovering it in this new branch. If we still hit these DCHECK failures, let's see if we can fix it then.
https://bugs.webkit.org/show_bug.cgi?id=258794 Reviewed by Youenn Fablet. The current WebRTC HEVC is using generic packetization instead of RFC 7789 Packetization. So this is about implementing the RFC 7798 Packetization. Fix HEVC depacketizer issues. (WebKit#185) Enalbing low latency mode for RTC (WebKit#169) Enable HEVC support. (WebKit#165) Fix out-of-bounds write in H265VpsSpsPpsTracker (WebKit#163) Apply fix bitstream logic to RtpVideoStreamReceiver2 (WebKit#142) Add missing CODEC_H265 switch case (WebKit#136) Add HEVC support for iOS/Android (WebKit#68) H265 packetization_mode setting fix (WebKit#53) Add H.265 QP parsing logic (WebKit#47) This patch is extracted from following Open WebRTC Toolkit code changes: <open-webrtc-toolkit/owt-deps-webrtc#185> <open-webrtc-toolkit/owt-deps-webrtc#169> <open-webrtc-toolkit/owt-deps-webrtc#165> <open-webrtc-toolkit/owt-deps-webrtc#163> <open-webrtc-toolkit/owt-deps-webrtc#142> <open-webrtc-toolkit/owt-deps-webrtc#136> <open-webrtc-toolkit/owt-deps-webrtc#68> <open-webrtc-toolkit/owt-deps-webrtc#53> <open-webrtc-toolkit/owt-deps-webrtc#47> co-authoured by: taste1981 <jianlin.qiu@intel.com> jianjunz <jianjun.zhu@intel.com> Cyril Lashkevich <notorca@gmail.com> Piasy <xz4215@gmail.com> ShiJinCheng <874042641@qq.com> Andreas Unterhuber <andreas.unterhuber@keepinmind.info> dong-heun <63987238+dong-heun@users.noreply.github.com> * Source/ThirdParty/libwebrtc/Configurations/libwebrtc.xcconfig: * Source/ThirdParty/libwebrtc/Source/webrtc/api/video/video_codec_type.h: * Source/ThirdParty/libwebrtc/Source/webrtc/api/video_codecs/video_codec.cc: * Source/ThirdParty/libwebrtc/Source/webrtc/api/video_codecs/video_codec.h: (webrtc::VideoCodecH265::operator!= const): * Source/ThirdParty/libwebrtc/Source/webrtc/api/video_codecs/video_decoder_software_fallback_wrapper.cc: * Source/ThirdParty/libwebrtc/Source/webrtc/api/video_codecs/video_encoder.cc: * Source/ThirdParty/libwebrtc/Source/webrtc/api/video_codecs/video_encoder.h: * Source/ThirdParty/libwebrtc/Source/webrtc/call/rtp_payload_params.cc: * Source/ThirdParty/libwebrtc/Source/webrtc/common_video/h265/h265_common.cc: * Source/ThirdParty/libwebrtc/Source/webrtc/common_video/h265/h265_common.h: * Source/ThirdParty/libwebrtc/Source/webrtc/common_video/h265/h265_pps_parser.cc: * Source/ThirdParty/libwebrtc/Source/webrtc/common_video/h265/h265_pps_parser.h: * Source/ThirdParty/libwebrtc/Source/webrtc/common_video/h265/h265_sps_parser.cc: * Source/ThirdParty/libwebrtc/Source/webrtc/common_video/h265/h265_sps_parser.h: * Source/ThirdParty/libwebrtc/Source/webrtc/common_video/h265/h265_vps_parser.cc: * Source/ThirdParty/libwebrtc/Source/webrtc/common_video/h265/h265_vps_parser.h: * Source/ThirdParty/libwebrtc/Source/webrtc/logging/rtc_event_log/rtc_event_log_parser.cc: * Source/ThirdParty/libwebrtc/Source/webrtc/media/base/media_constants.cc: * Source/ThirdParty/libwebrtc/Source/webrtc/media/base/media_constants.h: * Source/ThirdParty/libwebrtc/Source/webrtc/media/engine/internal_decoder_factory.cc: * Source/ThirdParty/libwebrtc/Source/webrtc/modules/rtp_rtcp/source/create_video_rtp_depacketizer.cc: * Source/ThirdParty/libwebrtc/Source/webrtc/modules/rtp_rtcp/source/rtp_format.cc: * Source/ThirdParty/libwebrtc/Source/webrtc/modules/rtp_rtcp/source/rtp_format_h265.cc: * Source/ThirdParty/libwebrtc/Source/webrtc/modules/rtp_rtcp/source/rtp_format_h265.h: (webrtc::RtpPacketizerH265::PacketUnit::PacketUnit): (webrtc::VideoRtpDepacketizerH265::~VideoRtpDepacketizerH265): Deleted. * Source/ThirdParty/libwebrtc/Source/webrtc/modules/rtp_rtcp/source/rtp_sender_video.cc: * Source/ThirdParty/libwebrtc/Source/webrtc/modules/rtp_rtcp/source/rtp_video_header.h: * Source/ThirdParty/libwebrtc/Source/webrtc/modules/video_coding/codecs/h265/include/h265_globals.h: * Source/ThirdParty/libwebrtc/Source/webrtc/modules/video_coding/encoded_frame.cc: * Source/ThirdParty/libwebrtc/Source/webrtc/modules/video_coding/h265_vps_sps_pps_tracker.cc: * Source/ThirdParty/libwebrtc/Source/webrtc/modules/video_coding/h265_vps_sps_pps_tracker.h: * Source/ThirdParty/libwebrtc/Source/webrtc/modules/video_coding/include/video_codec_interface.h: * Source/ThirdParty/libwebrtc/Source/webrtc/modules/video_coding/packet_buffer.cc: * Source/ThirdParty/libwebrtc/Source/webrtc/rtc_base/experiments/min_video_bitrate_experiment.cc: * Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/components/video_codec/nalu_rewriter.cc: * Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/components/video_codec/nalu_rewriter.h: * Source/ThirdParty/libwebrtc/Source/webrtc/test/scenario/video_stream.cc: * Source/ThirdParty/libwebrtc/Source/webrtc/test/video_codec_settings.h: (webrtc::test::CodecSettings): * Source/ThirdParty/libwebrtc/Source/webrtc/video/config/video_encoder_config.cc: * Source/ThirdParty/libwebrtc/Source/webrtc/video/config/video_encoder_config.h: * Source/ThirdParty/libwebrtc/Source/webrtc/video/encoder_overshoot_detector.cc: * Source/ThirdParty/libwebrtc/Source/webrtc/video/rtp_video_stream_receiver2.cc: * Source/ThirdParty/libwebrtc/Source/webrtc/video/rtp_video_stream_receiver2.h: * Source/ThirdParty/libwebrtc/Source/webrtc/video/send_statistics_proxy.cc: * Source/ThirdParty/libwebrtc/Source/webrtc/video/video_stream_encoder.cc: * Source/ThirdParty/libwebrtc/libwebrtc.xcodeproj/project.pbxproj: Canonical link: https://commits.webkit.org/267677@main
https://bugs.webkit.org/show_bug.cgi?id=258794 Reviewed by Youenn Fablet. The current WebRTC HEVC is using generic packetization instead of RFC 7789 Packetization. So this is about implementing the RFC 7798 Packetization. Fix HEVC depacketizer issues. (#185) Enalbing low latency mode for RTC (#169) Enable HEVC support. (#165) Fix out-of-bounds write in H265VpsSpsPpsTracker (#163) Apply fix bitstream logic to RtpVideoStreamReceiver2 (#142) Add missing CODEC_H265 switch case (#136) Add HEVC support for iOS/Android (#68) H265 packetization_mode setting fix (#53) Add H.265 QP parsing logic (#47) This patch is extracted from following Open WebRTC Toolkit code changes: <open-webrtc-toolkit/owt-deps-webrtc#185> <open-webrtc-toolkit/owt-deps-webrtc#169> <open-webrtc-toolkit/owt-deps-webrtc#165> <open-webrtc-toolkit/owt-deps-webrtc#163> <open-webrtc-toolkit/owt-deps-webrtc#142> <open-webrtc-toolkit/owt-deps-webrtc#136> <open-webrtc-toolkit/owt-deps-webrtc#68> <open-webrtc-toolkit/owt-deps-webrtc#53> <open-webrtc-toolkit/owt-deps-webrtc#47> co-authoured by: taste1981 <jianlin.qiu@intel.com> jianjunz <jianjun.zhu@intel.com> Cyril Lashkevich <notorca@gmail.com> Piasy <xz4215@gmail.com> ShiJinCheng <874042641@qq.com> Andreas Unterhuber <andreas.unterhuber@keepinmind.info> dong-heun <63987238+dong-heun@users.noreply.github.com> * Source/ThirdParty/libwebrtc/Configurations/libwebrtc.xcconfig: * Source/ThirdParty/libwebrtc/Source/webrtc/api/video/video_codec_type.h: * Source/ThirdParty/libwebrtc/Source/webrtc/api/video_codecs/video_codec.cc: * Source/ThirdParty/libwebrtc/Source/webrtc/api/video_codecs/video_codec.h: (webrtc::VideoCodecH265::operator!= const): * Source/ThirdParty/libwebrtc/Source/webrtc/api/video_codecs/video_decoder_software_fallback_wrapper.cc: * Source/ThirdParty/libwebrtc/Source/webrtc/api/video_codecs/video_encoder.cc: * Source/ThirdParty/libwebrtc/Source/webrtc/api/video_codecs/video_encoder.h: * Source/ThirdParty/libwebrtc/Source/webrtc/call/rtp_payload_params.cc: * Source/ThirdParty/libwebrtc/Source/webrtc/common_video/h265/h265_common.cc: * Source/ThirdParty/libwebrtc/Source/webrtc/common_video/h265/h265_common.h: * Source/ThirdParty/libwebrtc/Source/webrtc/common_video/h265/h265_pps_parser.cc: * Source/ThirdParty/libwebrtc/Source/webrtc/common_video/h265/h265_pps_parser.h: * Source/ThirdParty/libwebrtc/Source/webrtc/common_video/h265/h265_sps_parser.cc: * Source/ThirdParty/libwebrtc/Source/webrtc/common_video/h265/h265_sps_parser.h: * Source/ThirdParty/libwebrtc/Source/webrtc/common_video/h265/h265_vps_parser.cc: * Source/ThirdParty/libwebrtc/Source/webrtc/common_video/h265/h265_vps_parser.h: * Source/ThirdParty/libwebrtc/Source/webrtc/logging/rtc_event_log/rtc_event_log_parser.cc: * Source/ThirdParty/libwebrtc/Source/webrtc/media/base/media_constants.cc: * Source/ThirdParty/libwebrtc/Source/webrtc/media/base/media_constants.h: * Source/ThirdParty/libwebrtc/Source/webrtc/media/engine/internal_decoder_factory.cc: * Source/ThirdParty/libwebrtc/Source/webrtc/modules/rtp_rtcp/source/create_video_rtp_depacketizer.cc: * Source/ThirdParty/libwebrtc/Source/webrtc/modules/rtp_rtcp/source/rtp_format.cc: * Source/ThirdParty/libwebrtc/Source/webrtc/modules/rtp_rtcp/source/rtp_format_h265.cc: * Source/ThirdParty/libwebrtc/Source/webrtc/modules/rtp_rtcp/source/rtp_format_h265.h: (webrtc::RtpPacketizerH265::PacketUnit::PacketUnit): (webrtc::VideoRtpDepacketizerH265::~VideoRtpDepacketizerH265): Deleted. * Source/ThirdParty/libwebrtc/Source/webrtc/modules/rtp_rtcp/source/rtp_sender_video.cc: * Source/ThirdParty/libwebrtc/Source/webrtc/modules/rtp_rtcp/source/rtp_video_header.h: * Source/ThirdParty/libwebrtc/Source/webrtc/modules/video_coding/codecs/h265/include/h265_globals.h: * Source/ThirdParty/libwebrtc/Source/webrtc/modules/video_coding/encoded_frame.cc: * Source/ThirdParty/libwebrtc/Source/webrtc/modules/video_coding/h265_vps_sps_pps_tracker.cc: * Source/ThirdParty/libwebrtc/Source/webrtc/modules/video_coding/h265_vps_sps_pps_tracker.h: * Source/ThirdParty/libwebrtc/Source/webrtc/modules/video_coding/include/video_codec_interface.h: * Source/ThirdParty/libwebrtc/Source/webrtc/modules/video_coding/packet_buffer.cc: * Source/ThirdParty/libwebrtc/Source/webrtc/rtc_base/experiments/min_video_bitrate_experiment.cc: * Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/components/video_codec/nalu_rewriter.cc: * Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/components/video_codec/nalu_rewriter.h: * Source/ThirdParty/libwebrtc/Source/webrtc/test/scenario/video_stream.cc: * Source/ThirdParty/libwebrtc/Source/webrtc/test/video_codec_settings.h: (webrtc::test::CodecSettings): * Source/ThirdParty/libwebrtc/Source/webrtc/video/config/video_encoder_config.cc: * Source/ThirdParty/libwebrtc/Source/webrtc/video/config/video_encoder_config.h: * Source/ThirdParty/libwebrtc/Source/webrtc/video/encoder_overshoot_detector.cc: * Source/ThirdParty/libwebrtc/Source/webrtc/video/rtp_video_stream_receiver2.cc: * Source/ThirdParty/libwebrtc/Source/webrtc/video/rtp_video_stream_receiver2.h: * Source/ThirdParty/libwebrtc/Source/webrtc/video/send_statistics_proxy.cc: * Source/ThirdParty/libwebrtc/Source/webrtc/video/video_stream_encoder.cc: * Source/ThirdParty/libwebrtc/libwebrtc.xcodeproj/project.pbxproj: Canonical link: https://commits.webkit.org/267677@main
https://bugs.webkit.org/show_bug.cgi?id=258794 Reviewed by Youenn Fablet. The current WebRTC HEVC is using generic packetization instead of RFC 7789 Packetization. So this is about implementing the RFC 7798 Packetization. Fix HEVC depacketizer issues. (#185) Enalbing low latency mode for RTC (#169) Enable HEVC support. (#165) Fix out-of-bounds write in H265VpsSpsPpsTracker (#163) Apply fix bitstream logic to RtpVideoStreamReceiver2 (#142) Add missing CODEC_H265 switch case (#136) Add HEVC support for iOS/Android (#68) H265 packetization_mode setting fix (#53) Add H.265 QP parsing logic (#47) This patch is extracted from following Open WebRTC Toolkit code changes: <open-webrtc-toolkit/owt-deps-webrtc#185> <open-webrtc-toolkit/owt-deps-webrtc#169> <open-webrtc-toolkit/owt-deps-webrtc#165> <open-webrtc-toolkit/owt-deps-webrtc#163> <open-webrtc-toolkit/owt-deps-webrtc#142> <open-webrtc-toolkit/owt-deps-webrtc#136> <open-webrtc-toolkit/owt-deps-webrtc#68> <open-webrtc-toolkit/owt-deps-webrtc#53> <open-webrtc-toolkit/owt-deps-webrtc#47> co-authoured by: taste1981 <jianlin.qiu@intel.com> jianjunz <jianjun.zhu@intel.com> Cyril Lashkevich <notorca@gmail.com> Piasy <xz4215@gmail.com> ShiJinCheng <874042641@qq.com> Andreas Unterhuber <andreas.unterhuber@keepinmind.info> dong-heun <63987238+dong-heun@users.noreply.github.com> * Source/ThirdParty/libwebrtc/Configurations/libwebrtc.xcconfig: * Source/ThirdParty/libwebrtc/Source/webrtc/api/video/video_codec_type.h: * Source/ThirdParty/libwebrtc/Source/webrtc/api/video_codecs/video_codec.cc: * Source/ThirdParty/libwebrtc/Source/webrtc/api/video_codecs/video_codec.h: (webrtc::VideoCodecH265::operator!= const): * Source/ThirdParty/libwebrtc/Source/webrtc/api/video_codecs/video_decoder_software_fallback_wrapper.cc: * Source/ThirdParty/libwebrtc/Source/webrtc/api/video_codecs/video_encoder.cc: * Source/ThirdParty/libwebrtc/Source/webrtc/api/video_codecs/video_encoder.h: * Source/ThirdParty/libwebrtc/Source/webrtc/call/rtp_payload_params.cc: * Source/ThirdParty/libwebrtc/Source/webrtc/common_video/h265/h265_common.cc: * Source/ThirdParty/libwebrtc/Source/webrtc/common_video/h265/h265_common.h: * Source/ThirdParty/libwebrtc/Source/webrtc/common_video/h265/h265_pps_parser.cc: * Source/ThirdParty/libwebrtc/Source/webrtc/common_video/h265/h265_pps_parser.h: * Source/ThirdParty/libwebrtc/Source/webrtc/common_video/h265/h265_sps_parser.cc: * Source/ThirdParty/libwebrtc/Source/webrtc/common_video/h265/h265_sps_parser.h: * Source/ThirdParty/libwebrtc/Source/webrtc/common_video/h265/h265_vps_parser.cc: * Source/ThirdParty/libwebrtc/Source/webrtc/common_video/h265/h265_vps_parser.h: * Source/ThirdParty/libwebrtc/Source/webrtc/logging/rtc_event_log/rtc_event_log_parser.cc: * Source/ThirdParty/libwebrtc/Source/webrtc/media/base/media_constants.cc: * Source/ThirdParty/libwebrtc/Source/webrtc/media/base/media_constants.h: * Source/ThirdParty/libwebrtc/Source/webrtc/media/engine/internal_decoder_factory.cc: * Source/ThirdParty/libwebrtc/Source/webrtc/modules/rtp_rtcp/source/create_video_rtp_depacketizer.cc: * Source/ThirdParty/libwebrtc/Source/webrtc/modules/rtp_rtcp/source/rtp_format.cc: * Source/ThirdParty/libwebrtc/Source/webrtc/modules/rtp_rtcp/source/rtp_format_h265.cc: * Source/ThirdParty/libwebrtc/Source/webrtc/modules/rtp_rtcp/source/rtp_format_h265.h: (webrtc::RtpPacketizerH265::PacketUnit::PacketUnit): (webrtc::VideoRtpDepacketizerH265::~VideoRtpDepacketizerH265): Deleted. * Source/ThirdParty/libwebrtc/Source/webrtc/modules/rtp_rtcp/source/rtp_sender_video.cc: * Source/ThirdParty/libwebrtc/Source/webrtc/modules/rtp_rtcp/source/rtp_video_header.h: * Source/ThirdParty/libwebrtc/Source/webrtc/modules/video_coding/codecs/h265/include/h265_globals.h: * Source/ThirdParty/libwebrtc/Source/webrtc/modules/video_coding/encoded_frame.cc: * Source/ThirdParty/libwebrtc/Source/webrtc/modules/video_coding/h265_vps_sps_pps_tracker.cc: * Source/ThirdParty/libwebrtc/Source/webrtc/modules/video_coding/h265_vps_sps_pps_tracker.h: * Source/ThirdParty/libwebrtc/Source/webrtc/modules/video_coding/include/video_codec_interface.h: * Source/ThirdParty/libwebrtc/Source/webrtc/modules/video_coding/packet_buffer.cc: * Source/ThirdParty/libwebrtc/Source/webrtc/rtc_base/experiments/min_video_bitrate_experiment.cc: * Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/components/video_codec/nalu_rewriter.cc: * Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/components/video_codec/nalu_rewriter.h: * Source/ThirdParty/libwebrtc/Source/webrtc/test/scenario/video_stream.cc: * Source/ThirdParty/libwebrtc/Source/webrtc/test/video_codec_settings.h: (webrtc::test::CodecSettings): * Source/ThirdParty/libwebrtc/Source/webrtc/video/config/video_encoder_config.cc: * Source/ThirdParty/libwebrtc/Source/webrtc/video/config/video_encoder_config.h: * Source/ThirdParty/libwebrtc/Source/webrtc/video/encoder_overshoot_detector.cc: * Source/ThirdParty/libwebrtc/Source/webrtc/video/rtp_video_stream_receiver2.cc: * Source/ThirdParty/libwebrtc/Source/webrtc/video/rtp_video_stream_receiver2.h: * Source/ThirdParty/libwebrtc/Source/webrtc/video/send_statistics_proxy.cc: * Source/ThirdParty/libwebrtc/Source/webrtc/video/video_stream_encoder.cc: * Source/ThirdParty/libwebrtc/libwebrtc.xcodeproj/project.pbxproj: Canonical link: https://commits.webkit.org/267677@main
This PR picks commits for low latency mode. Some changes will be submitted in separate PRs.