docs(ffmpeg): images always loaded with lvgl fs
Arduino Lint / lint (push) Has been cancelled
MicroPython CI / Build rp2 port (push) Has been cancelled
MicroPython CI / Build stm32 port (push) Has been cancelled
MicroPython CI / Build unix port (push) Has been cancelled
MicroPython CI / Build esp32 port (push) Has been cancelled
C/C++ CI / Build OPTIONS_16BIT - Ubuntu (push) Has been cancelled
C/C++ CI / Build OPTIONS_24BIT - Ubuntu (push) Has been cancelled
C/C++ CI / Build OPTIONS_FULL_32BIT - Ubuntu (push) Has been cancelled
C/C++ CI / Build OPTIONS_NORMAL_8BIT - Ubuntu (push) Has been cancelled
C/C++ CI / Build OPTIONS_SDL - Ubuntu (push) Has been cancelled
C/C++ CI / Build OPTIONS_VG_LITE - Ubuntu (push) Has been cancelled
C/C++ CI / Build OPTIONS_16BIT - cl - Windows (push) Has been cancelled
C/C++ CI / Build OPTIONS_16BIT - gcc - Windows (push) Has been cancelled
C/C++ CI / Build OPTIONS_24BIT - cl - Windows (push) Has been cancelled
C/C++ CI / Build OPTIONS_24BIT - gcc - Windows (push) Has been cancelled
C/C++ CI / Build OPTIONS_FULL_32BIT - cl - Windows (push) Has been cancelled
C/C++ CI / Build OPTIONS_FULL_32BIT - gcc - Windows (push) Has been cancelled
C/C++ CI / Build OPTIONS_VG_LITE - cl - Windows (push) Has been cancelled
C/C++ CI / Build OPTIONS_VG_LITE - gcc - Windows (push) Has been cancelled
C/C++ CI / Build ESP IDF ESP32S3 (push) Has been cancelled
C/C++ CI / Run tests with 32bit build (push) Has been cancelled
C/C++ CI / Run tests with 64bit build (push) Has been cancelled
BOM Check / bom-check (push) Has been cancelled
Verify that lv_conf_internal.h matches repository state / verify-conf-internal (push) Has been cancelled
Verify the widget property name / verify-property-name (push) Has been cancelled
Verify code formatting / verify-formatting (push) Has been cancelled
Build docs / build-and-deploy (push) Has been cancelled
Test API JSON generator / Test API JSON (push) Has been cancelled
Check Makefile / Build using Makefile (push) Has been cancelled
Check Makefile for UEFI / Build using Makefile for UEFI (push) Has been cancelled
Port repo release update / run-release-branch-updater (push) Has been cancelled
Verify Kconfig / verify-kconfig (push) Has been cancelled

This commit is contained in:
liamHowatt
2025-03-06 11:08:26 +01:00
committed by Liam Howatt
parent eecebd2156
commit 850426b793
3 changed files with 8 additions and 0 deletions
+3
View File
@@ -62,6 +62,9 @@ Set the :c:macro:`LV_USE_FFMPEG` in ``lv_conf.h`` to ``1``.
Also set :c:macro:`LV_FFMPEG_PLAYER_USE_LV_FS` in ``lv_conf.h`` to ``1`` if you want Also set :c:macro:`LV_FFMPEG_PLAYER_USE_LV_FS` in ``lv_conf.h`` to ``1`` if you want
to integrate the LVGL :ref:`file_system` extension into FFmpeg. to integrate the LVGL :ref:`file_system` extension into FFmpeg.
This library can load videos and images. The LVGL file system
will always be used when an image is loaded with :cpp:func:`lv_image_set_src`
regardless of the value of :c:macro:`LV_FFMPEG_PLAYER_USE_LV_FS`.
See the examples below for how to correctly use this library. See the examples below for how to correctly use this library.
@@ -7,6 +7,9 @@
*/ */
void lv_example_ffmpeg_1(void) 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_obj_t * img = lv_image_create(lv_screen_active());
lv_image_set_src(img, "./lvgl/examples/libs/ffmpeg/ffmpeg.png"); lv_image_set_src(img, "./lvgl/examples/libs/ffmpeg/ffmpeg.png");
lv_obj_center(img); lv_obj_center(img);
@@ -9,6 +9,8 @@ void lv_example_ffmpeg_2(void)
{ {
/*birds.mp4 is downloaded from http://www.videezy.com (Free Stock Footage by Videezy!) /*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*/ *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_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_src(player, "./lvgl/examples/libs/ffmpeg/birds.mp4");
lv_ffmpeg_player_set_auto_restart(player, true); lv_ffmpeg_player_set_auto_restart(player, true);