Conversation
|
I just tried this on my machine and it worked out-of-the-box! This is no small feat given that I am using a different operating system and arch. However, playback was really fast (the window pretty much exited immediately. I tried the viewer with the following snippet. I am using a very slow frame-rate as workaround but we may need a frame rate limiter somewhere? import faery
(
faery.events_stream_from_file(
faery.dirname.parent / "tests" / "data" / "dvs.es",
)
.regularize(frequency_hz=60000.0)
.render(
decay="exponential",
tau="00:00:00.200000",
colormap=faery.colormaps.managua.flipped(),
)
.view()
) |
|
Nonetheless, this is a very strong start. I think that we can merge (merge early, merge often!) and add further features down the line. |
| """ | ||
| Display frames in a GUI viewer using Slint | ||
| """ | ||
| from . import extension |
There was a problem hiding this comment.
"from . import extension" should be moved to lines 13 to 16. The double-import is a bit ugly but it keeps type checkers happy. You may need to add type declarations for the Rust functions to "python/faery/types".
There was a problem hiding this comment.
I added a type file now.
Very very cool! I think the Rust-bet is paying off.
That's an excellent point! I wasn't taking into account that the frequency that we generate frames with might be disjoint from the frequency that we want to display frames. I added a I also added a few quality-of-life improvements, like avoiding the GUI closing when the stream ends and closing the GUI when hitting escape. |
Adds a visualizer that takes a FrameStream and dumps it into a Slint window. The viewer has rudimentary playback control to permit freezing and going back and forth for some frames (by default: 1024).
Also fixes some flake issues where the environment wouldn't be correctly activated.
rustupwould install a user-wide configuration, which clashed with the project-specific environment.