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 <algorithm> | 5 #include <algorithm> |
6 #include <climits> | 6 #include <climits> |
7 #include <cstdarg> | 7 #include <cstdarg> |
8 #include <cstdio> | 8 #include <cstdio> |
9 #include <deque> | 9 #include <deque> |
10 #include <map> | 10 #include <map> |
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 int window_width, | 187 int window_width, |
188 int window_height) | 188 int window_height) |
189 : InProcessReceiver(cast_environment, | 189 : InProcessReceiver(cast_environment, |
190 local_end_point, | 190 local_end_point, |
191 remote_end_point, | 191 remote_end_point, |
192 audio_config, | 192 audio_config, |
193 video_config), | 193 video_config), |
194 // Maximum age is the duration of 3 video frames. 3 was chosen | 194 // Maximum age is the duration of 3 video frames. 3 was chosen |
195 // arbitrarily, but seems to work well. | 195 // arbitrarily, but seems to work well. |
196 max_frame_age_(base::TimeDelta::FromSeconds(1) * 3 / | 196 max_frame_age_(base::TimeDelta::FromSeconds(1) * 3 / |
197 video_config.max_frame_rate), | 197 video_config.target_frame_rate), |
198 #if defined(USE_X11) | 198 #if defined(USE_X11) |
199 render_(0, 0, window_width, window_height, "Cast_receiver"), | 199 render_(0, 0, window_width, window_height, "Cast_receiver"), |
200 #endif // defined(USE_X11) | 200 #endif // defined(USE_X11) |
201 num_video_frames_processed_(0), | 201 num_video_frames_processed_(0), |
202 num_audio_frames_processed_(0), | 202 num_audio_frames_processed_(0), |
203 currently_playing_audio_frame_start_(-1) {} | 203 currently_playing_audio_frame_start_(-1) {} |
204 | 204 |
205 ~NaivePlayer() override {} | 205 ~NaivePlayer() override {} |
206 | 206 |
207 void Start() override { | 207 void Start() override { |
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
591 audio_config, | 591 audio_config, |
592 video_config, | 592 video_config, |
593 window_width, | 593 window_width, |
594 window_height); | 594 window_height); |
595 player.Start(); | 595 player.Start(); |
596 | 596 |
597 base::MessageLoop().Run(); // Run forever (i.e., until SIGTERM). | 597 base::MessageLoop().Run(); // Run forever (i.e., until SIGTERM). |
598 NOTREACHED(); | 598 NOTREACHED(); |
599 return 0; | 599 return 0; |
600 } | 600 } |
OLD | NEW |