| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |