| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #ifndef SERVICES_MEDIA_AUDIO_AUDIO_SERVER_IMPL_H_ | 5 #ifndef SERVICES_MEDIA_AUDIO_AUDIO_SERVER_IMPL_H_ |
| 6 #define SERVICES_MEDIA_AUDIO_AUDIO_SERVER_IMPL_H_ | 6 #define SERVICES_MEDIA_AUDIO_AUDIO_SERVER_IMPL_H_ |
| 7 | 7 |
| 8 #include <list> | 8 #include <list> |
| 9 #include <set> | 9 #include <set> |
| 10 | 10 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 namespace audio { | 22 namespace audio { |
| 23 | 23 |
| 24 class AudioServerImpl : public AudioServer { | 24 class AudioServerImpl : public AudioServer { |
| 25 public: | 25 public: |
| 26 AudioServerImpl(); | 26 AudioServerImpl(); |
| 27 ~AudioServerImpl() override; | 27 ~AudioServerImpl() override; |
| 28 | 28 |
| 29 void Initialize(); | 29 void Initialize(); |
| 30 | 30 |
| 31 // AudioServer | 31 // AudioServer |
| 32 void CreateTrack(mojo::InterfaceRequest<AudioTrack> track) override; | 32 void CreateTrack(InterfaceRequest<AudioTrack> track, |
| 33 InterfaceRequest<MediaRenderer> renderer) override; |
| 33 | 34 |
| 34 // Called (indirectly) by AudioOutputs to schedule the callback for a | 35 // Called (indirectly) by AudioOutputs to schedule the callback for a |
| 35 // MediaPacked which was queued to an AudioTrack via. a media pipe. | 36 // MediaPacked which was queued to an AudioTrack via. a media pipe. |
| 36 // | 37 // |
| 37 // TODO(johngro): This bouncing through thread contexts is inefficient and | 38 // TODO(johngro): This bouncing through thread contexts is inefficient and |
| 38 // will increase the latency requirements for clients (its going to take them | 39 // will increase the latency requirements for clients (its going to take them |
| 39 // some extra time to discover that their media has been completely consumed). | 40 // some extra time to discover that their media has been completely consumed). |
| 40 // When mojo exposes a way to safely invoke interface method callbacks from | 41 // When mojo exposes a way to safely invoke interface method callbacks from |
| 41 // threads other than the thread which executed the method itself, we will | 42 // threads other than the thread which executed the method itself, we will |
| 42 // want to switch to creating the callback message directly, instead of | 43 // want to switch to creating the callback message directly, instead of |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 bool cleanup_scheduled_ = false; | 85 bool cleanup_scheduled_ = false; |
| 85 bool shutting_down_ = false; | 86 bool shutting_down_ = false; |
| 86 base::Closure cleanup_closure_; | 87 base::Closure cleanup_closure_; |
| 87 }; | 88 }; |
| 88 | 89 |
| 89 } // namespace audio | 90 } // namespace audio |
| 90 } // namespace media | 91 } // namespace media |
| 91 } // namespace mojo | 92 } // namespace mojo |
| 92 | 93 |
| 93 #endif // SERVICES_MEDIA_AUDIO_AUDIO_SERVER_IMPL_H_ | 94 #endif // SERVICES_MEDIA_AUDIO_AUDIO_SERVER_IMPL_H_ |
| OLD | NEW |