Bug 1918268 (MOZ) - use non-deprecated timestamp accessors from api/video/video_frame.h

This commit is contained in:
Michael Froman 2024-09-20 15:34:48 -05:00
parent f638706149
commit 32e758687f
3 changed files with 3 additions and 3 deletions

View File

@ -1856,7 +1856,7 @@ void WebrtcVideoConduit::OnFrame(const webrtc::VideoFrame& video_frame) {
if (profiler_is_active()) {
MutexAutoLock lock(mMutex);
// The first frame has a delta of zero.
uint32_t rtpTimestamp = video_frame.timestamp();
uint32_t rtpTimestamp = video_frame.rtp_timestamp();
uint32_t timestampDelta =
mLastRTPTimestampReceive.isSome()
? rtpTimestamp - mLastRTPTimestampReceive.value()

View File

@ -364,7 +364,7 @@ void WebrtcGmpVideoEncoder::Encode_g(
GMP_LOG_DEBUG("GMP Encode: failed to create frame");
return;
}
frame->SetTimestamp((aInputImage.timestamp() * 1000ll) /
frame->SetTimestamp((aInputImage.rtp_timestamp() * 1000ll) /
90); // note: rounds down!
// frame->SetDuration(1000000ll/30); // XXX base duration on measured current
// FPS - or don't bother

View File

@ -364,7 +364,7 @@ static already_AddRefed<VideoData> CreateVideoDataFromWebrtcVideoFrame(
// discontinuous time and confuses the video receiver when switching from
// platform to libwebrtc encoder.
TimeUnit timestamp =
media::TimeUnit(aFrame.timestamp(), cricket::kVideoCodecClockrate);
media::TimeUnit(aFrame.rtp_timestamp(), cricket::kVideoCodecClockrate);
return VideoData::CreateFromImage(image->GetSize(), 0, timestamp, aDuration,
image, aIsKeyFrame, timestamp);
}