Skip to content

Commit

Permalink
webrtc::EncodedImage の API の変更に追従する
Browse files Browse the repository at this point in the history
- Timestamp -> RtpTimestamp
- SetTimestamp -> SetRtpTimestamp
  • Loading branch information
enm10k committed Nov 27, 2023
1 parent 19f5ce5 commit 83d994d
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/hwenc_nvcodec/nvcodec_h264_encoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ int32_t NvCodecH264EncoderImpl::Encode(
? webrtc::VideoContentType::SCREENSHARE
: webrtc::VideoContentType::UNSPECIFIED;
encoded_image_.timing_.flags = webrtc::VideoSendTiming::kInvalid;
encoded_image_.SetTimestamp(frame.timestamp());
encoded_image_.SetRtpTimestamp(frame.timestamp());
encoded_image_.ntp_time_ms_ = frame.ntp_time_ms();
encoded_image_.capture_time_ms_ = frame.render_time_ms();
encoded_image_.rotation_ = frame.rotation();
Expand Down
2 changes: 1 addition & 1 deletion src/hwenc_nvcodec/nvcodec_video_decoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ int32_t NvCodecVideoDecoder::Decode(const webrtc::EncodedImage& input_image,
output_info_ = true;
}

uint32_t pts = input_image.Timestamp();
uint32_t pts = input_image.RtpTimestamp();

for (int i = 0; i < frame_count; i++) {
auto* frame = decoder_->GetLockedFrame();
Expand Down
2 changes: 1 addition & 1 deletion src/hwenc_vpl/vpl_video_decoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ int32_t VplVideoDecoderImpl::Decode(const webrtc::EncodedImage& input_image,
}

// これだとキューイングしたデータとずれるので、本当は surface と一緒に保存して利用するべき
uint64_t pts = input_image.Timestamp();
uint64_t pts = input_image.RtpTimestamp();

mfxStatus sts;
mfxSyncPoint syncp;
Expand Down
2 changes: 1 addition & 1 deletion src/hwenc_vpl/vpl_video_encoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ int32_t VplVideoEncoderImpl::Encode(
? webrtc::VideoContentType::SCREENSHARE
: webrtc::VideoContentType::UNSPECIFIED;
encoded_image_.timing_.flags = webrtc::VideoSendTiming::kInvalid;
encoded_image_.SetTimestamp(frame.timestamp());
encoded_image_.SetRtpTimestamp(frame.timestamp());
encoded_image_.ntp_time_ms_ = frame.ntp_time_ms();
encoded_image_.capture_time_ms_ = frame.render_time_ms();
encoded_image_.rotation_ = frame.rotation();
Expand Down

0 comments on commit 83d994d

Please sign in to comment.