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

Side by Side Diff: webrtc/modules/rtp_rtcp/source/rtp_receiver_impl.cc

Issue 1812453002: Revert of Clean away use of RtpAudioFeedback interface from RTP/RTCP receiver code. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@voe_dtmf_7
Patch Set: Created 4 years, 9 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 16 matching lines...) Expand all
27 RtpReceiver* RtpReceiver::CreateVideoReceiver( 27 RtpReceiver* RtpReceiver::CreateVideoReceiver(
28 Clock* clock, 28 Clock* clock,
29 RtpData* incoming_payload_callback, 29 RtpData* incoming_payload_callback,
30 RtpFeedback* incoming_messages_callback, 30 RtpFeedback* incoming_messages_callback,
31 RTPPayloadRegistry* rtp_payload_registry) { 31 RTPPayloadRegistry* rtp_payload_registry) {
32 if (!incoming_payload_callback) 32 if (!incoming_payload_callback)
33 incoming_payload_callback = NullObjectRtpData(); 33 incoming_payload_callback = NullObjectRtpData();
34 if (!incoming_messages_callback) 34 if (!incoming_messages_callback)
35 incoming_messages_callback = NullObjectRtpFeedback(); 35 incoming_messages_callback = NullObjectRtpFeedback();
36 return new RtpReceiverImpl( 36 return new RtpReceiverImpl(
37 clock, incoming_messages_callback, rtp_payload_registry, 37 clock, NullObjectRtpAudioFeedback(), incoming_messages_callback,
38 rtp_payload_registry,
38 RTPReceiverStrategy::CreateVideoStrategy(incoming_payload_callback)); 39 RTPReceiverStrategy::CreateVideoStrategy(incoming_payload_callback));
39 } 40 }
40 41
41 RtpReceiver* RtpReceiver::CreateAudioReceiver( 42 RtpReceiver* RtpReceiver::CreateAudioReceiver(
42 Clock* clock, 43 Clock* clock,
44 RtpAudioFeedback* incoming_audio_feedback,
43 RtpData* incoming_payload_callback, 45 RtpData* incoming_payload_callback,
44 RtpFeedback* incoming_messages_callback, 46 RtpFeedback* incoming_messages_callback,
45 RTPPayloadRegistry* rtp_payload_registry) { 47 RTPPayloadRegistry* rtp_payload_registry) {
48 if (!incoming_audio_feedback)
49 incoming_audio_feedback = NullObjectRtpAudioFeedback();
46 if (!incoming_payload_callback) 50 if (!incoming_payload_callback)
47 incoming_payload_callback = NullObjectRtpData(); 51 incoming_payload_callback = NullObjectRtpData();
48 if (!incoming_messages_callback) 52 if (!incoming_messages_callback)
49 incoming_messages_callback = NullObjectRtpFeedback(); 53 incoming_messages_callback = NullObjectRtpFeedback();
50 return new RtpReceiverImpl( 54 return new RtpReceiverImpl(
51 clock, incoming_messages_callback, rtp_payload_registry, 55 clock, incoming_audio_feedback, incoming_messages_callback,
52 RTPReceiverStrategy::CreateAudioStrategy(incoming_payload_callback)); 56 rtp_payload_registry,
57 RTPReceiverStrategy::CreateAudioStrategy(incoming_payload_callback,
58 incoming_audio_feedback));
53 } 59 }
54 60
55 RtpReceiverImpl::RtpReceiverImpl( 61 RtpReceiverImpl::RtpReceiverImpl(
56 Clock* clock, 62 Clock* clock,
63 RtpAudioFeedback* incoming_audio_messages_callback,
57 RtpFeedback* incoming_messages_callback, 64 RtpFeedback* incoming_messages_callback,
58 RTPPayloadRegistry* rtp_payload_registry, 65 RTPPayloadRegistry* rtp_payload_registry,
59 RTPReceiverStrategy* rtp_media_receiver) 66 RTPReceiverStrategy* rtp_media_receiver)
60 : clock_(clock), 67 : clock_(clock),
61 rtp_payload_registry_(rtp_payload_registry), 68 rtp_payload_registry_(rtp_payload_registry),
62 rtp_media_receiver_(rtp_media_receiver), 69 rtp_media_receiver_(rtp_media_receiver),
63 cb_rtp_feedback_(incoming_messages_callback), 70 cb_rtp_feedback_(incoming_messages_callback),
64 critical_section_rtp_receiver_( 71 critical_section_rtp_receiver_(
65 CriticalSectionWrapper::CreateCriticalSection()), 72 CriticalSectionWrapper::CreateCriticalSection()),
66 last_receive_time_(0), 73 last_receive_time_(0),
67 last_received_payload_length_(0), 74 last_received_payload_length_(0),
68 ssrc_(0), 75 ssrc_(0),
69 num_csrcs_(0), 76 num_csrcs_(0),
70 current_remote_csrc_(), 77 current_remote_csrc_(),
71 last_received_timestamp_(0), 78 last_received_timestamp_(0),
72 last_received_frame_time_ms_(-1), 79 last_received_frame_time_ms_(-1),
73 last_received_sequence_number_(0), 80 last_received_sequence_number_(0),
74 nack_method_(kNackOff) { 81 nack_method_(kNackOff) {
82 assert(incoming_audio_messages_callback);
75 assert(incoming_messages_callback); 83 assert(incoming_messages_callback);
76 84
77 memset(current_remote_csrc_, 0, sizeof(current_remote_csrc_)); 85 memset(current_remote_csrc_, 0, sizeof(current_remote_csrc_));
78 } 86 }
79 87
80 RtpReceiverImpl::~RtpReceiverImpl() { 88 RtpReceiverImpl::~RtpReceiverImpl() {
81 for (int i = 0; i < num_csrcs_; ++i) { 89 for (int i = 0; i < num_csrcs_; ++i) {
82 cb_rtp_feedback_->OnIncomingCSRCChanged(current_remote_csrc_[i], false); 90 cb_rtp_feedback_->OnIncomingCSRCChanged(current_remote_csrc_[i], false);
83 } 91 }
84 } 92 }
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after
470 // implementations might have CSRC 0 as a valid value. 478 // implementations might have CSRC 0 as a valid value.
471 if (num_csrcs_diff > 0) { 479 if (num_csrcs_diff > 0) {
472 cb_rtp_feedback_->OnIncomingCSRCChanged(0, true); 480 cb_rtp_feedback_->OnIncomingCSRCChanged(0, true);
473 } else if (num_csrcs_diff < 0) { 481 } else if (num_csrcs_diff < 0) {
474 cb_rtp_feedback_->OnIncomingCSRCChanged(0, false); 482 cb_rtp_feedback_->OnIncomingCSRCChanged(0, false);
475 } 483 }
476 } 484 }
477 } 485 }
478 486
479 } // namespace webrtc 487 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/rtp_receiver_impl.h ('k') | webrtc/modules/rtp_rtcp/source/rtp_receiver_strategy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698