Skip to content

Commit

Permalink
momo_sample で Safari TP から送信した H.265 が受信できた
Browse files Browse the repository at this point in the history
  • Loading branch information
enm10k committed Jan 10, 2024
1 parent 5ff9dee commit 35fb9a3
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/default_video_formats.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ std::vector<webrtc::SdpVideoFormat> 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;
}
Expand Down
4 changes: 3 additions & 1 deletion src/hwenc_jetson/jetson_video_decoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down Expand Up @@ -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;
}
Expand Down
6 changes: 6 additions & 0 deletions src/sora_video_decoder_factory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,12 @@ SoraVideoDecoderFactoryConfig GetDefaultVideoDecoderFactoryConfig(
return std::unique_ptr<webrtc::VideoDecoder>(
absl::make_unique<JetsonVideoDecoder>(webrtc::kVideoCodecH264));
}));
config.decoders.insert(
config.decoders.begin(),
VideoDecoderConfig(webrtc::kVideoCodecH265, [](auto format) {
return std::unique_ptr<webrtc::VideoDecoder>(
absl::make_unique<JetsonVideoDecoder>(webrtc::kVideoCodecH265));
}));
#endif

return config;
Expand Down

0 comments on commit 35fb9a3

Please sign in to comment.