From 329c9407e02cf7e4e04378325ac478efae2b757b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Bostr=C3=B6m?= Date: Wed, 22 Jun 2016 18:26:59 +0200 Subject: [PATCH] Add encoder/decoder names to software H264. BUG= R=hbos@webrtc.org Review URL: https://codereview.webrtc.org/2088513004 . Cr-Commit-Position: refs/heads/master@{#13258} --- webrtc/modules/video_coding/codecs/h264/h264_decoder_impl.cc | 4 ++++ webrtc/modules/video_coding/codecs/h264/h264_decoder_impl.h | 2 ++ webrtc/modules/video_coding/codecs/h264/h264_encoder_impl.cc | 4 ++++ webrtc/modules/video_coding/codecs/h264/h264_encoder_impl.h | 2 ++ 4 files changed, 12 insertions(+) diff --git a/webrtc/modules/video_coding/codecs/h264/h264_decoder_impl.cc b/webrtc/modules/video_coding/codecs/h264/h264_decoder_impl.cc index 563df37fe8..bbf1ee1df2 100644 --- a/webrtc/modules/video_coding/codecs/h264/h264_decoder_impl.cc +++ b/webrtc/modules/video_coding/codecs/h264/h264_decoder_impl.cc @@ -395,6 +395,10 @@ int32_t H264DecoderImpl::Decode(const EncodedImage& input_image, return WEBRTC_VIDEO_CODEC_OK; } +const char* H264DecoderImpl::ImplementationName() const { + return "FFmpeg"; +} + bool H264DecoderImpl::IsInitialized() const { return av_context_ != nullptr; } diff --git a/webrtc/modules/video_coding/codecs/h264/h264_decoder_impl.h b/webrtc/modules/video_coding/codecs/h264/h264_decoder_impl.h index e724c371c8..fc730a4f4d 100644 --- a/webrtc/modules/video_coding/codecs/h264/h264_decoder_impl.h +++ b/webrtc/modules/video_coding/codecs/h264/h264_decoder_impl.h @@ -52,6 +52,8 @@ class H264DecoderImpl : public H264Decoder { const CodecSpecificInfo* codec_specific_info = nullptr, int64_t render_time_ms = -1) override; + const char* ImplementationName() const override; + private: // Called by FFmpeg when it needs a frame buffer to store decoded frames in. // The |VideoFrame| returned by FFmpeg at |Decode| originate from here. Their diff --git a/webrtc/modules/video_coding/codecs/h264/h264_encoder_impl.cc b/webrtc/modules/video_coding/codecs/h264/h264_encoder_impl.cc index c5141b3e25..bba30a3ca8 100644 --- a/webrtc/modules/video_coding/codecs/h264/h264_encoder_impl.cc +++ b/webrtc/modules/video_coding/codecs/h264/h264_encoder_impl.cc @@ -382,6 +382,10 @@ int32_t H264EncoderImpl::Encode(const VideoFrame& input_frame, return WEBRTC_VIDEO_CODEC_OK; } +const char* H264EncoderImpl::ImplementationName() const { + return "OpenH264"; +} + bool H264EncoderImpl::IsInitialized() const { return openh264_encoder_ != nullptr; } diff --git a/webrtc/modules/video_coding/codecs/h264/h264_encoder_impl.h b/webrtc/modules/video_coding/codecs/h264/h264_encoder_impl.h index 6cfa4e4670..c6014e6651 100644 --- a/webrtc/modules/video_coding/codecs/h264/h264_encoder_impl.h +++ b/webrtc/modules/video_coding/codecs/h264/h264_encoder_impl.h @@ -52,6 +52,8 @@ class H264EncoderImpl : public H264Encoder { const CodecSpecificInfo* codec_specific_info, const std::vector* frame_types) override; + const char* ImplementationName() const override; + // Unsupported / Do nothing. int32_t SetChannelParameters(uint32_t packet_loss, int64_t rtt) override; int32_t SetPeriodicKeyFrames(bool enable) override;