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.
Move web video decoder from re_renderer to re_video (rerun-io#7924)
### What Pure refactor. This greatly simplifies how video playing is structured: * `re_renderer` holds what's now called the `VideoPlayer` - it's job is submitting things to a decoder and copy frames to textures * the only platform specific part is now the texture copy, removing duplicated logic between the web & native chunk decoders * re_video has now an AsynDecoder for everything (that's a learning from the ongoing ffmpeg work) and that's what re_renderer's video player always uses ---- This leaves us with the following structure: `re_renderer::Video` - _several_ -> `re_renderer::VideoPlayer` (-> `re_renderer::ChunkDecoder`) -> `re_video::AsyncDecoder` `AsyncDecoder` is a trait implemented by * `WebVideoDecoder` * `AsyncDecoderWrapper` * in turn implemented by `SyncDav1dDecoder` * upcoming: ffmpeg h264 decoder ---- Another nice property of this - and what sparked this refactor - is that every decoded frame now goes through the same `Frame` datastructure, making easy to report additional information from the decoders. Future work: * `ChunkDecoder` should be folded into the `VideoPlayer` in re_renderer. Left it for now since this pr is already messy and there's going to be changes to our decode pacing soonish. * distinction between re_renderer's `Video` (data + several players) and `VideoPlayer` is still meaningful, but a bit confusing. I'm sure we can do something about that * the video pacing itself could be separated from the texture writing. That would allow to move `Video` and `VideoPlayer` to `re_video` as well. The annoyance here though is that this requires some sort of consumer abstraction for the frame 🤔 (which seems a bit unnecessary for us right now) ### 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/7924?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/7924?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/7924) - [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`. …to `AsyncDecoderWrapper`
- Loading branch information
Showing
20 changed files
with
603 additions
and
688 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
Oops, something went wrong.