OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "media/cast/audio_sender/audio_sender.h" | 5 #include "media/cast/audio_sender/audio_sender.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "media/cast/audio_sender/audio_encoder.h" | 10 #include "media/cast/audio_sender/audio_encoder.h" |
(...skipping 15 matching lines...) Expand all Loading... |
26 rtcp_(cast_environment, | 26 rtcp_(cast_environment, |
27 this, | 27 this, |
28 transport_sender_, | 28 transport_sender_, |
29 NULL, // paced sender. | 29 NULL, // paced sender. |
30 NULL, | 30 NULL, |
31 audio_config.rtcp_mode, | 31 audio_config.rtcp_mode, |
32 base::TimeDelta::FromMilliseconds(audio_config.rtcp_interval), | 32 base::TimeDelta::FromMilliseconds(audio_config.rtcp_interval), |
33 audio_config.rtp_config.ssrc, | 33 audio_config.rtp_config.ssrc, |
34 audio_config.incoming_feedback_ssrc, | 34 audio_config.incoming_feedback_ssrc, |
35 audio_config.rtcp_c_name, | 35 audio_config.rtcp_c_name, |
36 true), | 36 AUDIO_EVENT), |
37 num_aggressive_rtcp_reports_sent_(0), | 37 num_aggressive_rtcp_reports_sent_(0), |
38 cast_initialization_cb_(STATUS_AUDIO_UNINITIALIZED), | 38 cast_initialization_cb_(STATUS_AUDIO_UNINITIALIZED), |
39 weak_factory_(this) { | 39 weak_factory_(this) { |
40 rtcp_.SetCastReceiverEventHistorySize(kReceiverRtcpEventHistorySize); | 40 rtcp_.SetCastReceiverEventHistorySize(kReceiverRtcpEventHistorySize); |
41 if (!audio_config.use_external_encoder) { | 41 if (!audio_config.use_external_encoder) { |
42 audio_encoder_.reset( | 42 audio_encoder_.reset( |
43 new AudioEncoder(cast_environment, | 43 new AudioEncoder(cast_environment, |
44 audio_config, | 44 audio_config, |
45 base::Bind(&AudioSender::SendEncodedAudioFrame, | 45 base::Bind(&AudioSender::SendEncodedAudioFrame, |
46 weak_factory_.GetWeakPtr()))); | 46 weak_factory_.GetWeakPtr()))); |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 | 151 |
152 if (!cast_feedback.missing_frames_and_packets_.empty()) { | 152 if (!cast_feedback.missing_frames_and_packets_.empty()) { |
153 ResendPackets(cast_feedback.missing_frames_and_packets_); | 153 ResendPackets(cast_feedback.missing_frames_and_packets_); |
154 } | 154 } |
155 VLOG(2) << "Received audio ACK " | 155 VLOG(2) << "Received audio ACK " |
156 << static_cast<int>(cast_feedback.ack_frame_id_); | 156 << static_cast<int>(cast_feedback.ack_frame_id_); |
157 } | 157 } |
158 | 158 |
159 } // namespace cast | 159 } // namespace cast |
160 } // namespace media | 160 } // namespace media |
OLD | NEW |