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

Unified Diff: webrtc/voice_engine/channel.cc

Issue 2672583002: Remove VoEVideoSync interface. (Closed)
Patch Set: rebase Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/voice_engine/channel.h ('k') | webrtc/voice_engine/channel_proxy.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/voice_engine/channel.cc
diff --git a/webrtc/voice_engine/channel.cc b/webrtc/voice_engine/channel.cc
index d69654fb0f2451f1a5e49564f63ef90a32056aff..006e3db69bf55d754eec187c52793b4a5f66e54c 100644
--- a/webrtc/voice_engine/channel.cc
+++ b/webrtc/voice_engine/channel.cc
@@ -1150,16 +1150,16 @@ int32_t Channel::StopPlayout() {
int32_t Channel::StartSend() {
WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId, _channelId),
"Channel::StartSend()");
- // Resume the previous sequence number which was reset by StopSend().
- // This needs to be done before |sending| is set to true.
- if (send_sequence_number_)
- SetInitSequenceNumber(send_sequence_number_);
-
if (channel_state_.Get().sending) {
return 0;
}
channel_state_.SetSending(true);
+ // Resume the previous sequence number which was reset by StopSend(). This
+ // needs to be done before |sending| is set to true on the RTP/RTCP module.
+ if (send_sequence_number_) {
+ _rtpRtcpModule->SetSequenceNumber(send_sequence_number_);
+ }
_rtpRtcpModule->SetSendingMediaStatus(true);
if (_rtpRtcpModule->SetSendingStatus(true) != 0) {
_engineStatisticsPtr->SetLastError(
@@ -2740,23 +2740,9 @@ void Channel::GetDecodingCallStatistics(AudioDecodingCallStats* stats) const {
audio_coding_->GetDecodingCallStatistics(stats);
}
-bool Channel::GetDelayEstimate(int* jitter_buffer_delay_ms,
- int* playout_buffer_delay_ms) const {
- rtc::CritScope lock(&video_sync_lock_);
- *jitter_buffer_delay_ms = audio_coding_->FilteredCurrentDelayMs();
- *playout_buffer_delay_ms = playout_delay_ms_;
- return true;
-}
-
uint32_t Channel::GetDelayEstimate() const {
- int jitter_buffer_delay_ms = 0;
- int playout_buffer_delay_ms = 0;
- GetDelayEstimate(&jitter_buffer_delay_ms, &playout_buffer_delay_ms);
- return jitter_buffer_delay_ms + playout_buffer_delay_ms;
-}
-
-int Channel::LeastRequiredDelayMs() const {
- return audio_coding_->LeastRequiredDelayMs();
+ rtc::CritScope lock(&video_sync_lock_);
+ return audio_coding_->FilteredCurrentDelayMs() + playout_delay_ms_;
}
int Channel::SetMinimumPlayoutDelay(int delayMs) {
@@ -2794,30 +2780,6 @@ int Channel::GetPlayoutTimestamp(unsigned int& timestamp) {
return 0;
}
-int Channel::SetInitTimestamp(unsigned int timestamp) {
- WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId, _channelId),
- "Channel::SetInitTimestamp()");
- if (channel_state_.Get().sending) {
- _engineStatisticsPtr->SetLastError(VE_SENDING, kTraceError,
- "SetInitTimestamp() already sending");
- return -1;
- }
- _rtpRtcpModule->SetStartTimestamp(timestamp);
- return 0;
-}
-
-int Channel::SetInitSequenceNumber(short sequenceNumber) {
- WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId, _channelId),
- "Channel::SetInitSequenceNumber()");
- if (channel_state_.Get().sending) {
- _engineStatisticsPtr->SetLastError(
- VE_SENDING, kTraceError, "SetInitSequenceNumber() already sending");
- return -1;
- }
- _rtpRtcpModule->SetSequenceNumber(sequenceNumber);
- return 0;
-}
-
int Channel::GetRtpRtcp(RtpRtcp** rtpRtcpModule,
RtpReceiver** rtp_receiver) const {
*rtpRtcpModule = _rtpRtcpModule.get();
« no previous file with comments | « webrtc/voice_engine/channel.h ('k') | webrtc/voice_engine/channel_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698