| 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/video_sender/video_sender.h" | 5 #include "media/cast/video_sender/video_sender.h" |
| 6 | 6 |
| 7 #include <cstring> | 7 #include <cstring> |
| 8 #include <list> | 8 #include <list> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 new Rtcp(cast_environment_, | 78 new Rtcp(cast_environment_, |
| 79 this, | 79 this, |
| 80 transport_sender_, | 80 transport_sender_, |
| 81 NULL, // paced sender. | 81 NULL, // paced sender. |
| 82 NULL, | 82 NULL, |
| 83 video_config.rtcp_mode, | 83 video_config.rtcp_mode, |
| 84 base::TimeDelta::FromMilliseconds(video_config.rtcp_interval), | 84 base::TimeDelta::FromMilliseconds(video_config.rtcp_interval), |
| 85 video_config.rtp_config.ssrc, | 85 video_config.rtp_config.ssrc, |
| 86 video_config.incoming_feedback_ssrc, | 86 video_config.incoming_feedback_ssrc, |
| 87 video_config.rtcp_c_name, | 87 video_config.rtcp_c_name, |
| 88 false)); | 88 VIDEO_EVENT)); |
| 89 rtcp_->SetCastReceiverEventHistorySize(kReceiverRtcpEventHistorySize); | 89 rtcp_->SetCastReceiverEventHistorySize(kReceiverRtcpEventHistorySize); |
| 90 | 90 |
| 91 // TODO(pwestin): pass cast_initialization_cb to |video_encoder_| | 91 // TODO(pwestin): pass cast_initialization_cb to |video_encoder_| |
| 92 // and remove this call. | 92 // and remove this call. |
| 93 cast_environment_->PostTask( | 93 cast_environment_->PostTask( |
| 94 CastEnvironment::MAIN, | 94 CastEnvironment::MAIN, |
| 95 FROM_HERE, | 95 FROM_HERE, |
| 96 base::Bind(cast_initialization_cb, STATUS_VIDEO_INITIALIZED)); | 96 base::Bind(cast_initialization_cb, STATUS_VIDEO_INITIALIZED)); |
| 97 | 97 |
| 98 memset(frame_id_to_rtp_timestamp_, 0, sizeof(frame_id_to_rtp_timestamp_)); | 98 memset(frame_id_to_rtp_timestamp_, 0, sizeof(frame_id_to_rtp_timestamp_)); |
| (...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 435 | 435 |
| 436 void VideoSender::UpdateBitrate(int new_bitrate) { | 436 void VideoSender::UpdateBitrate(int new_bitrate) { |
| 437 // Make sure we don't set the bitrate too insanely low. | 437 // Make sure we don't set the bitrate too insanely low. |
| 438 DCHECK_GT(new_bitrate, 1000); | 438 DCHECK_GT(new_bitrate, 1000); |
| 439 video_encoder_->SetBitRate(new_bitrate); | 439 video_encoder_->SetBitRate(new_bitrate); |
| 440 current_requested_bitrate_ = new_bitrate; | 440 current_requested_bitrate_ = new_bitrate; |
| 441 } | 441 } |
| 442 | 442 |
| 443 } // namespace cast | 443 } // namespace cast |
| 444 } // namespace media | 444 } // namespace media |
| OLD | NEW |