Revert "Add Timestamp accessor methods to the EncodedImage class."
This reverts commit f34d467b03da4f20a1d036a20966fcad43d2433f.
Reason for revert: Seems to break downstream project.
Original change's description:
> Add Timestamp accessor methods to the EncodedImage class.
>
> Bug: webrtc:9378
> Change-Id: I59bf14f631f92f0f4e05f60d4af25641a23a53f9
> Reviewed-on: https://webrtc-review.googlesource.com/82100
> Reviewed-by: Stefan Holmer <stefan@webrtc.org>
> Reviewed-by: Philip Eliasson <philipel@webrtc.org>
> Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
> Commit-Queue: Niels Moller <nisse@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#23734}
TBR=brandtr@webrtc.org,nisse@webrtc.org,stefan@webrtc.org,philipel@webrtc.org
Change-Id: I3aa0c0119426886bc583c918aae862eb7f4b6b63
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:9378
Reviewed-on: https://webrtc-review.googlesource.com/85600
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23739}
diff --git a/modules/video_coding/frame_buffer2.cc b/modules/video_coding/frame_buffer2.cc
index 8bb241a..f13ed35 100644
--- a/modules/video_coding/frame_buffer2.cc
+++ b/modules/video_coding/frame_buffer2.cc
@@ -117,8 +117,7 @@
next_frame_it_ = frame_it;
if (frame->RenderTime() == -1)
- frame->SetRenderTime(
- timing_->RenderTimeMs(frame->Timestamp(), now_ms));
+ frame->SetRenderTime(timing_->RenderTimeMs(frame->timestamp, now_ms));
wait_ms = timing_->MaxWaitingTime(frame->RenderTime(), now_ms);
// This will cause the frame buffer to prefer high framerate rather
@@ -147,7 +146,7 @@
if (!frame->delayed_by_retransmission()) {
int64_t frame_delay;
- if (inter_frame_delay_.CalculateDelay(frame->Timestamp(), &frame_delay,
+ if (inter_frame_delay_.CalculateDelay(frame->timestamp, &frame_delay,
frame->ReceivedTime())) {
jitter_estimator_->UpdateEstimate(frame_delay, frame->size());
}
@@ -164,7 +163,7 @@
if (HasBadRenderTiming(*frame, now_ms)) {
jitter_estimator_->Reset();
timing_->Reset();
- frame->SetRenderTime(timing_->RenderTimeMs(frame->Timestamp(), now_ms));
+ frame->SetRenderTime(timing_->RenderTimeMs(frame->timestamp, now_ms));
}
UpdateJitterDelay();
@@ -178,17 +177,17 @@
const VideoLayerFrameId& frame_key = next_frame_it_->first;
const bool frame_is_higher_spatial_layer_of_last_decoded_frame =
- last_decoded_frame_timestamp_ == frame->Timestamp() &&
+ last_decoded_frame_timestamp_ == frame->timestamp &&
last_decoded_frame_key.picture_id == frame_key.picture_id &&
last_decoded_frame_key.spatial_layer < frame_key.spatial_layer;
- if (AheadOrAt(last_decoded_frame_timestamp_, frame->Timestamp()) &&
+ if (AheadOrAt(last_decoded_frame_timestamp_, frame->timestamp) &&
!frame_is_higher_spatial_layer_of_last_decoded_frame) {
// TODO(brandtr): Consider clearing the entire buffer when we hit
// these conditions.
RTC_LOG(LS_WARNING)
<< "Frame with (timestamp:picture_id:spatial_id) ("
- << frame->Timestamp() << ":" << frame->id.picture_id << ":"
+ << frame->timestamp << ":" << frame->id.picture_id << ":"
<< static_cast<int>(frame->id.spatial_layer) << ")"
<< " sent to decoder after frame with"
<< " (timestamp:picture_id:spatial_id) ("
@@ -199,7 +198,7 @@
}
AdvanceLastDecodedFrame(next_frame_it_);
- last_decoded_frame_timestamp_ = frame->Timestamp();
+ last_decoded_frame_timestamp_ = frame->timestamp;
*frame_out = std::move(frame);
return kFrameFound;
}
@@ -298,7 +297,7 @@
timing_->set_max_playout_delay(playout_delay.max_ms);
if (!frame.delayed_by_retransmission())
- timing_->IncomingTimestamp(frame.Timestamp(), frame.ReceivedTime());
+ timing_->IncomingTimestamp(frame.timestamp, frame.ReceivedTime());
}
int64_t FrameBuffer::InsertFrame(std::unique_ptr<EncodedFrame> frame) {
@@ -344,7 +343,7 @@
if (last_decoded_frame_it_ != frames_.end() &&
id <= last_decoded_frame_it_->first) {
- if (AheadOf(frame->Timestamp(), last_decoded_frame_timestamp_) &&
+ if (AheadOf(frame->timestamp, last_decoded_frame_timestamp_) &&
frame->is_keyframe()) {
// If this frame has a newer timestamp but an earlier picture id then we
// assume there has been a jump in the picture id due to some encoder