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/receiver/frame_receiver.h" | 5 #include "media/cast/receiver/frame_receiver.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/big_endian.h" | 9 #include "base/big_endian.h" |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 const scoped_refptr<CastEnvironment>& cast_environment, | 23 const scoped_refptr<CastEnvironment>& cast_environment, |
24 const FrameReceiverConfig& config, | 24 const FrameReceiverConfig& config, |
25 EventMediaType event_media_type, | 25 EventMediaType event_media_type, |
26 CastTransportSender* const transport) | 26 CastTransportSender* const transport) |
27 : cast_environment_(cast_environment), | 27 : cast_environment_(cast_environment), |
28 transport_(transport), | 28 transport_(transport), |
29 packet_parser_(config.incoming_ssrc, config.rtp_payload_type), | 29 packet_parser_(config.incoming_ssrc, config.rtp_payload_type), |
30 stats_(cast_environment->Clock()), | 30 stats_(cast_environment->Clock()), |
31 event_media_type_(event_media_type), | 31 event_media_type_(event_media_type), |
32 event_subscriber_(kReceiverRtcpEventHistorySize, event_media_type), | 32 event_subscriber_(kReceiverRtcpEventHistorySize, event_media_type), |
33 rtp_timebase_(config.frequency), | 33 rtp_timebase_(config.rtp_timebase), |
34 target_playout_delay_( | 34 target_playout_delay_( |
35 base::TimeDelta::FromMilliseconds(config.rtp_max_delay_ms)), | 35 base::TimeDelta::FromMilliseconds(config.rtp_max_delay_ms)), |
36 expected_frame_duration_( | 36 expected_frame_duration_( |
37 base::TimeDelta::FromSeconds(1) / config.target_frame_rate), | 37 base::TimeDelta::FromSeconds(1) / config.target_frame_rate), |
38 reports_are_scheduled_(false), | 38 reports_are_scheduled_(false), |
39 framer_(cast_environment->Clock(), | 39 framer_(cast_environment->Clock(), |
40 this, | 40 this, |
41 config.incoming_ssrc, | 41 config.incoming_ssrc, |
42 true, | 42 true, |
43 config.rtp_max_delay_ms * config.target_frame_rate / 1000), | 43 config.rtp_max_delay_ms * config.target_frame_rate / 1000), |
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
341 rtcp_.ConvertToNTPAndSave(now), | 341 rtcp_.ConvertToNTPAndSave(now), |
342 NULL, | 342 NULL, |
343 base::TimeDelta(), | 343 base::TimeDelta(), |
344 NULL, | 344 NULL, |
345 &stats); | 345 &stats); |
346 ScheduleNextRtcpReport(); | 346 ScheduleNextRtcpReport(); |
347 } | 347 } |
348 | 348 |
349 } // namespace cast | 349 } // namespace cast |
350 } // namespace media | 350 } // namespace media |
OLD | NEW |