Skip to content
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

cabana: Improve seeking and zooming #32334

Merged
merged 3 commits into from
May 3, 2024

Conversation

deanlee
Copy link
Contributor

@deanlee deanlee commented May 2, 2024

resolve https://github.com/commaai/openpilot/discussions/26091#discussioncomment-9289543 :

  1. Immediately update the timeline to the current seeked-to time after seeking.
  2. Improve camera caching by storing decoded frames within a 2-second window. This significantly boosts performance, especially when zooming into short time ranges, as frames can be retrieved from the cache instead of being decoded with ffmpeg.
  3. Immediately return after calling seekTo() in ChartsWidget::updateState() to prevent drawing incorrect timelines in Chart::updatePlot().

The comparison after zooming in to 100 milliseconds (Real-time recording) :
before (Seems stuck because of camera blocking and incorrect updatePlot, though it's not truly hanging) :

Kazam_screencast_00145.webm

after:

Kazam_screencast_00144.webm

Copy link
Contributor

github-actions bot commented May 2, 2024

Thanks for contributing to openpilot! In order for us to review your PR as quickly as possible, check the following:

  • Convert your PR to a draft unless it's ready to review
  • Read the contributing docs
  • Before marking as "ready for review", ensure:
    • the goal is clearly stated in the description
    • all the tests are passing
    • the change is something we merge
    • include a route or your device' dongle ID if relevant

@deanlee deanlee changed the title cbana: Improve seeking and zoomming, fix issue https://github.com/commaai/openpilot/discussions/26091#discussioncomment-8846501 cbana: Improve seeking and zoomming May 2, 2024
@github-actions github-actions bot added the tools label May 2, 2024
@deanlee deanlee changed the title cbana: Improve seeking and zoomming cabana: Improve seeking and zoomming May 2, 2024
@deanlee deanlee changed the title cabana: Improve seeking and zoomming cabana: Improve seeking and zooming May 2, 2024
@deanlee deanlee force-pushed the cabana_update_after_seekto branch from 2e3a27b to 583139c Compare May 2, 2024 07:46
@deanlee deanlee marked this pull request as draft May 2, 2024 13:33
@deanlee deanlee force-pushed the cabana_update_after_seekto branch 4 times, most recently from 01856f8 to d10737d Compare May 2, 2024 16:55
@deanlee deanlee force-pushed the cabana_update_after_seekto branch 2 times, most recently from c6b9871 to 77403e3 Compare May 3, 2024 07:46
@deanlee deanlee force-pushed the cabana_update_after_seekto branch from 77403e3 to 9951eff Compare May 3, 2024 07:57
@deanlee deanlee marked this pull request as ready for review May 3, 2024 08:21
@sshane
Copy link
Contributor

sshane commented May 3, 2024

fyi I also had hanging when zooming in with wide ranges (~minutes), which seems fixed with this!

@sshane
Copy link
Contributor

sshane commented May 3, 2024

I noticed I can't press the back mouse button nearly as quickly to zoom out any more. It would also be nice to allow redo zoom actions with the forward mouse button (though not necessarily in this PR!)

@deanlee
Copy link
Contributor Author

deanlee commented May 3, 2024

I noticed I can't press the back mouse button nearly as quickly to zoom out any more. It would also be nice to allow redo zoom actions with the forward mouse button (though not necessarily in this PR!)

Since I don't have a back button on my mouse right now, I can't check it. But from what I can see, there don't seem to be any issues that would cause the back button to stop working (This part of the code has never been changed). I suggest adding support for the forward button and fixing any possible issues with the back button in a separate PR.

@sshane sshane merged commit d72f000 into commaai:master May 3, 2024
27 checks passed
@deanlee deanlee deleted the cabana_update_after_seekto branch May 3, 2024 09:47
dazoe pushed a commit to dazoe/openpilot that referenced this pull request May 5, 2024
* Improve seeking and zooming

* No repeated calculation of freq

* set min zoom seconds to 10ms
cydia2020 pushed a commit to cydia2020/dodgypilot that referenced this pull request May 14, 2024
* Improve seeking and zooming

* No repeated calculation of freq

* set min zoom seconds to 10ms
Edison-CBS pushed a commit to Edison-CBS/openpilot that referenced this pull request Sep 15, 2024
* Improve seeking and zooming

* No repeated calculation of freq

* set min zoom seconds to 10ms
old-commit-hash: d72f000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants