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

Side by Side Diff: services/media/factory_service/media_source_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
« no previous file with comments | « services/media/factory_service/media_source_impl.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/bind.h" 5 #include "base/bind.h"
6 #include "base/logging.h" 6 #include "base/logging.h"
7 #include "base/message_loop/message_loop.h" 7 #include "base/message_loop/message_loop.h"
8 #include "services/media/factory_service/media_source_impl.h" 8 #include "services/media/factory_service/media_source_impl.h"
9 #include "services/media/framework/callback_joiner.h" 9 #include "services/media/framework/callback_joiner.h"
10 #include "services/media/framework/conversion_pipeline_builder.h" 10 #include "services/media/framework/conversion_pipeline_builder.h"
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 MediaSourceStreamDescriptor::New(); 88 MediaSourceStreamDescriptor::New();
89 descriptor->index = i; 89 descriptor->index = i;
90 descriptor->media_type = streams_[i]->media_type(); 90 descriptor->media_type = streams_[i]->media_type();
91 descriptor->original_media_type = streams_[i]->original_media_type(); 91 descriptor->original_media_type = streams_[i]->original_media_type();
92 result[i] = descriptor.Pass(); 92 result[i] = descriptor.Pass();
93 } 93 }
94 callback.Run(result.Pass()); 94 callback.Run(result.Pass());
95 }); 95 });
96 } 96 }
97 97
98 void MediaSourceImpl::GetClockDisposition(
99 const GetClockDispositionCallback& callback) {
100 callback.Run(ClockDisposition::PASSIVE);
101 // TODO(dalesat): Varies by origin type.
102 }
103
104 void MediaSourceImpl::GetMasterClock(InterfaceRequest<Clock> master_clock) {
105 // TODO(dalesat): Produce master clock as appropriate.
106 }
107
108 void MediaSourceImpl::SetMasterClock(InterfaceHandle<Clock> master_clock) {
109 // TODO(dalesat): Is this needed?
110 }
111
112 void MediaSourceImpl::GetProducer(uint32_t stream_index, 98 void MediaSourceImpl::GetProducer(uint32_t stream_index,
113 InterfaceRequest<MediaProducer> producer) { 99 InterfaceRequest<MediaProducer> producer) {
114 DCHECK(init_complete_.occurred()); 100 DCHECK(init_complete_.occurred());
115 101
116 if (stream_index >= streams_.size()) { 102 if (stream_index >= streams_.size()) {
117 return; 103 return;
118 } 104 }
119 105
120 streams_[stream_index]->GetProducer(producer.Pass()); 106 streams_[stream_index]->GetProducer(producer.Pass());
121 } 107 }
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 const MojoProducer::FlushConnectionCallback callback) { 277 const MojoProducer::FlushConnectionCallback callback) {
292 if (producer_ != nullptr) { 278 if (producer_ != nullptr) {
293 producer_->FlushConnection(callback); 279 producer_->FlushConnection(callback);
294 } else { 280 } else {
295 callback.Run(); 281 callback.Run();
296 } 282 }
297 } 283 }
298 284
299 } // namespace media 285 } // namespace media
300 } // namespace mojo 286 } // namespace mojo
OLDNEW
« no previous file with comments | « services/media/factory_service/media_source_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698