From 1e01660899b2fdf45ea3fdaa7adfba85c17e66e9 Mon Sep 17 00:00:00 2001 From: stefan Date: Thu, 11 Feb 2016 04:13:54 -0800 Subject: [PATCH] Add support for rtx with h264. BUG=chromium:500605,webrtc:5516 Review URL: https://codereview.webrtc.org/1689543005 Cr-Commit-Position: refs/heads/master@{#11570} --- webrtc/media/base/constants.cc | 1 + webrtc/media/base/constants.h | 1 + webrtc/media/webrtc/webrtcvideoengine2.cc | 10 +++++----- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/webrtc/media/base/constants.cc b/webrtc/media/base/constants.cc index ad34488f1f..e3158685d0 100644 --- a/webrtc/media/base/constants.cc +++ b/webrtc/media/base/constants.cc @@ -124,6 +124,7 @@ const int kDefaultUlpfecType = 117; const int kDefaultRtxVp8PlType = 96; const int kDefaultRtxVp9PlType = 97; const int kDefaultRtxRedPlType = 98; +const int kDefaultRtxH264PlType = 99; const int kDefaultVideoMaxWidth = 640; const int kDefaultVideoMaxHeight = 400; diff --git a/webrtc/media/base/constants.h b/webrtc/media/base/constants.h index 7ec1691184..e55b2d097c 100644 --- a/webrtc/media/base/constants.h +++ b/webrtc/media/base/constants.h @@ -157,6 +157,7 @@ extern const int kDefaultUlpfecType; extern const int kDefaultRtxVp8PlType; extern const int kDefaultRtxVp9PlType; extern const int kDefaultRtxRedPlType; +extern const int kDefaultRtxH264PlType; extern const int kDefaultVideoMaxWidth; extern const int kDefaultVideoMaxHeight; diff --git a/webrtc/media/webrtc/webrtcvideoengine2.cc b/webrtc/media/webrtc/webrtcvideoengine2.cc index c2b65ced27..fc22e9ccb6 100644 --- a/webrtc/media/webrtc/webrtcvideoengine2.cc +++ b/webrtc/media/webrtc/webrtcvideoengine2.cc @@ -337,19 +337,19 @@ std::vector DefaultVideoCodecList() { std::vector codecs; codecs.push_back(MakeVideoCodecWithDefaultFeedbackParams(kDefaultVp8PlType, kVp8CodecName)); + codecs.push_back( + VideoCodec::CreateRtxCodec(kDefaultRtxVp8PlType, kDefaultVp8PlType)); if (CodecIsInternallySupported(kVp9CodecName)) { codecs.push_back(MakeVideoCodecWithDefaultFeedbackParams(kDefaultVp9PlType, kVp9CodecName)); + codecs.push_back( + VideoCodec::CreateRtxCodec(kDefaultRtxVp9PlType, kDefaultVp9PlType)); } if (CodecIsInternallySupported(kH264CodecName)) { codecs.push_back(MakeVideoCodecWithDefaultFeedbackParams(kDefaultH264PlType, kH264CodecName)); - } - codecs.push_back( - VideoCodec::CreateRtxCodec(kDefaultRtxVp8PlType, kDefaultVp8PlType)); - if (CodecIsInternallySupported(kVp9CodecName)) { codecs.push_back( - VideoCodec::CreateRtxCodec(kDefaultRtxVp9PlType, kDefaultVp9PlType)); + VideoCodec::CreateRtxCodec(kDefaultRtxH264PlType, kDefaultH264PlType)); } codecs.push_back(VideoCodec(kDefaultRedPlType, kRedCodecName)); codecs.push_back(