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

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

Issue 1874003002: Motown: Get rid of speculative clock definition (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 8 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 #include "base/logging.h" 5 #include "base/logging.h"
6 #include "mojo/services/media/common/cpp/linear_transform.h" 6 #include "mojo/services/media/common/cpp/linear_transform.h"
7 #include "mojo/services/media/common/cpp/local_time.h" 7 #include "mojo/services/media/common/cpp/local_time.h"
8 #include "services/media/factory_service/media_sink_impl.h" 8 #include "services/media/factory_service/media_sink_impl.h"
9 #include "services/media/framework/conversion_pipeline_builder.h" 9 #include "services/media/framework/conversion_pipeline_builder.h"
10 #include "services/media/framework_mojo/mojo_type_conversions.h" 10 #include "services/media/framework_mojo/mojo_type_conversions.h"
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 graph_.Prepare(); 130 graph_.Prepare();
131 ready_.Occur(); 131 ready_.Occur();
132 MaybeSetRate(); 132 MaybeSetRate();
133 }); 133 });
134 }); 134 });
135 }); 135 });
136 } 136 }
137 137
138 MediaSinkImpl::~MediaSinkImpl() {} 138 MediaSinkImpl::~MediaSinkImpl() {}
139 139
140 void MediaSinkImpl::GetClockDisposition(
141 const GetClockDispositionCallback& callback) {
142 callback.Run(ClockDisposition::PREFER_MASTER);
143 // TODO(dalesat): Varies by destination type.
144 }
145
146 void MediaSinkImpl::GetMasterClock(InterfaceRequest<Clock> master_clock) {
147 // TODO(dalesat): Produce master clock as appropriate.
148 }
149
150 void MediaSinkImpl::SetMasterClock(InterfaceHandle<Clock> master_clock) {
151 // TODO(dalesat): Accept master clock and arrange for synchronization.
152 }
153
154 void MediaSinkImpl::GetConsumer(InterfaceRequest<MediaConsumer> consumer) { 140 void MediaSinkImpl::GetConsumer(InterfaceRequest<MediaConsumer> consumer) {
155 consumer_->AddBinding(consumer.Pass()); 141 consumer_->AddBinding(consumer.Pass());
156 } 142 }
157 143
158 void MediaSinkImpl::GetStatus(uint64_t version_last_seen, 144 void MediaSinkImpl::GetStatus(uint64_t version_last_seen,
159 const GetStatusCallback& callback) { 145 const GetStatusCallback& callback) {
160 if (version_last_seen < status_version_) { 146 if (version_last_seen < status_version_) {
161 RunStatusCallback(callback); 147 RunStatusCallback(callback);
162 } else { 148 } else {
163 pending_status_requests_.push_back(callback); 149 pending_status_requests_.push_back(callback);
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 status_transform_->quad->target_delta = rate_frames_per_tick.denominator; 271 status_transform_->quad->target_delta = rate_frames_per_tick.denominator;
286 LinearTransform::Ratio::Reduce(&status_transform_->quad->reference_delta, 272 LinearTransform::Ratio::Reduce(&status_transform_->quad->reference_delta,
287 &status_transform_->quad->target_delta); 273 &status_transform_->quad->target_delta);
288 274
289 rate_ = target_rate_; 275 rate_ = target_rate_;
290 StatusUpdated(); 276 StatusUpdated();
291 } 277 }
292 278
293 } // namespace media 279 } // namespace media
294 } // namespace mojo 280 } // namespace mojo
OLDNEW
« no previous file with comments | « services/media/factory_service/media_sink_impl.h ('k') | services/media/factory_service/media_source_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698