diff --git a/docs/libs/ffmpeg.rst b/docs/libs/ffmpeg.rst index 42d2e1eda..3afc00314 100644 --- a/docs/libs/ffmpeg.rst +++ b/docs/libs/ffmpeg.rst @@ -33,9 +33,14 @@ Enable :c:macro:`LV_USE_FFMPEG` in ``lv_conf.h``. See the examples below. -:Note: FFmpeg extension doesn't use LVGL's file system. You can -simply pass the path to the image or video as usual on your operating -system or platform. +.. note:: + + The FFmpeg extension doesn't use LVGL's file system in + :cpp:`lv_ffmpeg_player_set_src`. You can + simply pass the path to the image or video as usual on your operating + system or platform. + The LVGL file system will always be used when an image is + loaded with :cpp:func:`lv_image_set_src`. .. _ffmpeg_example: diff --git a/examples/libs/ffmpeg/lv_example_ffmpeg_1.c b/examples/libs/ffmpeg/lv_example_ffmpeg_1.c index aa88240a8..f8637d208 100644 --- a/examples/libs/ffmpeg/lv_example_ffmpeg_1.c +++ b/examples/libs/ffmpeg/lv_example_ffmpeg_1.c @@ -7,6 +7,9 @@ */ void lv_example_ffmpeg_1(void) { + /*It always uses the LVGL filesystem abstraction (not the OS filesystem) + *to open the image, unlike `lv_ffmpeg_player_set_src` which depends on + *the setting of `LV_FFMPEG_PLAYER_USE_LV_FS`.*/ lv_obj_t * img = lv_image_create(lv_screen_active()); lv_image_set_src(img, "./lvgl/examples/libs/ffmpeg/ffmpeg.png"); lv_obj_center(img); diff --git a/examples/libs/ffmpeg/lv_example_ffmpeg_2.c b/examples/libs/ffmpeg/lv_example_ffmpeg_2.c index 73784910f..f396aeb8b 100644 --- a/examples/libs/ffmpeg/lv_example_ffmpeg_2.c +++ b/examples/libs/ffmpeg/lv_example_ffmpeg_2.c @@ -9,6 +9,8 @@ void lv_example_ffmpeg_2(void) { /*birds.mp4 is downloaded from http://www.videezy.com (Free Stock Footage by Videezy!) *https://www.videezy.com/abstract/44864-silhouettes-of-birds-over-the-sunset*/ + /*It will use the LVGL filesystem abstraction (not the OS filesystem) + *if `LV_FFMPEG_PLAYER_USE_LV_FS` is set.*/ lv_obj_t * player = lv_ffmpeg_player_create(lv_screen_active()); lv_ffmpeg_player_set_src(player, "./lvgl/examples/libs/ffmpeg/birds.mp4"); lv_ffmpeg_player_set_auto_restart(player, true);