mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-25 20:01:50 +00:00
Bug 1918268 (MOZ) - use non-deprecated timestamp accessors from api/video/video_frame.h
This commit is contained in:
parent
f638706149
commit
32e758687f
@ -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()
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user