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/logging.h" | 5 #include "base/logging.h" |
6 #include "services/media/factory_service/media_sink_impl.h" | 6 #include "services/media/factory_service/media_sink_impl.h" |
7 #include "services/media/framework/util/conversion_pipeline_builder.h" | 7 #include "services/media/framework/util/conversion_pipeline_builder.h" |
8 #include "services/media/framework_mojo/mojo_type_conversions.h" | 8 #include "services/media/framework_mojo/mojo_type_conversions.h" |
9 | 9 |
10 namespace mojo { | 10 namespace mojo { |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 | 60 |
61 RCHECK(destination_url == "mojo:audio_server"); | 61 RCHECK(destination_url == "mojo:audio_server"); |
62 | 62 |
63 // TODO(dalesat): Once we have c++14, get rid of this shared pointer hack. | 63 // TODO(dalesat): Once we have c++14, get rid of this shared pointer hack. |
64 std::shared_ptr<StreamType> captured_stream_type( | 64 std::shared_ptr<StreamType> captured_stream_type( |
65 media_type.To<std::unique_ptr<StreamType>>().release()); | 65 media_type.To<std::unique_ptr<StreamType>>().release()); |
66 | 66 |
67 // An AudioTrackController knows how to talk to an audio track, interrogating | 67 // An AudioTrackController knows how to talk to an audio track, interrogating |
68 // it for supported stream types and configuring it for the chosen stream | 68 // it for supported stream types and configuring it for the chosen stream |
69 // type. | 69 // type. |
70 controller_.reset(new AudioTrackController(destination_url, app())); | 70 controller_.reset(new AudioTrackController(destination_url, owner->shell())); |
71 | 71 |
72 controller_->GetSupportedMediaTypes([this, consumer_ref, producer_ref, | 72 controller_->GetSupportedMediaTypes([this, consumer_ref, producer_ref, |
73 captured_stream_type]( | 73 captured_stream_type]( |
74 std::unique_ptr<std::vector<std::unique_ptr<StreamTypeSet>>> | 74 std::unique_ptr<std::vector<std::unique_ptr<StreamTypeSet>>> |
75 supported_stream_types) { | 75 supported_stream_types) { |
76 std::unique_ptr<StreamType> producer_stream_type; | 76 std::unique_ptr<StreamType> producer_stream_type; |
77 | 77 |
78 // Add transforms to the pipeline to convert from stream_type to a | 78 // Add transforms to the pipeline to convert from stream_type to a |
79 // type supported by the track. | 79 // type supported by the track. |
80 OutputRef out = consumer_ref.output(); | 80 OutputRef out = consumer_ref.output(); |
(...skipping 30 matching lines...) Expand all Loading... |
111 InterfaceRequest<MediaTimelineControlSite> req) { | 111 InterfaceRequest<MediaTimelineControlSite> req) { |
112 if (!controller_) { | 112 if (!controller_) { |
113 LOG(ERROR) << "GetTimelineControlSite not implemented for 'nowhere' case"; | 113 LOG(ERROR) << "GetTimelineControlSite not implemented for 'nowhere' case"; |
114 abort(); | 114 abort(); |
115 } | 115 } |
116 controller_->GetTimelineControlSite(req.Pass()); | 116 controller_->GetTimelineControlSite(req.Pass()); |
117 } | 117 } |
118 | 118 |
119 } // namespace media | 119 } // namespace media |
120 } // namespace mojo | 120 } // namespace mojo |
OLD | NEW |