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 
12 #ifndef MODULES_VIDEO_CODING_CODECS_VP9_INCLUDE_VP9_H_
13 #define MODULES_VIDEO_CODING_CODECS_VP9_INCLUDE_VP9_H_
14 
15 #include <memory>
16 #include <vector>
17 
18 #include "api/video_codecs/sdp_video_format.h"
19 #include "media/base/codec.h"
20 #include "modules/video_coding/include/video_codec_interface.h"
21 
22 namespace webrtc {
23 
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 
28 // Returns a vector with all supported internal VP9 decode profiles in order of
29 // preference. These will be availble for receive-only connections.
30 std::vector<SdpVideoFormat> SupportedVP9DecoderCodecs();
31 
32 class VP9Encoder : public VideoEncoder {
33  public:
34   // Deprecated. Returns default implementation using VP9 Profile 0.
35   // TODO(emircan): Remove once this is no longer used.
36   static std::unique_ptr<VP9Encoder> Create();
37   // Parses VP9 Profile from |codec| and returns the appropriate implementation.
38   static std::unique_ptr<VP9Encoder> Create(const cricket::VideoCodec& codec);
39 
~VP9Encoder()40   ~VP9Encoder() override {}
41 };
42 
43 class VP9Decoder : public VideoDecoder {
44  public:
45   static std::unique_ptr<VP9Decoder> Create();
46 
~VP9Decoder()47   ~VP9Decoder() override {}
48 };
49 }  // namespace webrtc
50 
51 #endif  // MODULES_VIDEO_CODING_CODECS_VP9_INCLUDE_VP9_H_
52