mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 23:50:19 +00:00
VideoPlayer: Propagate errors using try_set_main_widget in main
This commit is contained in:
parent
c1dc5ef9d7
commit
20a7cb3004
Notes:
sideshowbarker
2024-07-17 21:22:23 +09:00
Author: https://github.com/creator1creeper1 Commit: https://github.com/SerenityOS/serenity/commit/20a7cb30048 Pull-request: https://github.com/SerenityOS/serenity/pull/11698
1 changed files with 5 additions and 5 deletions
|
@ -27,13 +27,13 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
auto const video_track = track.video_track().value();
|
||||
|
||||
auto image = Gfx::Bitmap::try_create(Gfx::BitmapFormat::BGRx8888, Gfx::IntSize(video_track.pixel_height, video_track.pixel_width)).release_value_but_fixme_should_propagate_errors();
|
||||
auto& main_widget = window->set_main_widget<GUI::Widget>();
|
||||
main_widget.set_fill_with_background_color(true);
|
||||
main_widget.set_layout<GUI::VerticalBoxLayout>();
|
||||
auto& image_widget = main_widget.add<GUI::ImageWidget>();
|
||||
auto main_widget = TRY(window->try_set_main_widget<GUI::Widget>());
|
||||
main_widget->set_fill_with_background_color(true);
|
||||
main_widget->set_layout<GUI::VerticalBoxLayout>();
|
||||
auto& image_widget = main_widget->add<GUI::ImageWidget>();
|
||||
image_widget.set_bitmap(image);
|
||||
image_widget.set_fixed_size(video_track.pixel_height, video_track.pixel_width);
|
||||
TRY(main_widget.try_add_child(image_widget));
|
||||
TRY(main_widget->try_add_child(image_widget));
|
||||
|
||||
Video::VP9::Decoder vp9_decoder;
|
||||
for (auto const& cluster : document->clusters()) {
|
||||
|
|
Loading…
Reference in a new issue