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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 rtcp_feedback_(new LocalRtcpAudioSenderFeedback(this)), | 45 rtcp_feedback_(new LocalRtcpAudioSenderFeedback(this)), |
46 rtcp_(cast_environment, | 46 rtcp_(cast_environment, |
47 rtcp_feedback_.get(), | 47 rtcp_feedback_.get(), |
48 transport_sender_, | 48 transport_sender_, |
49 NULL, // paced sender. | 49 NULL, // paced sender. |
50 NULL, | 50 NULL, |
51 audio_config.rtcp_mode, | 51 audio_config.rtcp_mode, |
52 base::TimeDelta::FromMilliseconds(audio_config.rtcp_interval), | 52 base::TimeDelta::FromMilliseconds(audio_config.rtcp_interval), |
53 audio_config.rtp_config.ssrc, | 53 audio_config.rtp_config.ssrc, |
54 audio_config.incoming_feedback_ssrc, | 54 audio_config.incoming_feedback_ssrc, |
55 audio_config.rtcp_c_name), | 55 audio_config.rtcp_c_name, |
| 56 true), |
56 timers_initialized_(false), | 57 timers_initialized_(false), |
57 cast_initialization_cb_(STATUS_AUDIO_UNINITIALIZED), | 58 cast_initialization_cb_(STATUS_AUDIO_UNINITIALIZED), |
58 weak_factory_(this) { | 59 weak_factory_(this) { |
59 rtcp_.SetCastReceiverEventHistorySize(kReceiverRtcpEventHistorySize); | 60 rtcp_.SetCastReceiverEventHistorySize(kReceiverRtcpEventHistorySize); |
60 if (!audio_config.use_external_encoder) { | 61 if (!audio_config.use_external_encoder) { |
61 audio_encoder_.reset( | 62 audio_encoder_.reset( |
62 new AudioEncoder(cast_environment, | 63 new AudioEncoder(cast_environment, |
63 audio_config, | 64 audio_config, |
64 base::Bind(&AudioSender::SendEncodedAudioFrame, | 65 base::Bind(&AudioSender::SendEncodedAudioFrame, |
65 weak_factory_.GetWeakPtr()))); | 66 weak_factory_.GetWeakPtr()))); |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 // We don't send audio logging messages since all captured audio frames will | 143 // We don't send audio logging messages since all captured audio frames will |
143 // be sent. | 144 // be sent. |
144 transport::RtcpSenderLogMessage empty_msg; | 145 transport::RtcpSenderLogMessage empty_msg; |
145 rtp_stats_.UpdateInfo(cast_environment_->Clock()->NowTicks()); | 146 rtp_stats_.UpdateInfo(cast_environment_->Clock()->NowTicks()); |
146 rtcp_.SendRtcpFromRtpSender(empty_msg, rtp_stats_.sender_info()); | 147 rtcp_.SendRtcpFromRtpSender(empty_msg, rtp_stats_.sender_info()); |
147 ScheduleNextRtcpReport(); | 148 ScheduleNextRtcpReport(); |
148 } | 149 } |
149 | 150 |
150 } // namespace cast | 151 } // namespace cast |
151 } // namespace media | 152 } // namespace media |
OLD | NEW |