blob: e14c3bc851d0332fbbc406799a07dc031cf834a2 [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
Mirko Bonadei317a1f02019-09-17 17:06:18 +020013#include <memory>
14
philipel2fee4d62018-03-21 16:52:13 +010015#include "video/video_stream_decoder_impl.h"
16
17namespace webrtc {
Danil Chapovalovb703db92019-04-08 16:59:28 +020018
19std::unique_ptr<VideoStreamDecoderInterface> CreateVideoStreamDecoder(
20 VideoStreamDecoderInterface::Callbacks* callbacks,
philipel2fee4d62018-03-21 16:52:13 +010021 VideoDecoderFactory* decoder_factory,
Danil Chapovalovb703db92019-04-08 16:59:28 +020022 TaskQueueFactory* task_queue_factory,
Jonas Orelande02f9ee2022-03-25 12:43:14 +010023 std::map<int, std::pair<SdpVideoFormat, int>> decoder_settings,
24 // TODO(jonaso, webrtc:10335): Consider what to do with factories
25 // vs. field trials.
Jonas Orelande62c2f22022-03-29 11:04:48 +020026 const FieldTrialsView* field_trials) {
Jonas Orelande02f9ee2022-03-25 12:43:14 +010027 return std::make_unique<VideoStreamDecoderImpl>(
28 callbacks, decoder_factory, task_queue_factory,
29 std::move(decoder_settings), field_trials);
philipel2fee4d62018-03-21 16:52:13 +010030}
Danil Chapovalovb703db92019-04-08 16:59:28 +020031
philipel2fee4d62018-03-21 16:52:13 +010032} // namespace webrtc