Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(339)

Issue 2493133002: Stop using hardcoded payload types for video codecs (Closed)

Created:
4 years, 1 month ago by magjed_webrtc
Modified:
4 years, 1 month ago
CC:
webrtc-reviews_webrtc.org, interface-changes_webrtc.org, video-team_agora.io, yujie_mao (webrtc), zhengzhonghou_agora.io, stefan-webrtc, tterriberry_mozilla.com, qiang.lu, niklas.enbom, peah-webrtc, the sun, mflodman
Target Ref:
refs/pending/heads/master
Project:
webrtc
Visibility:
Public.

Description

Stop using hardcoded payload types for video codecs This CL stops using hardcoded payload types for different video codecs and will dynamically assign them payload types incrementally from 96 to 127 instead. This CL: * Replaces 'std::vector<VideoCodec> DefaultVideoCodecList()' in webrtcvideoengine2.cc with an explicit WebRtcVideoEncoderFactory for internally supported software codecs instead. The purpose is to streamline the payload type assignment in webrtcvideoengine2.cc which will now have two encoder factories of the same WebRtcVideoEncoderFactory type; one internal and one external. * Removes webrtc::VideoEncoder::EncoderType and use cricket::VideoCodec instead. * Removes 'static VideoEncoder* Create(EncoderType codec_type)' and moves the create function to the internal encoder factory instead. * Removes video_encoder.cc. webrtc::VideoEncoder is now just an interface without any static functions. * The function GetSupportedCodecs in webrtcvideoengine2.cc unifies the internal and external codecs and assigns them payload types incrementally from 96 to 127. * Updates webrtcvideoengine2_unittest.cc and removes assumptions about what payload types will be used. BUG=webrtc:6677, webrtc:6705 R=hta@webrtc.org, ossu@webrtc.org, stefan@webrtc.org Committed: https://crrev.com/42043b95872b51321f508bf255d804ce3dff366b Cr-Commit-Position: refs/heads/master@{#15135}

Patch Set 1 #

Total comments: 29

Patch Set 2 : Addressing comments. #

Total comments: 3

Patch Set 3 : Address Haralds comments #

Patch Set 4 : Fix RtxCodecAddedForExternalCodec test #

Patch Set 5 : Rebase #

Patch Set 6 : Rebase again #

Unified diffs Side-by-side diffs Delta from patch set Stats (+522 lines, -541 lines) Patch
M webrtc/api/android/jni/androidmediaencoder_jni.cc View 1 2 3 4 16 chunks +27 lines, -24 lines 0 comments Download
M webrtc/api/webrtcsdp_unittest.cc View 1 chunk +6 lines, -5 lines 0 comments Download
M webrtc/media/BUILD.gn View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
M webrtc/media/base/mediaconstants.h View 1 2 1 chunk +0 lines, -12 lines 0 comments Download
M webrtc/media/base/mediaconstants.cc View 1 2 1 chunk +0 lines, -12 lines 0 comments Download
A webrtc/media/engine/internalencoderfactory.h View 1 chunk +45 lines, -0 lines 0 comments Download
A webrtc/media/engine/internalencoderfactory.cc View 1 chunk +74 lines, -0 lines 0 comments Download
M webrtc/media/engine/payload_type_mapper.cc View 1 2 3 4 1 chunk +1 line, -24 lines 0 comments Download
M webrtc/media/engine/payload_type_mapper_unittest.cc View 1 2 3 4 1 chunk +2 lines, -22 lines 0 comments Download
M webrtc/media/engine/videoencodersoftwarefallbackwrapper.h View 1 2 3 3 chunks +3 lines, -2 lines 0 comments Download
M webrtc/media/engine/videoencodersoftwarefallbackwrapper.cc View 1 2 3 3 chunks +8 lines, -5 lines 0 comments Download
M webrtc/media/engine/videoencodersoftwarefallbackwrapper_unittest.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M webrtc/media/engine/webrtcvideoengine2.h View 1 2 chunks +2 lines, -5 lines 0 comments Download
M webrtc/media/engine/webrtcvideoengine2.cc View 1 2 7 chunks +95 lines, -136 lines 0 comments Download
M webrtc/media/engine/webrtcvideoengine2_unittest.cc View 1 2 3 69 chunks +235 lines, -188 lines 0 comments Download
M webrtc/video/BUILD.gn View 1 1 chunk +0 lines, -1 line 0 comments Download
M webrtc/video/end_to_end_tests.cc View 1 2 3 4 7 chunks +10 lines, -17 lines 0 comments Download
D webrtc/video/video_encoder.cc View 1 chunk +0 lines, -67 lines 0 comments Download
M webrtc/video/video_quality_test.cc View 1 2 3 4 5 2 chunks +6 lines, -3 lines 0 comments Download
M webrtc/video/video_send_stream_tests.cc View 1 2 3 4 3 chunks +5 lines, -4 lines 0 comments Download
M webrtc/video_encoder.h View 1 2 3 1 chunk +0 lines, -13 lines 0 comments Download

