Skip to content

Commit

Permalink
hwenc_jetson も webrtc::EncodedImage の API の変更の追従が必要だった
Browse files Browse the repository at this point in the history
  • Loading branch information
enm10k committed Nov 27, 2023
1 parent a5bba89 commit 6581f42
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/hwenc_jetson/jetson_video_decoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,16 +125,16 @@ int32_t JetsonVideoDecoder::Decode(const webrtc::EncodedImage& input_image,

v4l2_buf.flags |= V4L2_BUF_FLAG_TIMESTAMP_COPY;
v4l2_buf.timestamp.tv_sec =
input_image.Timestamp() / rtc::kNumMicrosecsPerSec;
input_image.RtpTimestamp() / rtc::kNumMicrosecsPerSec;
v4l2_buf.timestamp.tv_usec =
input_image.Timestamp() % rtc::kNumMicrosecsPerSec;
input_image.RtpTimestamp() % rtc::kNumMicrosecsPerSec;

if (decoder_->output_plane.qBuffer(v4l2_buf, nullptr) < 0) {
RTC_LOG(LS_ERROR) << "Failed to qBuffer at encoder output_plane";
return WEBRTC_VIDEO_CODEC_ERROR;
}

RTC_LOG(LS_INFO) << __FUNCTION__ << " timestamp:" << input_image.Timestamp()
RTC_LOG(LS_INFO) << __FUNCTION__ << " timestamp:" << input_image.RtpTimestamp()
<< " bytesused:" << buffer->planes[0].bytesused;
return WEBRTC_VIDEO_CODEC_OK;
}
Expand Down
2 changes: 1 addition & 1 deletion src/hwenc_jetson/jetson_video_encoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -776,7 +776,7 @@ int32_t JetsonVideoEncoder::SendFrame(
return WEBRTC_VIDEO_CODEC_UNINITIALIZED;
}

encoded_image_.SetTimestamp(params->timestamp_rtp);
encoded_image_.SetRtpTimestamp(params->timestamp_rtp);
encoded_image_.SetColorSpace(params->color_space);
encoded_image_._encodedWidth = params->width;
encoded_image_._encodedHeight = params->height;
Expand Down

0 comments on commit 6581f42

Please sign in to comment.