Skip to content

Commit

Permalink
fix build with latest webrtc sdk
Browse files Browse the repository at this point in the history
  • Loading branch information
mpromonet committed Oct 18, 2023
1 parent 2d0afce commit ecc4dcb
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion inc/NullDecoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class NullDecoder : public webrtc::VideoDecoder {
webrtc::VideoFrame frame = webrtc::VideoFrame::Builder()
.set_video_frame_buffer(frameBuffer)
.set_rotation(webrtc::kVideoRotation_0)
.set_timestamp_rtp(input_image.Timestamp())
.set_timestamp_rtp(input_image.RtpTimestamp())
.set_timestamp_ms(render_time_ms)
.set_ntp_time_ms(input_image.NtpTimeMs())
.build();
Expand Down
2 changes: 1 addition & 1 deletion inc/NullEncoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class NullEncoder : public webrtc::VideoEncoder {
// build webrtc::EncodedImage
webrtc::EncodedImage encoded_image;
encoded_image.SetEncodedData(webrtc::EncodedImageBuffer::Create(data, dataSize));
encoded_image.SetTimestamp(frame.timestamp());
encoded_image.SetRtpTimestamp(frame.timestamp());
encoded_image.ntp_time_ms_ = frame.ntp_time_ms();
encoded_image._frameType = frameType;

Expand Down
4 changes: 2 additions & 2 deletions inc/VideoDecoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -252,9 +252,9 @@ class VideoDecoder : public rtc::VideoSourceInterface<webrtc::VideoFrame>, publi
if (size) {
webrtc::EncodedImage input_image;
input_image.SetEncodedData(frame.m_content);
input_image._frameType = frame.m_frameType;
input_image.SetFrameType(frame.m_frameType);
input_image.ntp_time_ms_ = frame.m_timestamp_ms;
input_image.SetTimestamp(frame.m_timestamp_ms); // store time in ms that overflow the 32bits
input_image.SetRtpTimestamp(frame.m_timestamp_ms); // store time in ms that overflow the 32bits

if (this->hasDecoder()) {
int res = m_decoder->Decode(input_image, false, frame.m_timestamp_ms);
Expand Down

0 comments on commit ecc4dcb

Please sign in to comment.