Messages

Total messages: 65 (50 generated)
magjed_webrtc
Please take a look. stefan: ownership of webrtc/video/ and webrtc/api. hta: I have moved some ...
4 years, 1 month ago (2016-11-14 08:38:43 UTC) #21
ossu
On 2016/11/14 08:38:43, magjed_webrtc wrote: > ossu: I have removed the hardcoded internal video payload ...
4 years, 1 month ago (2016-11-14 13:14:20 UTC) #22
stefan-webrtc
lg for webrtc/video https://codereview.webrtc.org/2493133002/diff/70001/webrtc/api/webrtcsdp_unittest.cc File webrtc/api/webrtcsdp_unittest.cc (right): https://codereview.webrtc.org/2493133002/diff/70001/webrtc/api/webrtcsdp_unittest.cc#newcode2090 webrtc/api/webrtcsdp_unittest.cc:2090: video_desc_->AddCodec(h264_codec); Could you explain why this ...
4 years, 1 month ago (2016-11-15 09:00:08 UTC) #23
hta-webrtc
I've got a couple of questions, so not LGTMing yet. Overall looks good. The helper ...
4 years, 1 month ago (2016-11-15 11:35:00 UTC) #24
magjed_webrtc
> These values, as well as the "dynamic" mappings for audio, are only in there ...
4 years, 1 month ago (2016-11-15 17:18:26 UTC) #34
hta-webrtc
lgtm Thanks for addressing these! https://codereview.webrtc.org/2493133002/diff/70001/webrtc/api/webrtcsdp_unittest.cc File webrtc/api/webrtcsdp_unittest.cc (right): https://codereview.webrtc.org/2493133002/diff/70001/webrtc/api/webrtcsdp_unittest.cc#newcode2087 webrtc/api/webrtcsdp_unittest.cc:2087: h264_codec.SetParam("profile-level-id", "42e01f"); On 2016/11/15 ...
4 years, 1 month ago (2016-11-15 20:36:25 UTC) #35
magjed_webrtc
https://codereview.webrtc.org/2493133002/diff/70001/webrtc/media/engine/payload_type_mapper_unittest.cc File webrtc/media/engine/payload_type_mapper_unittest.cc (right): https://codereview.webrtc.org/2493133002/diff/70001/webrtc/media/engine/payload_type_mapper_unittest.cc#newcode64 webrtc/media/engine/payload_type_mapper_unittest.cc:64: // WebRTC, with their hard coded values. On 2016/11/15 ...
4 years, 1 month ago (2016-11-16 13:44:11 UTC) #38
ossu
On 2016/11/15 17:18:26, magjed_webrtc wrote: > > These values, as well as the "dynamic" mappings ...
4 years, 1 month ago (2016-11-16 16:18:32 UTC) #41
magjed_webrtc
Stefan - ping.
4 years, 1 month ago (2016-11-17 13:19:13 UTC) #51
stefan-webrtc
lgtm
4 years, 1 month ago (2016-11-17 14:01:25 UTC) #52
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.webrtc.org/2493133002/190001
4 years, 1 month ago (2016-11-17 14:25:24 UTC) #55
commit-bot: I haz the power
Failed to apply patch for webrtc/video/video_quality_test.cc: While running git apply --index -p1; error: patch failed: ...
4 years, 1 month ago (2016-11-17 14:50:49 UTC) #57
commit-bot: I haz the power
Patchset 6 (id:??) landed as https://crrev.com/42043b95872b51321f508bf255d804ce3dff366b Cr-Commit-Position: refs/heads/master@{#15135}
4 years, 1 month ago (2016-11-17 15:08:53 UTC) #63
magjed_webrtc
Committed patchset #6 (id:210001) manually as 42043b95872b51321f508bf255d804ce3dff366b (presubmit successful).
4 years, 1 month ago (2016-11-17 15:08:54 UTC) #64
magjed_webrtc
4 years, 1 month ago (2016-11-17 16:51:40 UTC) #65
Message was sent while issue was closed.
A revert of this CL (patchset #6 id:210001) has been created in
https://codereview.webrtc.org/2513633002/ by magjed@webrtc.org.

The reason for reverting is: Breaks chromium.fyi test:
WebRtcBrowserTest.NegotiateUnsupportedVideoCodec.

Powered by Google App Engine
This is Rietveld 408576698