Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(12)

Side by Side Diff: services/media/factory_service/media_sink_impl.h

Issue 1986303002: Motown: Use new TimelineTransform and related definitions (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Fixes per feedback. Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 MOJO_SERVICES_MEDIA_FACTORY_MEDIA_SINK_IMPL_H_ 5 #ifndef MOJO_SERVICES_MEDIA_FACTORY_MEDIA_SINK_IMPL_H_
6 #define MOJO_SERVICES_MEDIA_FACTORY_MEDIA_SINK_IMPL_H_ 6 #define MOJO_SERVICES_MEDIA_FACTORY_MEDIA_SINK_IMPL_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "mojo/public/cpp/application/application_impl.h" 10 #include "mojo/public/cpp/application/application_impl.h"
11 #include "mojo/public/cpp/bindings/binding.h" 11 #include "mojo/public/cpp/bindings/binding.h"
12 #include "mojo/services/media/common/cpp/linear_transform.h" 12 #include "mojo/services/media/common/cpp/timeline_function.h"
13 #include "mojo/services/media/control/interfaces/media_sink.mojom.h" 13 #include "mojo/services/media/control/interfaces/media_sink.mojom.h"
14 #include "services/media/common/mojo_publisher.h"
14 #include "services/media/factory_service/audio_track_controller.h" 15 #include "services/media/factory_service/audio_track_controller.h"
15 #include "services/media/factory_service/factory_service.h" 16 #include "services/media/factory_service/factory_service.h"
16 #include "services/media/factory_service/mojo_publisher.h"
17 #include "services/media/framework/graph.h" 17 #include "services/media/framework/graph.h"
18 #include "services/media/framework/parts/decoder.h" 18 #include "services/media/framework/parts/decoder.h"
19 #include "services/media/framework/util/incident.h" 19 #include "services/media/framework/util/incident.h"
20 #include "services/media/framework_mojo/mojo_consumer.h" 20 #include "services/media/framework_mojo/mojo_consumer.h"
21 #include "services/media/framework_mojo/mojo_producer.h" 21 #include "services/media/framework_mojo/mojo_producer.h"
22 22
23 namespace mojo { 23 namespace mojo {
24 namespace media { 24 namespace media {
25 25
26 // Mojo agent that consumes a stream and delivers it to a destination specified 26 // Mojo agent that consumes a stream and delivers it to a destination specified
(...skipping 27 matching lines...) Expand all
54 54
55 // Sets the rate if the producer is ready and the target rate differs from 55 // Sets the rate if the producer is ready and the target rate differs from
56 // the current rate. 56 // the current rate.
57 void MaybeSetRate(); 57 void MaybeSetRate();
58 58
59 Incident ready_; 59 Incident ready_;
60 Graph graph_; 60 Graph graph_;
61 std::shared_ptr<MojoConsumer> consumer_; 61 std::shared_ptr<MojoConsumer> consumer_;
62 std::shared_ptr<MojoProducer> producer_; 62 std::shared_ptr<MojoProducer> producer_;
63 std::unique_ptr<AudioTrackController> controller_; 63 std::unique_ptr<AudioTrackController> controller_;
64 RateControlPtr rate_control_; 64 TimelineConsumerPtr timeline_consumer_;
65 float rate_ = 0.0f; 65 float rate_ = 0.0f;
66 float target_rate_ = 0.0f; 66 float target_rate_ = 0.0f;
67 MediaState producer_state_ = MediaState::UNPREPARED; 67 MediaState producer_state_ = MediaState::UNPREPARED;
68 LinearTransform transform_ = LinearTransform(0, 0, 1, 0); 68 TimelineFunction timeline_function_;
69 TimelineTransformPtr status_transform_; 69 TimelineRate frames_per_ns_;
70 uint32_t frames_per_second_ = 0u;
71 bool flushed_ = true; 70 bool flushed_ = true;
72 MojoPublisher<GetStatusCallback> status_publisher_; 71 MojoPublisher<GetStatusCallback> status_publisher_;
73 }; 72 };
74 73
75 } // namespace media 74 } // namespace media
76 } // namespace mojo 75 } // namespace mojo
77 76
78 #endif // MOJO_SERVICES_MEDIA_FACTORY_MEDIA_SINK_IMPL_H_ 77 #endif // MOJO_SERVICES_MEDIA_FACTORY_MEDIA_SINK_IMPL_H_
OLDNEW
« no previous file with comments | « services/media/factory_service/media_player_impl.h ('k') | services/media/factory_service/media_sink_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698