| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/sender/audio_sender.h" | 5 #include "media/cast/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/cast_defines.h" | 10 #include "media/cast/cast_defines.h" |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 weak_factory_.GetWeakPtr()))); | 67 weak_factory_.GetWeakPtr()))); |
| 68 cast_initialization_status_ = audio_encoder_->InitializationResult(); | 68 cast_initialization_status_ = audio_encoder_->InitializationResult(); |
| 69 } else { | 69 } else { |
| 70 NOTREACHED(); // No support for external audio encoding. | 70 NOTREACHED(); // No support for external audio encoding. |
| 71 cast_initialization_status_ = STATUS_AUDIO_UNINITIALIZED; | 71 cast_initialization_status_ = STATUS_AUDIO_UNINITIALIZED; |
| 72 } | 72 } |
| 73 | 73 |
| 74 media::cast::CastTransportRtpConfig transport_config; | 74 media::cast::CastTransportRtpConfig transport_config; |
| 75 transport_config.ssrc = audio_config.ssrc; | 75 transport_config.ssrc = audio_config.ssrc; |
| 76 transport_config.feedback_ssrc = audio_config.incoming_feedback_ssrc; | 76 transport_config.feedback_ssrc = audio_config.incoming_feedback_ssrc; |
| 77 transport_config.c_name = audio_config.rtcp_c_name; | |
| 78 transport_config.rtp_payload_type = audio_config.rtp_payload_type; | 77 transport_config.rtp_payload_type = audio_config.rtp_payload_type; |
| 79 // TODO(miu): AudioSender needs to be like VideoSender in providing an upper | 78 // TODO(miu): AudioSender needs to be like VideoSender in providing an upper |
| 80 // limit on the number of in-flight frames. | 79 // limit on the number of in-flight frames. |
| 81 transport_config.stored_frames = max_unacked_frames_; | 80 transport_config.stored_frames = max_unacked_frames_; |
| 82 transport_config.aes_key = audio_config.aes_key; | 81 transport_config.aes_key = audio_config.aes_key; |
| 83 transport_config.aes_iv_mask = audio_config.aes_iv_mask; | 82 transport_config.aes_iv_mask = audio_config.aes_iv_mask; |
| 84 | 83 |
| 85 transport_sender->InitializeAudio( | 84 transport_sender->InitializeAudio( |
| 86 transport_config, | 85 transport_config, |
| 87 base::Bind(&AudioSender::OnReceivedCastFeedback, | 86 base::Bind(&AudioSender::OnReceivedCastFeedback, |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 286 last_send_time_ = cast_environment_->Clock()->NowTicks(); | 285 last_send_time_ = cast_environment_->Clock()->NowTicks(); |
| 287 | 286 |
| 288 // Sending this extra packet is to kick-start the session. There is | 287 // Sending this extra packet is to kick-start the session. There is |
| 289 // no need to optimize re-transmission for this case. | 288 // no need to optimize re-transmission for this case. |
| 290 transport_sender_->ResendPackets( | 289 transport_sender_->ResendPackets( |
| 291 true, missing_frames_and_packets, false, min_rtt_); | 290 true, missing_frames_and_packets, false, min_rtt_); |
| 292 } | 291 } |
| 293 | 292 |
| 294 } // namespace cast | 293 } // namespace cast |
| 295 } // namespace media | 294 } // namespace media |
| OLD | NEW |