Skip to content

Commit

Permalink
fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
mpromonet committed Aug 19, 2024
1 parent 946007b commit 3c472ac
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion inc/NullEncoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class NullEncoder : public webrtc::VideoEncoder {

// get webrtc::EncodedImage
EncodedVideoFrameBuffer* encodedBuffer = (EncodedVideoFrameBuffer*)buffer.get();
webrtc::EncodedImage encoded_image = encodedBuffer->getEncodedImage(frame.timestamp(), frame.ntp_time_ms());
webrtc::EncodedImage encoded_image = encodedBuffer->getEncodedImage(frame.rtp_timestamp(), frame.ntp_time_ms());

RTC_LOG(LS_VERBOSE) << "EncodedImage " << frame.id() << " " << encoded_image.FrameType() << " " << buffer->width() << "x" << buffer->height();

Expand Down
4 changes: 2 additions & 2 deletions inc/VideoDecoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ class VideoDecoder : public rtc::VideoSourceInterface<webrtc::VideoFrame>, publi

// waiting
if ( (m_wait) && (m_prevts != 0) ) {
int64_t periodSource = decodedImage.timestamp() - m_previmagets;
int64_t periodSource = decodedImage.timestamp_ms() - m_previmagets;
int64_t periodDecode = ts-m_prevts;

RTC_LOG(LS_VERBOSE) << "VideoDecoder::Decoded interframe decode:" << periodDecode << " source:" << periodSource;
Expand All @@ -172,7 +172,7 @@ class VideoDecoder : public rtc::VideoSourceInterface<webrtc::VideoFrame>, publi

m_scaler.OnFrame(decodedImage);

m_previmagets = decodedImage.timestamp();
m_previmagets = decodedImage.timestamp_ms();
m_prevts = std::chrono::high_resolution_clock::now().time_since_epoch().count()/1000/1000;

return 1;
Expand Down
4 changes: 2 additions & 2 deletions inc/VideoScaler.h
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,9 @@ class VideoScaler : public rtc::VideoSinkInterface<webrtc::VideoFrame>, public
webrtc::VideoFrame scaledFrame = webrtc::VideoFrame::Builder()
.set_video_frame_buffer(scaled_buffer)
.set_rotation(m_rotation)
.set_timestamp_rtp(frame.timestamp())
.set_timestamp_rtp(frame.rtp_timestamp())
.set_timestamp_ms(frame.render_time_ms())
.set_id(frame.timestamp())
.set_id(frame.timestamp_us())
.build();

m_broadcaster.OnFrame(scaledFrame);
Expand Down

0 comments on commit 3c472ac

Please sign in to comment.