| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef SERVICES_MEDIA_FACTORY_SERVICE_AUDIO_TRACK_CONTROLLER_H_ | |
| 6 #define SERVICES_MEDIA_FACTORY_SERVICE_AUDIO_TRACK_CONTROLLER_H_ | |
| 7 | |
| 8 #include "mojo/services/media/audio/interfaces/audio_track.mojom.h" | |
| 9 #include "mojo/services/media/common/interfaces/media_transport.mojom.h" | |
| 10 #include "services/media/framework/types/stream_type.h" | |
| 11 | |
| 12 namespace mojo { | |
| 13 | |
| 14 class Shell; | |
| 15 | |
| 16 namespace media { | |
| 17 | |
| 18 // Controls an audio track. | |
| 19 class AudioTrackController { | |
| 20 public: | |
| 21 using GetSupportedMediaTypesCallback = std::function<void( | |
| 22 std::unique_ptr<std::vector<std::unique_ptr<StreamTypeSet>>>)>; | |
| 23 using ConfigureCallback = std::function<void(MediaConsumerPtr)>; | |
| 24 | |
| 25 AudioTrackController(const String& url, Shell* shell); | |
| 26 | |
| 27 ~AudioTrackController(); | |
| 28 | |
| 29 // Gets the media types supported by the audio track. | |
| 30 void GetSupportedMediaTypes(const GetSupportedMediaTypesCallback& callback); | |
| 31 | |
| 32 // Configures the controller. | |
| 33 void Configure(const std::unique_ptr<StreamType>& stream_type, | |
| 34 const ConfigureCallback& callback); | |
| 35 | |
| 36 // Gets the timeline control site for the audio track. | |
| 37 void GetTimelineControlSite(InterfaceRequest<MediaTimelineControlSite> req); | |
| 38 | |
| 39 private: | |
| 40 AudioTrackPtr audio_track_; | |
| 41 }; | |
| 42 | |
| 43 } // namespace media | |
| 44 } // namespace mojo | |
| 45 | |
| 46 #endif // SERVICES_MEDIA_FACTORY_SERVICE_AUDIO_TRACK_CONTROLLER_H_ | |
| OLD | NEW |