OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/audio/audio_output_device.h" | 5 #include "media/audio/audio_output_device.h" |
6 | 6 |
7 #include "base/callback_helpers.h" | 7 #include "base/callback_helpers.h" |
8 #include "base/threading/thread_restrictions.h" | 8 #include "base/threading/thread_restrictions.h" |
9 #include "base/time/time.h" | 9 #include "base/time/time.h" |
10 #include "base/trace_event/trace_event.h" | 10 #include "base/trace_event/trace_event.h" |
(...skipping 15 matching lines...) Expand all Loading... |
26 ~AudioThreadCallback() override; | 26 ~AudioThreadCallback() override; |
27 | 27 |
28 void MapSharedMemory() override; | 28 void MapSharedMemory() override; |
29 | 29 |
30 // Called whenever we receive notifications about pending data. | 30 // Called whenever we receive notifications about pending data. |
31 void Process(uint32_t pending_data) override; | 31 void Process(uint32_t pending_data) override; |
32 | 32 |
33 private: | 33 private: |
34 AudioRendererSink::RenderCallback* render_callback_; | 34 AudioRendererSink::RenderCallback* render_callback_; |
35 scoped_ptr<AudioBus> output_bus_; | 35 scoped_ptr<AudioBus> output_bus_; |
36 uint64 callback_num_; | 36 uint64_t callback_num_; |
37 | 37 |
38 DISALLOW_COPY_AND_ASSIGN(AudioThreadCallback); | 38 DISALLOW_COPY_AND_ASSIGN(AudioThreadCallback); |
39 }; | 39 }; |
40 | 40 |
41 AudioOutputDevice::AudioOutputDevice( | 41 AudioOutputDevice::AudioOutputDevice( |
42 scoped_ptr<AudioOutputIPC> ipc, | 42 scoped_ptr<AudioOutputIPC> ipc, |
43 const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner, | 43 const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner, |
44 int session_id, | 44 int session_id, |
45 const std::string& device_id, | 45 const std::string& device_id, |
46 const url::Origin& security_origin) | 46 const url::Origin& security_origin) |
(...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
429 | 429 |
430 // Update the audio-delay measurement, inform about the number of skipped | 430 // Update the audio-delay measurement, inform about the number of skipped |
431 // frames, and ask client to render audio. Since |output_bus_| is wrapping | 431 // frames, and ask client to render audio. Since |output_bus_| is wrapping |
432 // the shared memory the Render() call is writing directly into the shared | 432 // the shared memory the Render() call is writing directly into the shared |
433 // memory. | 433 // memory. |
434 render_callback_->Render(output_bus_.get(), audio_delay_milliseconds, | 434 render_callback_->Render(output_bus_.get(), audio_delay_milliseconds, |
435 frames_skipped); | 435 frames_skipped); |
436 } | 436 } |
437 | 437 |
438 } // namespace media | 438 } // namespace media |
OLD | NEW |