blob: 9c58ad468d44f9f7439684561194938c66f380e8 [file] [log] [blame]
Magnus Jedvertd4b0c052017-09-14 10:24:54 +02001/*
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 Bonadei92ea95e2017-09-15 06:47:31 +020011#ifndef API_VIDEO_CODECS_VIDEO_DECODER_FACTORY_H_
12#define API_VIDEO_CODECS_VIDEO_DECODER_FACTORY_H_
Magnus Jedvertd4b0c052017-09-14 10:24:54 +020013
14#include <memory>
15#include <vector>
16
17namespace webrtc {
18
19class VideoDecoder;
20struct SdpVideoFormat;
21
22// A factory that creates VideoDecoders.
23// NOTE: This class is still under development and may change without notice.
24class 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 Bonadei92ea95e2017-09-15 06:47:31 +020039#endif // API_VIDEO_CODECS_VIDEO_DECODER_FACTORY_H_