marpan@webrtc.org | 5b88317 | 2014-11-01 06:10:48 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2014 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 | |
Mirko Bonadei | 92ea95e | 2017-09-15 06:47:31 +0200 | [diff] [blame] | 12 | #ifndef MODULES_VIDEO_CODING_CODECS_VP9_INCLUDE_VP9_H_ |
| 13 | #define MODULES_VIDEO_CODING_CODECS_VP9_INCLUDE_VP9_H_ |
marpan@webrtc.org | 5b88317 | 2014-11-01 06:10:48 +0000 | [diff] [blame] | 14 | |
Magnus Jedvert | 46a2765 | 2017-11-13 14:10:02 +0100 | [diff] [blame] | 15 | #include <memory> |
Emircan Uysaler | 98badbc | 2018-06-28 10:59:02 -0700 | [diff] [blame] | 16 | #include <vector> |
Magnus Jedvert | 46a2765 | 2017-11-13 14:10:02 +0100 | [diff] [blame] | 17 | |
Emircan Uysaler | 98badbc | 2018-06-28 10:59:02 -0700 | [diff] [blame] | 18 | #include "api/video_codecs/sdp_video_format.h" |
| 19 | #include "media/base/codec.h" |
Mirko Bonadei | 92ea95e | 2017-09-15 06:47:31 +0200 | [diff] [blame] | 20 | #include "modules/video_coding/include/video_codec_interface.h" |
marpan@webrtc.org | 5b88317 | 2014-11-01 06:10:48 +0000 | [diff] [blame] | 21 | |
| 22 | namespace webrtc { |
| 23 | |
Emircan Uysaler | 98badbc | 2018-06-28 10:59:02 -0700 | [diff] [blame] | 24 | // Returns a vector with all supported internal VP9 profiles that we can |
| 25 | // negotiate in SDP, in order of preference. |
| 26 | std::vector<SdpVideoFormat> SupportedVP9Codecs(); |
| 27 | |
marpan@webrtc.org | 5b88317 | 2014-11-01 06:10:48 +0000 | [diff] [blame] | 28 | class VP9Encoder : public VideoEncoder { |
| 29 | public: |
Emircan Uysaler | 98badbc | 2018-06-28 10:59:02 -0700 | [diff] [blame] | 30 | // Deprecated. Returns default implementation using VP9 Profile 0. |
| 31 | // TODO(emircan): Remove once this is no longer used. |
Magnus Jedvert | 46a2765 | 2017-11-13 14:10:02 +0100 | [diff] [blame] | 32 | static std::unique_ptr<VP9Encoder> Create(); |
Emircan Uysaler | 98badbc | 2018-06-28 10:59:02 -0700 | [diff] [blame] | 33 | // Parses VP9 Profile from |codec| and returns the appropriate implementation. |
| 34 | static std::unique_ptr<VP9Encoder> Create(const cricket::VideoCodec& codec); |
marpan@webrtc.org | 5b88317 | 2014-11-01 06:10:48 +0000 | [diff] [blame] | 35 | |
Paulina Hensman | a680a6a | 2018-04-05 11:42:24 +0200 | [diff] [blame] | 36 | ~VP9Encoder() override {} |
marpan@webrtc.org | 5b88317 | 2014-11-01 06:10:48 +0000 | [diff] [blame] | 37 | }; |
| 38 | |
marpan@webrtc.org | 5b88317 | 2014-11-01 06:10:48 +0000 | [diff] [blame] | 39 | class VP9Decoder : public VideoDecoder { |
| 40 | public: |
Magnus Jedvert | 46a2765 | 2017-11-13 14:10:02 +0100 | [diff] [blame] | 41 | static std::unique_ptr<VP9Decoder> Create(); |
marpan@webrtc.org | 5b88317 | 2014-11-01 06:10:48 +0000 | [diff] [blame] | 42 | |
Paulina Hensman | a680a6a | 2018-04-05 11:42:24 +0200 | [diff] [blame] | 43 | ~VP9Decoder() override {} |
marpan@webrtc.org | 5b88317 | 2014-11-01 06:10:48 +0000 | [diff] [blame] | 44 | }; |
| 45 | } // namespace webrtc |
| 46 | |
Mirko Bonadei | 92ea95e | 2017-09-15 06:47:31 +0200 | [diff] [blame] | 47 | #endif // MODULES_VIDEO_CODING_CODECS_VP9_INCLUDE_VP9_H_ |