| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_FACTORY_SERVICE_AUDIO_TRACK_CONTROLLER_H_ | 5 #ifndef SERVICES_MEDIA_FACTORY_SERVICE_AUDIO_TRACK_CONTROLLER_H_ |
| 6 #define SERVICES_MEDIA_FACTORY_SERVICE_AUDIO_TRACK_CONTROLLER_H_ | 6 #define SERVICES_MEDIA_FACTORY_SERVICE_AUDIO_TRACK_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include "mojo/public/cpp/application/application_impl.h" | 8 #include "mojo/public/cpp/application/application_impl.h" |
| 9 #include "mojo/services/media/audio/interfaces/audio_track.mojom.h" | 9 #include "mojo/services/media/audio/interfaces/audio_track.mojom.h" |
| 10 #include "mojo/services/media/common/interfaces/media_transport.mojom.h" | 10 #include "mojo/services/media/common/interfaces/media_transport.mojom.h" |
| 11 #include "services/media/framework/types/stream_type.h" | 11 #include "services/media/framework/types/stream_type.h" |
| 12 | 12 |
| 13 namespace mojo { | 13 namespace mojo { |
| 14 namespace media { | 14 namespace media { |
| 15 | 15 |
| 16 // Controls an audio track. | 16 // Controls an audio track. |
| 17 class AudioTrackController { | 17 class AudioTrackController { |
| 18 public: | 18 public: |
| 19 using GetSupportedMediaTypesCallback = std::function<void( | 19 using GetSupportedMediaTypesCallback = std::function<void( |
| 20 std::unique_ptr<std::vector<std::unique_ptr<StreamTypeSet>>>)>; | 20 std::unique_ptr<std::vector<std::unique_ptr<StreamTypeSet>>>)>; |
| 21 using ConfigureCallback = | 21 using ConfigureCallback = |
| 22 std::function<void(MediaConsumerPtr, RateControlPtr)>; | 22 std::function<void(MediaConsumerPtr, MediaTimelineControlSitePtr)>; |
| 23 | 23 |
| 24 AudioTrackController(const String& url, ApplicationImpl* app); | 24 AudioTrackController(const String& url, ApplicationImpl* app); |
| 25 | 25 |
| 26 ~AudioTrackController(); | 26 ~AudioTrackController(); |
| 27 | 27 |
| 28 // Gets the media types supported by the audio track. | 28 // Gets the media types supported by the audio track. |
| 29 void GetSupportedMediaTypes(const GetSupportedMediaTypesCallback& callback); | 29 void GetSupportedMediaTypes(const GetSupportedMediaTypesCallback& callback); |
| 30 | 30 |
| 31 // Configures the controller. | 31 // Configures the controller. |
| 32 void Configure(const std::unique_ptr<StreamType>& stream_type, | 32 void Configure(const std::unique_ptr<StreamType>& stream_type, |
| 33 const ConfigureCallback& callback); | 33 const ConfigureCallback& callback); |
| 34 | 34 |
| 35 private: | 35 private: |
| 36 AudioTrackPtr audio_track_; | 36 AudioTrackPtr audio_track_; |
| 37 }; | 37 }; |
| 38 | 38 |
| 39 } // namespace media | 39 } // namespace media |
| 40 } // namespace mojo | 40 } // namespace mojo |
| 41 | 41 |
| 42 #endif // SERVICES_MEDIA_FACTORY_SERVICE_AUDIO_TRACK_CONTROLLER_H_ | 42 #endif // SERVICES_MEDIA_FACTORY_SERVICE_AUDIO_TRACK_CONTROLLER_H_ |
| OLD | NEW |