-
Notifications
You must be signed in to change notification settings - Fork 9.1k
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
replay: send frames based on encodeIdx packet #22361
Conversation
lgtm. the only problem is that the missing frames cannot be traced after this.are we going to do some special processing for lost frames in the future? for example, output a blank frame |
What do you mean by missing frames? A frame that has an encodeIdx packet but is not in the hevc? |
I mean there is no corresponding encode idx for getRoadCameraState().getFrameId() |
c03dbf7
to
0b53929
Compare
Where do we still call |
Sorry for my bad expression, I mean, do we need to consider the situation where the frame does not has a corresponding encodeid? and do some special processing in the future, fox example: #22095 |
Think it's fine for replay if we only show frames that are actually in the video file for now. We will deal with dropped frames later. |
After this change the demo route doesn't perform very well since it doesn't have eof/sof timestaps set correctly. This is no longer a problem on recent routes. Shouldn't be a problem since we will replace the demo route anyway by something that has |
I suggest to set the ENCODE_IDX's mono_time to SOF to ensure the events order and the frame sending time. This can solve all the side effects
|
Do you want to handle this outside of the event class? We still need to check for both eof and sof. C2 only has eof set, and in earlier routes none of them are set. |
How about put aside this simplification for now, back later and continue to do it? |
This change is necessary for replay to work on qlogs, since they don't contain full frequency cameraState packets. |
hmmm...OIC |
Let's merge this for now, but the real solution is probably to insert a special event type that only handles sending the frame data over visionIPC. That should allow us to send the encodeIdx packet at the correct logMonoTime, while also maintaining timing accuracy of the video. |
@pd0wm I have submitted a new PR #22364 after read your code. insert new custom encode events in |
6906210
to
e224b0f
Compare
e224b0f
to
bdfc7b9
Compare
@pd0wm It seems that there are duplicate frame eidx in the dmeo route, each frame has two identical eidx, as a result, every frame is published twice |
It shouldn't since it checks for the type to be HEVC before publishing. We should really replace the demo route with something more recent though. |
This should simplify things a bit. @deanlee what do you think?