Renamed FrameObject to EncodedFrame.

The plan is to:
 1. Move FrameObject to api/video.
 2. Rename FrameObject to EncodedFrame.
 3. Move EncodedFrame out of the video_coding namespace.

This is the 2nd CL.

Bug: webrtc:8909
Change-Id: I5e76a0a3b306156b8bc1de67834b4adf14bebef9
Reviewed-on: https://webrtc-review.googlesource.com/56182
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Tommi <tommi@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22158}
This commit is contained in:
philipel
2018-02-22 14:35:06 +01:00
committed by Commit Bot
parent a5c735f5d9
commit e7c891f953
14 changed files with 49 additions and 46 deletions

View File

@ -60,7 +60,7 @@ FrameBuffer::~FrameBuffer() {}
FrameBuffer::ReturnReason FrameBuffer::NextFrame(
int64_t max_wait_time_ms,
std::unique_ptr<FrameObject>* frame_out,
std::unique_ptr<EncodedFrame>* frame_out,
bool keyframe_required) {
TRACE_EVENT0("webrtc", "FrameBuffer::NextFrame");
int64_t latest_return_time_ms =
@ -106,7 +106,7 @@ FrameBuffer::ReturnReason FrameBuffer::NextFrame(
continue;
}
FrameObject* frame = frame_it->second.frame.get();
EncodedFrame* frame = frame_it->second.frame.get();
if (keyframe_required && !frame->is_keyframe())
continue;
@ -134,7 +134,7 @@ FrameBuffer::ReturnReason FrameBuffer::NextFrame(
rtc::CritScope lock(&crit_);
now_ms = clock_->TimeInMilliseconds();
if (next_frame_it_ != frames_.end()) {
std::unique_ptr<FrameObject> frame =
std::unique_ptr<EncodedFrame> frame =
std::move(next_frame_it_->second.frame);
if (!frame->delayed_by_retransmission()) {
@ -208,7 +208,8 @@ FrameBuffer::ReturnReason FrameBuffer::NextFrame(
return kTimeout;
}
bool FrameBuffer::HasBadRenderTiming(const FrameObject& frame, int64_t now_ms) {
bool FrameBuffer::HasBadRenderTiming(const EncodedFrame& frame,
int64_t now_ms) {
// Assume that render timing errors are due to changes in the video stream.
int64_t render_time_ms = frame.RenderTimeMs();
const int64_t kMaxVideoDelayMs = 10000;
@ -255,7 +256,7 @@ void FrameBuffer::UpdateRtt(int64_t rtt_ms) {
jitter_estimator_->UpdateRtt(rtt_ms);
}
bool FrameBuffer::ValidReferences(const FrameObject& frame) const {
bool FrameBuffer::ValidReferences(const EncodedFrame& frame) const {
if (frame.picture_id < 0)
return false;
@ -275,7 +276,7 @@ bool FrameBuffer::ValidReferences(const FrameObject& frame) const {
return true;
}
void FrameBuffer::UpdatePlayoutDelays(const FrameObject& frame) {
void FrameBuffer::UpdatePlayoutDelays(const EncodedFrame& frame) {
TRACE_EVENT0("webrtc", "FrameBuffer::UpdatePlayoutDelays");
PlayoutDelay playout_delay = frame.EncodedImage().playout_delay_;
if (playout_delay.min_ms >= 0)
@ -285,7 +286,7 @@ void FrameBuffer::UpdatePlayoutDelays(const FrameObject& frame) {
timing_->set_max_playout_delay(playout_delay.max_ms);
}
int64_t FrameBuffer::InsertFrame(std::unique_ptr<FrameObject> frame) {
int64_t FrameBuffer::InsertFrame(std::unique_ptr<EncodedFrame> frame) {
TRACE_EVENT0("webrtc", "FrameBuffer::InsertFrame");
RTC_DCHECK(frame);
if (stats_callback_)
@ -459,7 +460,7 @@ void FrameBuffer::AdvanceLastDecodedFrame(FrameMap::iterator decoded) {
}
}
bool FrameBuffer::UpdateFrameInfoWithIncomingFrame(const FrameObject& frame,
bool FrameBuffer::UpdateFrameInfoWithIncomingFrame(const EncodedFrame& frame,
FrameMap::iterator info) {
TRACE_EVENT0("webrtc", "FrameBuffer::UpdateFrameInfoWithIncomingFrame");
FrameKey key(frame.picture_id, frame.spatial_layer);