-
Notifications
You must be signed in to change notification settings - Fork 116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[android] Refine dropped frames reporting #2006
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2006 +/- ##
==========================================
+ Coverage 57.68% 57.69% +0.01%
==========================================
Files 1907 1907
Lines 95181 95181
==========================================
+ Hits 54905 54917 +12
+ Misses 40276 40264 -12 ☔ View full report in Codecov by Sentry. |
OnFrameRenderedListener can be significantly delayed and some frames may have been rendered even if there was no callback generated, so we can't rely on the callback to get dropped frames. We now predict if a frame would be dropped on the time when it's enqueued. b/302198176
e27b4ef
to
8f15667
Compare
@@ -485,6 +485,7 @@ bool MediaDecoder::ProcessOneInputBuffer( | |||
status = media_codec_bridge_->QueueInputBuffer( | |||
dequeue_input_result.index, kNoOffset, size, pts_us, kNoBufferFlags); | |||
} | |||
host_->OnInputBufferEnqueued(media_codec_bridge_.get(), input_buffer); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: OnInputBufferQueued()
, as the platform function is called Queue*()
.
SB_LOG(WARNING) << "feed video AU with same time stamp " << timestamp; | ||
return; | ||
} | ||
if (input_buffer->timestamp() < media_time) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If a frame is queued right before the current media time, we treat it as not dropped. This is a quite strong assumption and may lead to under report of dropped frames. Have we tried on some devices to see whether this reflects the actual frame drops?
frames_to_be_rendered_.emplace_front(timestamp); | ||
} | ||
|
||
void VideoFrameTracker::OnFrameRendered(int64_t frame_timestamp) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider checking with the partners on whether the behavior of the callback are reliable on certain platforms.
OnFrameRenderedListener can be significantly delayed and some frames may have been rendered even if there was no callback generated, so we can't rely on the callback to get dropped frames. We now predict if a frame would be dropped on the time when it's enqueued.
b/302198176