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_receiver/video_receiver.h" | 5 #include "media/cast/video_receiver/video_receiver.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 extended_high_sequence_number, | 78 extended_high_sequence_number, |
79 jitter); | 79 jitter); |
80 } | 80 } |
81 | 81 |
82 private: | 82 private: |
83 RtpReceiver* rtp_receiver_; | 83 RtpReceiver* rtp_receiver_; |
84 }; | 84 }; |
85 | 85 |
86 VideoReceiver::VideoReceiver(scoped_refptr<CastEnvironment> cast_environment, | 86 VideoReceiver::VideoReceiver(scoped_refptr<CastEnvironment> cast_environment, |
87 const VideoReceiverConfig& video_config, | 87 const VideoReceiverConfig& video_config, |
88 PacedPacketSender* const packet_sender) | 88 transport::PacedPacketSender* const packet_sender) |
89 : cast_environment_(cast_environment), | 89 : cast_environment_(cast_environment), |
90 codec_(video_config.codec), | 90 codec_(video_config.codec), |
91 target_delay_delta_( | 91 target_delay_delta_( |
92 base::TimeDelta::FromMilliseconds(video_config.rtp_max_delay_ms)), | 92 base::TimeDelta::FromMilliseconds(video_config.rtp_max_delay_ms)), |
93 frame_delay_(base::TimeDelta::FromMilliseconds( | 93 frame_delay_(base::TimeDelta::FromMilliseconds( |
94 1000 / video_config.max_frame_rate)), | 94 1000 / video_config.max_frame_rate)), |
95 incoming_payload_callback_(new LocalRtpVideoData(this)), | 95 incoming_payload_callback_(new LocalRtpVideoData(this)), |
96 incoming_payload_feedback_(new LocalRtpVideoFeedback(this)), | 96 incoming_payload_feedback_(new LocalRtpVideoFeedback(this)), |
97 rtp_receiver_(cast_environment_->Clock(), NULL, &video_config, | 97 rtp_receiver_(cast_environment_->Clock(), NULL, &video_config, |
98 incoming_payload_callback_.get()), | 98 incoming_payload_callback_.get()), |
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
457 } | 457 } |
458 | 458 |
459 void VideoReceiver::SendNextRtcpReport() { | 459 void VideoReceiver::SendNextRtcpReport() { |
460 DCHECK(cast_environment_->CurrentlyOn(CastEnvironment::MAIN)); | 460 DCHECK(cast_environment_->CurrentlyOn(CastEnvironment::MAIN)); |
461 rtcp_->SendRtcpFromRtpReceiver(NULL, NULL); | 461 rtcp_->SendRtcpFromRtpReceiver(NULL, NULL); |
462 ScheduleNextRtcpReport(); | 462 ScheduleNextRtcpReport(); |
463 } | 463 } |
464 | 464 |
465 } // namespace cast | 465 } // namespace cast |
466 } // namespace media | 466 } // namespace media |
OLD | NEW |