forked from rerun-io/rerun
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix video loader spinner in 3D views (rerun-io#7544)
### What * Follow-up to rerun-io#7541 * Closes rerun-io#7543 <img width="2398" alt="image" src="https://github.com/user-attachments/assets/6f86614b-5eae-4f6d-a982-18cb877eae5d"> (image via @Wumpf : Wasn't able to catch the spinner because it disappeared right away) Test: ``` pixi run -e examples python3 tests/python/release_checklist/check_video.py ``` https://rerun.io/viewer/pr/7544?url=https%3A%2F%2Fstatic.rerun.io%2Frrd%2F0.19.0-alpha.1%2Bdev%2Fdata_dca3624dd9631b0208ab10257ec9495903699237.rrd ### Checklist * [x] I have read and agree to [Contributor Guide](https://github.com/rerun-io/rerun/blob/main/CONTRIBUTING.md) and the [Code of Conduct](https://github.com/rerun-io/rerun/blob/main/CODE_OF_CONDUCT.md) * [x] I've included a screenshot or gif (if applicable) * [x] I have tested the web demo (if applicable): * Using examples from latest `main` build: [rerun.io/viewer](https://rerun.io/viewer/pr/7544?manifest_url=https://app.rerun.io/version/main/examples_manifest.json) * Using full set of examples from `nightly` build: [rerun.io/viewer](https://rerun.io/viewer/pr/7544?manifest_url=https://app.rerun.io/version/nightly/examples_manifest.json) * [x] The PR title and labels are set such as to maximize their usefulness for the next release's CHANGELOG * [x] If applicable, add a new check to the [release checklist](https://github.com/rerun-io/rerun/blob/main/tests/python/release_checklist)! * [x] If have noted any breaking changes to the log API in `CHANGELOG.md` and the migration guide - [PR Build Summary](https://build.rerun.io/pr/7544) - [Recent benchmark results](https://build.rerun.io/graphs/crates.html) - [Wasm size tracking](https://build.rerun.io/graphs/sizes.html) To run all checks from `main`, comment on the PR with `@rerun-bot full-check`.
- Loading branch information
Showing
11 changed files
with
143 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
from __future__ import annotations | ||
|
||
import os | ||
from argparse import Namespace | ||
from uuid import uuid4 | ||
|
||
import rerun as rr | ||
|
||
README = """\ | ||
# Video support | ||
This test only works in the browser! | ||
The video should show up both in 2D, 3D, and in the selection panel. | ||
When moving the time cursor, a "loading" spinner should show briefly, while the video is seeking. | ||
""" | ||
|
||
|
||
def run(args: Namespace) -> None: | ||
rr.script_setup(args, f"{os.path.basename(__file__)}", recording_id=uuid4()) | ||
|
||
rr.log("readme", rr.TextDocument(README, media_type=rr.MediaType.MARKDOWN), timeless=True) | ||
|
||
# Log video asset which is referred to by frame references. | ||
video_path = os.path.dirname(__file__) + "/../../../tests/assets/video/Big_Buck_Bunny_1080_10s_av1.mp4" | ||
video_asset = rr.AssetVideo(path=video_path) | ||
rr.log("world/cam", video_asset, static=True) | ||
|
||
# Send automatically determined video frame timestamps. | ||
frame_timestamps_ns = video_asset.read_frame_timestamps_ns() | ||
rr.send_columns( | ||
"world/cam", | ||
# Note timeline values don't have to be the same as the video timestamps. | ||
times=[rr.TimeNanosColumn("video_time", frame_timestamps_ns)], | ||
components=[rr.VideoFrameReference.indicator(), rr.components.VideoTimestamp.nanoseconds(frame_timestamps_ns)], | ||
) | ||
|
||
rr.log( | ||
"world/cam", | ||
rr.Transform3D( | ||
translation=[10, 0, 0], | ||
), | ||
static=True, # Static, so it shows up in the "video_time" timeline! | ||
) | ||
|
||
rr.log( | ||
"world/cam", | ||
rr.Pinhole( | ||
resolution=[1920, 1080], | ||
focal_length=1920, | ||
), | ||
static=True, # Static, so it shows up in the "video_time" timeline! | ||
) | ||
|
||
|
||
if __name__ == "__main__": | ||
import argparse | ||
|
||
parser = argparse.ArgumentParser(description="Interactive release checklist") | ||
rr.script_add_args(parser) | ||
args = parser.parse_args() | ||
run(args) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters