cabana: real-time cursor and video frame sync for chart and video #34301
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR introduces real-time, high-performance synchronization between the cursor and video frames, enhancing the user experience when interacting with the chart and video stream.
During Playback: While the stream is playing, hovering over the chart updates the video thumbnail to display the corresponding frame, allowing users to visually align data points with the video.
simplescreenrecorder-2024-12-21_18.52.58.mp4
While Paused: When the stream is paused, the video area is painted with a larger thumbnail that syncs with the cursor’s position on the chart, providing a preview of the corresponding frame—similar to YouTube’s scrubbing behavior.
simplescreenrecorder-2024-12-21_18.57.35.mp4
Slider Interaction: Dragging the slider also scrubs through the video frames, providing real-time feedback as the user navigates through the timeline.
simplescreenrecorder-2024-12-21_22.36.33.mp4
Slider time indicator: Added a dynamic time indicator on the slider bar that follows the cursor, displaying the corresponding time position on the slider.
NOTE:
Changes from PR #34237 have been reverted in this PR due to event synchronization issues and significant performance delays on laptops without CUDA decoding, For more details, refer to the discussions in PRs #34237 and #34298.
TODO:
// TODO: Dynamically generate more thumbnails during frame decoding to improve scrubbing smoothness.