blob: 8091cacec906596add2eba69dfa3e4e4c543c6f6 [file] [log] [blame]
marpan@webrtc.org5b883172014-11-01 06:10:48 +00001/*
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 Bonadei92ea95e2017-09-15 06:47:31 +020012#ifndef MODULES_VIDEO_CODING_CODECS_VP9_INCLUDE_VP9_H_
13#define MODULES_VIDEO_CODING_CODECS_VP9_INCLUDE_VP9_H_
marpan@webrtc.org5b883172014-11-01 06:10:48 +000014
Magnus Jedvert46a27652017-11-13 14:10:02 +010015#include <memory>
Emircan Uysaler98badbc2018-06-28 10:59:02 -070016#include <vector>
Magnus Jedvert46a27652017-11-13 14:10:02 +010017
Emircan Uysaler98badbc2018-06-28 10:59:02 -070018#include "api/video_codecs/sdp_video_format.h"
19#include "media/base/codec.h"
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020020#include "modules/video_coding/include/video_codec_interface.h"
marpan@webrtc.org5b883172014-11-01 06:10:48 +000021
22namespace webrtc {
23
Emircan Uysaler98badbc2018-06-28 10:59:02 -070024// Returns a vector with all supported internal VP9 profiles that we can
25// negotiate in SDP, in order of preference.
26std::vector<SdpVideoFormat> SupportedVP9Codecs();
27
marpan@webrtc.org5b883172014-11-01 06:10:48 +000028class VP9Encoder : public VideoEncoder {
29 public:
Emircan Uysaler98badbc2018-06-28 10:59:02 -070030 // Deprecated. Returns default implementation using VP9 Profile 0.
31 // TODO(emircan): Remove once this is no longer used.
Magnus Jedvert46a27652017-11-13 14:10:02 +010032 static std::unique_ptr<VP9Encoder> Create();
Emircan Uysaler98badbc2018-06-28 10:59:02 -070033 // Parses VP9 Profile from |codec| and returns the appropriate implementation.
34 static std::unique_ptr<VP9Encoder> Create(const cricket::VideoCodec& codec);
marpan@webrtc.org5b883172014-11-01 06:10:48 +000035
Paulina Hensmana680a6a2018-04-05 11:42:24 +020036 ~VP9Encoder() override {}
marpan@webrtc.org5b883172014-11-01 06:10:48 +000037};
38
marpan@webrtc.org5b883172014-11-01 06:10:48 +000039class VP9Decoder : public VideoDecoder {
40 public:
Magnus Jedvert46a27652017-11-13 14:10:02 +010041 static std::unique_ptr<VP9Decoder> Create();
marpan@webrtc.org5b883172014-11-01 06:10:48 +000042
Paulina Hensmana680a6a2018-04-05 11:42:24 +020043 ~VP9Decoder() override {}
marpan@webrtc.org5b883172014-11-01 06:10:48 +000044};
45} // namespace webrtc
46
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020047#endif // MODULES_VIDEO_CODING_CODECS_VP9_INCLUDE_VP9_H_