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