philipel | 2fee4d6 | 2018-03-21 16:52:13 +0100 | [diff] [blame] | 1 | /* |
| 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 | #ifndef API_VIDEO_VIDEO_STREAM_DECODER_CREATE_H_ |
| 12 | #define API_VIDEO_VIDEO_STREAM_DECODER_CREATE_H_ |
| 13 | |
| 14 | #include <map> |
| 15 | #include <memory> |
| 16 | #include <utility> |
| 17 | |
Jonas Oreland | e62c2f2 | 2022-03-29 11:04:48 +0200 | [diff] [blame^] | 18 | #include "api/field_trials_view.h" |
Danil Chapovalov | b703db9 | 2019-04-08 16:59:28 +0200 | [diff] [blame] | 19 | #include "api/task_queue/task_queue_factory.h" |
philipel | 2fee4d6 | 2018-03-21 16:52:13 +0100 | [diff] [blame] | 20 | #include "api/video/video_stream_decoder.h" |
Danil Chapovalov | b703db9 | 2019-04-08 16:59:28 +0200 | [diff] [blame] | 21 | #include "api/video_codecs/sdp_video_format.h" |
philipel | 2fee4d6 | 2018-03-21 16:52:13 +0100 | [diff] [blame] | 22 | |
| 23 | namespace webrtc { |
Artem Titov | 0e61fdd | 2021-07-25 21:50:14 +0200 | [diff] [blame] | 24 | // The `decoder_settings` parameter is a map between: |
philipel | 2fee4d6 | 2018-03-21 16:52:13 +0100 | [diff] [blame] | 25 | // <payload type> --> <<video format>, <number of cores>>. |
| 26 | // The video format is used when instantiating a decoder, and |
| 27 | // the number of cores is used when initializing the decoder. |
Danil Chapovalov | b703db9 | 2019-04-08 16:59:28 +0200 | [diff] [blame] | 28 | std::unique_ptr<VideoStreamDecoderInterface> CreateVideoStreamDecoder( |
| 29 | VideoStreamDecoderInterface::Callbacks* callbacks, |
philipel | 2fee4d6 | 2018-03-21 16:52:13 +0100 | [diff] [blame] | 30 | VideoDecoderFactory* decoder_factory, |
Danil Chapovalov | b703db9 | 2019-04-08 16:59:28 +0200 | [diff] [blame] | 31 | TaskQueueFactory* task_queue_factory, |
Jonas Oreland | e02f9ee | 2022-03-25 12:43:14 +0100 | [diff] [blame] | 32 | std::map<int, std::pair<SdpVideoFormat, int>> decoder_settings, |
Jonas Oreland | e62c2f2 | 2022-03-29 11:04:48 +0200 | [diff] [blame^] | 33 | const FieldTrialsView* field_trials = nullptr); |
philipel | 2fee4d6 | 2018-03-21 16:52:13 +0100 | [diff] [blame] | 34 | |
| 35 | } // namespace webrtc |
| 36 | |
| 37 | #endif // API_VIDEO_VIDEO_STREAM_DECODER_CREATE_H_ |