blob: 6c93b34d696f7ecfaee43d139a068b27a928b2c1 [file] [log] [blame]
Zeke Chin71f6f442015-06-29 14:34:58 -07001/*
2 * Copyright (c) 2015 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_H264_INCLUDE_H264_H_
13#define MODULES_VIDEO_CODING_CODECS_H264_INCLUDE_H264_H_
Zeke Chin71f6f442015-06-29 14:34:58 -070014
Magnus Jedvert849b3ae2017-09-29 17:54:09 +020015#include <vector>
16
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020017#include "media/base/codec.h"
18#include "modules/video_coding/include/video_codec_interface.h"
Zeke Chin71f6f442015-06-29 14:34:58 -070019
20namespace webrtc {
21
Magnus Jedvert849b3ae2017-09-29 17:54:09 +020022struct SdpVideoFormat;
23
hbos9dc59282016-02-03 05:09:37 -080024// Set to disable the H.264 encoder/decoder implementations that are provided if
25// |rtc_use_h264| build flag is true (if false, this function does nothing).
26// This function should only be called before or during WebRTC initialization
27// and is not thread-safe.
28void DisableRtcUseH264();
29
Magnus Jedvert849b3ae2017-09-29 17:54:09 +020030// Returns a vector with all supported internal H264 profiles that we can
31// negotiate in SDP, in order of preference.
32std::vector<SdpVideoFormat> SupportedH264Codecs();
33
Zeke Chin71f6f442015-06-29 14:34:58 -070034class H264Encoder : public VideoEncoder {
35 public:
Magnus Jedvert34c8e6b2017-11-13 13:02:16 +000036 static H264Encoder* Create(const cricket::VideoCodec& codec);
hbosbab934b2016-01-27 01:36:03 -080037 // If H.264 is supported (any implementation).
Zeke Chin71f6f442015-06-29 14:34:58 -070038 static bool IsSupported();
39
40 ~H264Encoder() override {}
41};
42
43class H264Decoder : public VideoDecoder {
44 public:
Magnus Jedvert34c8e6b2017-11-13 13:02:16 +000045 static H264Decoder* Create();
Zeke Chin71f6f442015-06-29 14:34:58 -070046 static bool IsSupported();
47
48 ~H264Decoder() override {}
49};
50
51} // namespace webrtc
52
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020053#endif // MODULES_VIDEO_CODING_CODECS_H264_INCLUDE_H264_H_