| 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_FRAMEWORK_MOJO_AUDIO_TRACK_CONTROLLER_H_ |
| 6 #define SERVICES_MEDIA_FRAMEWORK_MOJO_AUDIO_TRACK_CONTROLLER_H_ |
| 7 |
| 8 #include "mojo/public/cpp/application/application_impl.h" |
| 9 #include "mojo/services/media/audio/interfaces/audio_track.mojom.h" |
| 10 #include "mojo/services/media/common/interfaces/media_pipe.mojom.h" |
| 11 #include "services/media/framework/graph.h" |
| 12 #include "services/media/framework/stream_type.h" |
| 13 #include "services/media/framework_mojo/audio_track_producer.h" |
| 14 |
| 15 namespace mojo { |
| 16 namespace media { |
| 17 |
| 18 // Controls an audio track. |
| 19 class AudioTrackController { |
| 20 public: |
| 21 using ConstructorCallback = |
| 22 Callback<void(std::shared_ptr<AudioTrackProducer>)>; |
| 23 using SetRateCallback = std::function<void(TimelineTransformPtr)>; |
| 24 |
| 25 AudioTrackController( |
| 26 const String& url, |
| 27 std::unique_ptr<StreamType> stream_type, |
| 28 Graph* graph, |
| 29 OutputRef output, |
| 30 ApplicationImpl* app, |
| 31 const ConstructorCallback& callback); |
| 32 |
| 33 ~AudioTrackController(); |
| 34 |
| 35 // Sets the rate. |
| 36 void SetRate(float rate_factor, const SetRateCallback& callback); |
| 37 |
| 38 private: |
| 39 AudioTrackPtr audio_track_; |
| 40 RateControlPtr rate_control_; |
| 41 MediaPipePtr pipe_; |
| 42 uint32_t frames_per_second_; |
| 43 }; |
| 44 |
| 45 } // namespace media |
| 46 } // namespace mojo |
| 47 |
| 48 #endif // SERVICES_MEDIA_FRAMEWORK_MOJO_AUDIO_TRACK_CONTROLLER_H_ |
| OLD | NEW |