Zeke Chin | 71f6f44 | 2015-06-29 14:34:58 -0700 | [diff] [blame] | 1 | /* |
| 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 Bonadei | 92ea95e | 2017-09-15 06:47:31 +0200 | [diff] [blame^] | 12 | #ifndef MODULES_VIDEO_CODING_CODECS_H264_INCLUDE_H264_H_ |
| 13 | #define MODULES_VIDEO_CODING_CODECS_H264_INCLUDE_H264_H_ |
Zeke Chin | 71f6f44 | 2015-06-29 14:34:58 -0700 | [diff] [blame] | 14 | |
Mirko Bonadei | 92ea95e | 2017-09-15 06:47:31 +0200 | [diff] [blame^] | 15 | #include "media/base/codec.h" |
| 16 | #include "modules/video_coding/include/video_codec_interface.h" |
Zeke Chin | 71f6f44 | 2015-06-29 14:34:58 -0700 | [diff] [blame] | 17 | |
| 18 | namespace webrtc { |
| 19 | |
hbos | 9dc5928 | 2016-02-03 05:09:37 -0800 | [diff] [blame] | 20 | // Set to disable the H.264 encoder/decoder implementations that are provided if |
| 21 | // |rtc_use_h264| build flag is true (if false, this function does nothing). |
| 22 | // This function should only be called before or during WebRTC initialization |
| 23 | // and is not thread-safe. |
| 24 | void DisableRtcUseH264(); |
| 25 | |
Zeke Chin | 71f6f44 | 2015-06-29 14:34:58 -0700 | [diff] [blame] | 26 | class H264Encoder : public VideoEncoder { |
| 27 | public: |
magjed | ceecea4 | 2016-11-28 07:20:21 -0800 | [diff] [blame] | 28 | static H264Encoder* Create(const cricket::VideoCodec& codec); |
hbos | bab934b | 2016-01-27 01:36:03 -0800 | [diff] [blame] | 29 | // If H.264 is supported (any implementation). |
Zeke Chin | 71f6f44 | 2015-06-29 14:34:58 -0700 | [diff] [blame] | 30 | static bool IsSupported(); |
| 31 | |
| 32 | ~H264Encoder() override {} |
| 33 | }; |
| 34 | |
| 35 | class H264Decoder : public VideoDecoder { |
| 36 | public: |
| 37 | static H264Decoder* Create(); |
| 38 | static bool IsSupported(); |
| 39 | |
| 40 | ~H264Decoder() override {} |
| 41 | }; |
| 42 | |
| 43 | } // namespace webrtc |
| 44 | |
Mirko Bonadei | 92ea95e | 2017-09-15 06:47:31 +0200 | [diff] [blame^] | 45 | #endif // MODULES_VIDEO_CODING_CODECS_H264_INCLUDE_H264_H_ |