Skip to content

Commit 5157177

Browse files
cnjhbCopilot
andauthored
feat(examples/ffmpeg_player): specify default decoder (lvgl#9218)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 4effa0d commit 5157177

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

examples/libs/ffmpeg/lv_example_ffmpeg_2.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ void lv_example_ffmpeg_2(void)
1818
/*It will use the LVGL filesystem abstraction (not the OS filesystem)
1919
*if `LV_FFMPEG_PLAYER_USE_LV_FS` is set.*/
2020
lv_obj_t * player = lv_ffmpeg_player_create(lv_screen_active());
21+
/*Note: "h264_v4l2m2m" is a Linux-specific hardware decoder example, available only on Linux systems with V4L2 support.
22+
*In the absence of support, it will fall back to software decoding.*/
23+
lv_ffmpeg_player_set_decoder(player, "h264_v4l2m2m");
2124
lv_ffmpeg_player_set_src(player, PATH_PREFIX "lvgl/examples/libs/ffmpeg/birds.mp4");
2225
lv_ffmpeg_player_set_auto_restart(player, true);
2326
lv_ffmpeg_player_set_cmd(player, LV_FFMPEG_PLAYER_CMD_START);

0 commit comments

Comments
 (0)