| 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/video_sender.h" | 5 #include "media/cast/sender/video_sender.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <cstring> | 8 #include <cstring> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 create_video_encode_mem_cb)); | 61 create_video_encode_mem_cb)); |
| 62 } else { | 62 } else { |
| 63 video_encoder_.reset(new VideoEncoderImpl( | 63 video_encoder_.reset(new VideoEncoderImpl( |
| 64 cast_environment, video_config, max_unacked_frames_)); | 64 cast_environment, video_config, max_unacked_frames_)); |
| 65 } | 65 } |
| 66 cast_initialization_status_ = STATUS_VIDEO_INITIALIZED; | 66 cast_initialization_status_ = STATUS_VIDEO_INITIALIZED; |
| 67 | 67 |
| 68 media::cast::CastTransportRtpConfig transport_config; | 68 media::cast::CastTransportRtpConfig transport_config; |
| 69 transport_config.ssrc = video_config.ssrc; | 69 transport_config.ssrc = video_config.ssrc; |
| 70 transport_config.feedback_ssrc = video_config.incoming_feedback_ssrc; | 70 transport_config.feedback_ssrc = video_config.incoming_feedback_ssrc; |
| 71 transport_config.c_name = video_config.rtcp_c_name; | |
| 72 transport_config.rtp_payload_type = video_config.rtp_payload_type; | 71 transport_config.rtp_payload_type = video_config.rtp_payload_type; |
| 73 transport_config.stored_frames = max_unacked_frames_; | 72 transport_config.stored_frames = max_unacked_frames_; |
| 74 transport_config.aes_key = video_config.aes_key; | 73 transport_config.aes_key = video_config.aes_key; |
| 75 transport_config.aes_iv_mask = video_config.aes_iv_mask; | 74 transport_config.aes_iv_mask = video_config.aes_iv_mask; |
| 76 | 75 |
| 77 transport_sender->InitializeVideo( | 76 transport_sender->InitializeVideo( |
| 78 transport_config, | 77 transport_config, |
| 79 base::Bind(&VideoSender::OnReceivedCastFeedback, | 78 base::Bind(&VideoSender::OnReceivedCastFeedback, |
| 80 weak_factory_.GetWeakPtr()), | 79 weak_factory_.GetWeakPtr()), |
| 81 base::Bind(&VideoSender::OnReceivedRtt, weak_factory_.GetWeakPtr())); | 80 base::Bind(&VideoSender::OnReceivedRtt, weak_factory_.GetWeakPtr())); |
| (...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 349 last_send_time_ = cast_environment_->Clock()->NowTicks(); | 348 last_send_time_ = cast_environment_->Clock()->NowTicks(); |
| 350 | 349 |
| 351 // Sending this extra packet is to kick-start the session. There is | 350 // Sending this extra packet is to kick-start the session. There is |
| 352 // no need to optimize re-transmission for this case. | 351 // no need to optimize re-transmission for this case. |
| 353 transport_sender_->ResendPackets(false, missing_frames_and_packets, | 352 transport_sender_->ResendPackets(false, missing_frames_and_packets, |
| 354 false, rtt_); | 353 false, rtt_); |
| 355 } | 354 } |
| 356 | 355 |
| 357 } // namespace cast | 356 } // namespace cast |
| 358 } // namespace media | 357 } // namespace media |
| OLD | NEW |