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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 RtpReceiver* rtp_receiver_; | 96 RtpReceiver* rtp_receiver_; |
97 | 97 |
98 DISALLOW_IMPLICIT_CONSTRUCTORS(LocalRtpReceiverStatistics); | 98 DISALLOW_IMPLICIT_CONSTRUCTORS(LocalRtpReceiverStatistics); |
99 }; | 99 }; |
100 | 100 |
101 VideoReceiver::VideoReceiver(scoped_refptr<CastEnvironment> cast_environment, | 101 VideoReceiver::VideoReceiver(scoped_refptr<CastEnvironment> cast_environment, |
102 const VideoReceiverConfig& video_config, | 102 const VideoReceiverConfig& video_config, |
103 transport::PacedPacketSender* const packet_sender) | 103 transport::PacedPacketSender* const packet_sender) |
104 : cast_environment_(cast_environment), | 104 : cast_environment_(cast_environment), |
105 event_subscriber_( | 105 event_subscriber_( |
106 cast_environment->GetMessageSingleThreadTaskRunnerForThread( | |
107 CastEnvironment::MAIN), | |
108 kMaxEventSubscriberEntries, | 106 kMaxEventSubscriberEntries, |
109 ReceiverRtcpEventSubscriber::kVideoEventSubscriber), | 107 ReceiverRtcpEventSubscriber::kVideoEventSubscriber), |
110 codec_(video_config.codec), | 108 codec_(video_config.codec), |
111 target_delay_delta_( | 109 target_delay_delta_( |
112 base::TimeDelta::FromMilliseconds(video_config.rtp_max_delay_ms)), | 110 base::TimeDelta::FromMilliseconds(video_config.rtp_max_delay_ms)), |
113 frame_delay_(base::TimeDelta::FromMilliseconds( | 111 frame_delay_(base::TimeDelta::FromMilliseconds( |
114 1000 / video_config.max_frame_rate)), | 112 1000 / video_config.max_frame_rate)), |
115 incoming_payload_callback_(new LocalRtpVideoData(this)), | 113 incoming_payload_callback_(new LocalRtpVideoData(this)), |
116 incoming_payload_feedback_(new LocalRtpVideoFeedback(this)), | 114 incoming_payload_feedback_(new LocalRtpVideoFeedback(this)), |
117 rtp_receiver_(cast_environment_->Clock(), | 115 rtp_receiver_(cast_environment_->Clock(), |
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
524 } | 522 } |
525 | 523 |
526 void VideoReceiver::SendNextRtcpReport() { | 524 void VideoReceiver::SendNextRtcpReport() { |
527 DCHECK(cast_environment_->CurrentlyOn(CastEnvironment::MAIN)); | 525 DCHECK(cast_environment_->CurrentlyOn(CastEnvironment::MAIN)); |
528 rtcp_->SendRtcpFromRtpReceiver(NULL, NULL); | 526 rtcp_->SendRtcpFromRtpReceiver(NULL, NULL); |
529 ScheduleNextRtcpReport(); | 527 ScheduleNextRtcpReport(); |
530 } | 528 } |
531 | 529 |
532 } // namespace cast | 530 } // namespace cast |
533 } // namespace media | 531 } // namespace media |
OLD | NEW |