Remove media_has_been_sent from RtpState.

The field is unused and the way it's currently laid out in the code,
it maps to a state in the RtpSenderEgress class - which in turn puts
unnecessary threading restrictions on that class.

Bug: webrtc:11581
Change-Id: I41a4740c3277317f33f8e815d8c12c70b355c1db
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/177426
Commit-Queue: Tommi <tommi@webrtc.org>
Reviewed-by: Magnus Flodman <mflodman@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31577}
This commit is contained in:
Tomas Gunnarsson
2020-06-27 18:02:39 +02:00
committed by Commit Bot
parent f4b956c026
commit d21f7ab174
4 changed files with 0 additions and 7 deletions

View File

@ -326,7 +326,6 @@ TEST(CallTest, RecreatingAudioStreamWithSameSsrcReusesRtpState) {
EXPECT_EQ(rtp_state1.capture_time_ms, rtp_state2.capture_time_ms);
EXPECT_EQ(rtp_state1.last_timestamp_time_ms,
rtp_state2.last_timestamp_time_ms);
EXPECT_EQ(rtp_state1.media_has_been_sent, rtp_state2.media_has_been_sent);
}
}

View File

@ -156,14 +156,12 @@ struct RtpState {
timestamp(0),
capture_time_ms(-1),
last_timestamp_time_ms(-1),
media_has_been_sent(false),
ssrc_has_acked(false) {}
uint16_t sequence_number;
uint32_t start_timestamp;
uint32_t timestamp;
int64_t capture_time_ms;
int64_t last_timestamp_time_ms;
bool media_has_been_sent;
bool ssrc_has_acked;
};

View File

@ -258,7 +258,6 @@ void ModuleRtpRtcpImpl::SetSequenceNumber(const uint16_t seq_num) {
void ModuleRtpRtcpImpl::SetRtpState(const RtpState& rtp_state) {
rtp_sender_->packet_generator.SetRtpState(rtp_state);
rtp_sender_->packet_sender.SetMediaHasBeenSent(rtp_state.media_has_been_sent);
rtcp_sender_.SetTimestampOffset(rtp_state.start_timestamp);
}
@ -268,7 +267,6 @@ void ModuleRtpRtcpImpl::SetRtxState(const RtpState& rtp_state) {
RtpState ModuleRtpRtcpImpl::GetRtpState() const {
RtpState state = rtp_sender_->packet_generator.GetRtpState();
state.media_has_been_sent = rtp_sender_->packet_sender.MediaHasBeenSent();
return state;
}

View File

@ -251,7 +251,6 @@ void ModuleRtpRtcpImpl2::SetSequenceNumber(const uint16_t seq_num) {
void ModuleRtpRtcpImpl2::SetRtpState(const RtpState& rtp_state) {
rtp_sender_->packet_generator.SetRtpState(rtp_state);
rtp_sender_->packet_sender.SetMediaHasBeenSent(rtp_state.media_has_been_sent);
rtcp_sender_.SetTimestampOffset(rtp_state.start_timestamp);
}
@ -261,7 +260,6 @@ void ModuleRtpRtcpImpl2::SetRtxState(const RtpState& rtp_state) {
RtpState ModuleRtpRtcpImpl2::GetRtpState() const {
RtpState state = rtp_sender_->packet_generator.GetRtpState();
state.media_has_been_sent = rtp_sender_->packet_sender.MediaHasBeenSent();
return state;
}