blob: d17d739a9b5fd39373013fb6693eb12a1f11b17f [file] [log] [blame]
philipel2fee4d62018-03-21 16:52:13 +01001/*
2 * Copyright (c) 2018 The WebRTC project authors. All Rights Reserved.
3 *
4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
10
11#include "api/video/video_stream_decoder_create.h"
12
Karl Wiberg918f50c2018-07-05 11:40:33 +020013#include "absl/memory/memory.h"
philipel2fee4d62018-03-21 16:52:13 +010014#include "video/video_stream_decoder_impl.h"
15
16namespace webrtc {
Danil Chapovalovb703db92019-04-08 16:59:28 +020017
18std::unique_ptr<VideoStreamDecoderInterface> CreateVideoStreamDecoder(
19 VideoStreamDecoderInterface::Callbacks* callbacks,
philipel2fee4d62018-03-21 16:52:13 +010020 VideoDecoderFactory* decoder_factory,
Danil Chapovalovb703db92019-04-08 16:59:28 +020021 TaskQueueFactory* task_queue_factory,
philipel2fee4d62018-03-21 16:52:13 +010022 std::map<int, std::pair<SdpVideoFormat, int>> decoder_settings) {
Karl Wiberg918f50c2018-07-05 11:40:33 +020023 return absl::make_unique<VideoStreamDecoderImpl>(callbacks, decoder_factory,
Danil Chapovalovb703db92019-04-08 16:59:28 +020024 task_queue_factory,
Karl Wiberg918f50c2018-07-05 11:40:33 +020025 std::move(decoder_settings));
philipel2fee4d62018-03-21 16:52:13 +010026}
Danil Chapovalovb703db92019-04-08 16:59:28 +020027
philipel2fee4d62018-03-21 16:52:13 +010028} // namespace webrtc