Skip to content

Commit

Permalink
review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
abey79 committed Nov 13, 2024
1 parent dea20d4 commit c879643
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 10 deletions.
24 changes: 15 additions & 9 deletions crates/viewer/re_viewer/src/ui/settings_screen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,8 @@ fn video_section_ui(ui: &mut Ui, app_options: &mut AppOptions) {
// This affects only the web target, so we don't need to show it on native.
#[cfg(target_arch = "wasm32")]
{
use re_video::decode::DecodeHardwareAcceleration;

let hardware_acceleration = &mut app_options.video_decoder_hw_acceleration;
ui.horizontal(|ui| {
ui.label("Decoder:");
Expand All @@ -180,17 +182,19 @@ fn video_section_ui(ui: &mut Ui, app_options: &mut AppOptions) {
.show_ui(ui, |ui| {
ui.selectable_value(
hardware_acceleration,
re_video::decode::DecodeHardwareAcceleration::Auto,
re_video::decode::DecodeHardwareAcceleration::Auto.to_string(),
) | ui.selectable_value(
DecodeHardwareAcceleration::Auto,
DecodeHardwareAcceleration::Auto.to_string(),
);
ui.selectable_value(
hardware_acceleration,
re_video::decode::DecodeHardwareAcceleration::PreferSoftware,
re_video::decode::DecodeHardwareAcceleration::PreferSoftware.to_string(),
) | ui.selectable_value(
DecodeHardwareAcceleration::PreferSoftware,
DecodeHardwareAcceleration::PreferSoftware.to_string(),
);
ui.selectable_value(
hardware_acceleration,
re_video::decode::DecodeHardwareAcceleration::PreferHardware,
re_video::decode::DecodeHardwareAcceleration::PreferHardware.to_string(),
)
DecodeHardwareAcceleration::PreferHardware,
DecodeHardwareAcceleration::PreferHardware.to_string(),
);
});
// Note that the setting is part of the video's cache key, so, if it changes, the cache
// entries outdate automatically.
Expand Down Expand Up @@ -223,6 +227,8 @@ fn ffmpeg_path_status_ui(ui: &mut Ui, app_options: &AppOptions) {
}
}
Err(FFmpegVersionParseError::ParseVersion { raw_version }) => {
// We make this one a warning instead of an error because version parsing is flaky, and
// it might end up still working.
ui.warning_label(&format!(
"FFmpeg binary found but unable to parse version: {raw_version}"
));
Expand Down
2 changes: 1 addition & 1 deletion examples/python/openstreetmap_data/openstreetmap_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def log_way(way: dict[str, Any]) -> None:

coords = [(node["lat"], node["lon"]) for node in way["geometry"]]

rr.log(entity_path, rr.GeoLineStrings(lat_lon=[coords], radii=rr.components.Radius.ui_points(2.0)))
rr.qlog(entity_path, rr.GeoLineStrings(lat_lon=[coords], radii=rr.components.Radius.ui_points(2.0)))
rr.log(entity_path, rr.AnyValues(**way.get("tags", {})))


Expand Down

0 comments on commit c879643

Please sign in to comment.