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/decoder.h" | 5 #include "services/media/framework/parts/decoder.h" |
6 #include "services/media/framework_ffmpeg/ffmpeg_decoder.h" | 6 #include "services/media/framework_ffmpeg/ffmpeg_decoder.h" |
7 | 7 |
8 namespace mojo { | 8 namespace mojo { |
9 namespace media { | 9 namespace media { |
10 | 10 |
11 Result Decoder::Create( | 11 Result Decoder::Create(const StreamType& stream_type, |
12 const StreamType& stream_type, | 12 std::shared_ptr<Decoder>* decoder_out) { |
13 std::shared_ptr<Decoder>* decoder_out) { | |
14 std::shared_ptr<Decoder> decoder; | 13 std::shared_ptr<Decoder> decoder; |
15 Result result = FfmpegDecoder::Create(stream_type, &decoder); | 14 Result result = FfmpegDecoder::Create(stream_type, &decoder); |
16 if (result == Result::kOk) { | 15 if (result == Result::kOk) { |
17 *decoder_out = decoder; | 16 *decoder_out = decoder; |
18 } | 17 } |
19 | 18 |
20 return result; | 19 return result; |
21 } | 20 } |
22 | 21 |
23 } // namespace media | 22 } // namespace media |
24 } // namespace mojo | 23 } // namespace mojo |
OLD | NEW |