diff --git a/src/default_video_formats.cpp b/src/default_video_formats.cpp index 2b489da8..2421e508 100644 --- a/src/default_video_formats.cpp +++ b/src/default_video_formats.cpp @@ -36,6 +36,8 @@ std::vector GetDefaultVideoFormats( r.push_back( CreateH264Format(webrtc::H264Profile::kProfileConstrainedBaseline, webrtc::H264Level::kLevel3_1, "0")); + } else if (codec == webrtc::kVideoCodecH265) { + r.push_back(webrtc::SdpVideoFormat(cricket::kH265CodecName)); } return r; } diff --git a/src/hwenc_jetson/jetson_video_decoder.cpp b/src/hwenc_jetson/jetson_video_decoder.cpp index 8b2b5762..a236eb16 100644 --- a/src/hwenc_jetson/jetson_video_decoder.cpp +++ b/src/hwenc_jetson/jetson_video_decoder.cpp @@ -43,6 +43,7 @@ JetsonVideoDecoder::JetsonVideoDecoder(webrtc::VideoCodecType codec) : input_format_(codec == webrtc::kVideoCodecVP8 ? V4L2_PIX_FMT_VP8 : codec == webrtc::kVideoCodecVP9 ? V4L2_PIX_FMT_VP9 : codec == webrtc::kVideoCodecH264 ? V4L2_PIX_FMT_H264 + : codec == webrtc::kVideoCodecH265 ? V4L2_PIX_FMT_H265 : codec == webrtc::kVideoCodecAV1 ? V4L2_PIX_FMT_AV1 : 0), decoder_(nullptr), @@ -136,7 +137,8 @@ int32_t JetsonVideoDecoder::Decode(const webrtc::EncodedImage& input_image, return WEBRTC_VIDEO_CODEC_ERROR; } - RTC_LOG(LS_INFO) << __FUNCTION__ << " timestamp:" << input_image.RtpTimestamp() + RTC_LOG(LS_INFO) << __FUNCTION__ + << " timestamp:" << input_image.RtpTimestamp() << " bytesused:" << buffer->planes[0].bytesused; return WEBRTC_VIDEO_CODEC_OK; } diff --git a/src/sora_video_decoder_factory.cpp b/src/sora_video_decoder_factory.cpp index a94060db..51a0291f 100644 --- a/src/sora_video_decoder_factory.cpp +++ b/src/sora_video_decoder_factory.cpp @@ -234,6 +234,12 @@ SoraVideoDecoderFactoryConfig GetDefaultVideoDecoderFactoryConfig( return std::unique_ptr( absl::make_unique(webrtc::kVideoCodecH264)); })); + config.decoders.insert( + config.decoders.begin(), + VideoDecoderConfig(webrtc::kVideoCodecH265, [](auto format) { + return std::unique_ptr( + absl::make_unique(webrtc::kVideoCodecH265)); + })); #endif return config;