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 12 #ifndef WEBRTC_MODULES_VIDEO_CODING_CODECS_H264_INCLUDE_H264_H_ 13 #define WEBRTC_MODULES_VIDEO_CODING_CODECS_H264_INCLUDE_H264_H_ 14 15 #include "webrtc/media/base/codec.h" 16 #include "webrtc/modules/video_coding/include/video_codec_interface.h" 17 18 namespace webrtc { 19 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 26 class H264Encoder : public VideoEncoder { 27 public: 28 static H264Encoder* Create(const cricket::VideoCodec& codec); 29 // If H.264 is supported (any implementation). 30 static bool IsSupported(); 31 ~H264Encoder()32 ~H264Encoder() override {} 33 }; 34 35 class H264Decoder : public VideoDecoder { 36 public: 37 static H264Decoder* Create(); 38 static bool IsSupported(); 39 ~H264Decoder()40 ~H264Decoder() override {} 41 }; 42 43 } // namespace webrtc 44 45 #endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_H264_INCLUDE_H264_H_ 46