Reduces locking in RtpSenderVideo.
This CL removes some unnecessary locking, since we are already serialized by the lock in VideoStreamEncoder. A simple RaceChecker is used to verify this. We also remove the usage of RegisterPayloadType() and replace it with a parameter in SendVideo instead. This way we are prepared for removing the payload type map and lock entirely. Some usage still exists downstream and needs to be removed before cleaning this up. Bug: webrtc:10809 Change-Id: Ie90163f15d11c8843f3beaf9a0df0dd2a1fd5ce6 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/154700 Reviewed-by: Niels Moller <nisse@webrtc.org> Commit-Queue: Erik Språng <sprang@webrtc.org> Cr-Commit-Position: refs/heads/master@{#29372}
This commit is contained in:
@ -186,8 +186,6 @@ class RtpRtcpImplTest : public ::testing::Test {
|
||||
codec_.plType = 100;
|
||||
codec_.width = 320;
|
||||
codec_.height = 180;
|
||||
sender_video_->RegisterPayloadType(codec_.plType, "VP8",
|
||||
/*raw_payload=*/false);
|
||||
|
||||
// Receive module.
|
||||
EXPECT_EQ(0, receiver_.impl_->SetSendingStatus(false));
|
||||
@ -224,8 +222,9 @@ class RtpRtcpImplTest : public ::testing::Test {
|
||||
const uint8_t payload[100] = {0};
|
||||
EXPECT_TRUE(module->impl_->OnSendingRtpFrame(0, 0, codec_.plType, true));
|
||||
EXPECT_TRUE(sender->SendVideo(VideoFrameType::kVideoFrameKey, codec_.plType,
|
||||
0, 0, payload, sizeof(payload), nullptr,
|
||||
&rtp_video_header, 0));
|
||||
VideoCodecType::kVideoCodecVP8, 0, 0, payload,
|
||||
sizeof(payload), nullptr, &rtp_video_header,
|
||||
0));
|
||||
}
|
||||
|
||||
void IncomingRtcpNack(const RtpRtcpModule* module, uint16_t sequence_number) {
|
||||
|
Reference in New Issue
Block a user