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 <limits.h> | 5 #include <limits.h> |
6 #include <stddef.h> | 6 #include <stddef.h> |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <climits> | 10 #include <climits> |
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
317 } | 317 } |
318 | 318 |
319 // End of InProcessReceiver finals. | 319 // End of InProcessReceiver finals. |
320 //////////////////////////////////////////////////////////////////// | 320 //////////////////////////////////////////////////////////////////// |
321 | 321 |
322 //////////////////////////////////////////////////////////////////// | 322 //////////////////////////////////////////////////////////////////// |
323 // AudioSourceCallback implementation. | 323 // AudioSourceCallback implementation. |
324 | 324 |
325 int OnMoreData(AudioBus* dest, | 325 int OnMoreData(AudioBus* dest, |
326 uint32_t total_bytes_delay, | 326 uint32_t total_bytes_delay, |
327 uint32_t frames_skipped) final { | 327 uint32_t frames_skipped, |
| 328 const AudioTimestamp& timestamp) final { |
328 // Note: This method is being invoked by a separate thread unknown to us | 329 // Note: This method is being invoked by a separate thread unknown to us |
329 // (i.e., outside of CastEnvironment). | 330 // (i.e., outside of CastEnvironment). |
330 | 331 |
331 int samples_remaining = dest->frames(); | 332 int samples_remaining = dest->frames(); |
332 | 333 |
333 while (samples_remaining > 0) { | 334 while (samples_remaining > 0) { |
334 // Get next audio frame ready for playout. | 335 // Get next audio frame ready for playout. |
335 if (!currently_playing_audio_frame_.get()) { | 336 if (!currently_playing_audio_frame_.get()) { |
336 base::AutoLock auto_lock(audio_lock_); | 337 base::AutoLock auto_lock(audio_lock_); |
337 | 338 |
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
600 audio_config, | 601 audio_config, |
601 video_config, | 602 video_config, |
602 window_width, | 603 window_width, |
603 window_height); | 604 window_height); |
604 player.Start(); | 605 player.Start(); |
605 | 606 |
606 base::RunLoop().Run(); // Run forever (i.e., until SIGTERM). | 607 base::RunLoop().Run(); // Run forever (i.e., until SIGTERM). |
607 NOTREACHED(); | 608 NOTREACHED(); |
608 return 0; | 609 return 0; |
609 } | 610 } |
OLD | NEW |