2021-11-19 15:49:39 +08:00
|
|
|
#include "../../lv_examples.h"
|
2021-11-29 14:54:37 +01:00
|
|
|
#if LV_BUILD_EXAMPLES
|
|
|
|
#if LV_USE_FFMPEG
|
|
|
|
|
2021-11-19 15:49:39 +08:00
|
|
|
/**
|
2021-12-02 14:44:05 +01:00
|
|
|
* Open an image from a file
|
2021-11-19 15:49:39 +08:00
|
|
|
*/
|
|
|
|
void lv_example_ffmpeg_1(void)
|
|
|
|
{
|
2023-10-12 20:37:27 +02:00
|
|
|
lv_obj_t * img = lv_image_create(lv_screen_active());
|
2023-09-14 20:12:31 +02:00
|
|
|
lv_image_set_src(img, "./lvgl/examples/libs/ffmpeg/ffmpeg.png");
|
2021-11-19 15:49:39 +08:00
|
|
|
lv_obj_center(img);
|
|
|
|
}
|
|
|
|
|
|
|
|
#else
|
|
|
|
|
|
|
|
void lv_example_ffmpeg_1(void)
|
|
|
|
{
|
|
|
|
/*TODO
|
|
|
|
*fallback for online examples*/
|
|
|
|
|
2023-10-12 20:37:27 +02:00
|
|
|
lv_obj_t * label = lv_label_create(lv_screen_active());
|
2021-11-19 15:49:39 +08:00
|
|
|
lv_label_set_text(label, "FFmpeg is not installed");
|
|
|
|
lv_obj_center(label);
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|
2021-11-29 14:54:37 +01:00
|
|
|
#endif
|