Magnus Jedvert | d4b0c05 | 2017-09-14 10:24:54 +0200 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2017 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 | |
Mirko Bonadei | 92ea95e | 2017-09-15 06:47:31 +0200 | [diff] [blame^] | 11 | #ifndef API_VIDEO_CODECS_VIDEO_DECODER_FACTORY_H_ |
| 12 | #define API_VIDEO_CODECS_VIDEO_DECODER_FACTORY_H_ |
Magnus Jedvert | d4b0c05 | 2017-09-14 10:24:54 +0200 | [diff] [blame] | 13 | |
| 14 | #include <memory> |
| 15 | #include <vector> |
| 16 | |
| 17 | namespace webrtc { |
| 18 | |
| 19 | class VideoDecoder; |
| 20 | struct SdpVideoFormat; |
| 21 | |
| 22 | // A factory that creates VideoDecoders. |
| 23 | // NOTE: This class is still under development and may change without notice. |
| 24 | class VideoDecoderFactory { |
| 25 | public: |
| 26 | // Returns a list of supported video formats in order of preference, to use |
| 27 | // for signaling etc. |
| 28 | virtual std::vector<SdpVideoFormat> GetSupportedFormats() const = 0; |
| 29 | |
| 30 | // Creates a VideoDecoder for the specified format. |
| 31 | virtual std::unique_ptr<VideoDecoder> CreateVideoDecoder( |
| 32 | const SdpVideoFormat& format) = 0; |
| 33 | |
| 34 | virtual ~VideoDecoderFactory() {} |
| 35 | }; |
| 36 | |
| 37 | } // namespace webrtc |
| 38 | |
Mirko Bonadei | 92ea95e | 2017-09-15 06:47:31 +0200 | [diff] [blame^] | 39 | #endif // API_VIDEO_CODECS_VIDEO_DECODER_FACTORY_H_ |