| 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 "services/media/framework/parts/demux.h" | 5 #include "services/media/framework/parts/demux.h" |
| 6 #include "services/media/framework_ffmpeg/ffmpeg_demux.h" |
| 6 | 7 |
| 7 namespace mojo { | 8 namespace mojo { |
| 8 namespace media { | 9 namespace media { |
| 9 | 10 |
| 10 Result Demux::Create( | 11 Result Demux::Create( |
| 11 std::shared_ptr<Reader> reader, | 12 std::shared_ptr<Reader> reader, |
| 12 std::shared_ptr<Demux>* demux_out) { | 13 std::shared_ptr<Demux>* demux_out) { |
| 13 return Result::kUnsupportedOperation; | 14 std::shared_ptr<Demux> demux = FfmpegDemux::Create(); |
| 15 |
| 16 Result result = demux->Init(reader); |
| 17 if (result == Result::kOk) { |
| 18 *demux_out = demux; |
| 19 } |
| 20 |
| 21 return result; |
| 14 } | 22 } |
| 15 | 23 |
| 16 } // namespace media | 24 } // namespace media |
| 17 } // namespace mojo | 25 } // namespace mojo |
| OLD | NEW |