acid-drop

- Hacking the planet from a LilyGo T-Deck using custom firmware
git clone git://git.acid.vegas/acid-drop.git
Log | Files | Refs | Archive | README | LICENSE

lv_example_ffmpeg_2.c (850B)

      1 #include "../../lv_examples.h"
      2 #if LV_BUILD_EXAMPLES
      3 #if LV_USE_FFMPEG
      4 
      5 /**
      6  * Open a video from a file
      7  */
      8 void lv_example_ffmpeg_2(void)
      9 {
     10     /*birds.mp4 is downloaded from http://www.videezy.com (Free Stock Footage by Videezy!)
     11      *https://www.videezy.com/abstract/44864-silhouettes-of-birds-over-the-sunset*/
     12     lv_obj_t * player = lv_ffmpeg_player_create(lv_scr_act());
     13     lv_ffmpeg_player_set_src(player, "./lvgl/examples/libs/ffmpeg/birds.mp4");
     14     lv_ffmpeg_player_set_auto_restart(player, true);
     15     lv_ffmpeg_player_set_cmd(player, LV_FFMPEG_PLAYER_CMD_START);
     16     lv_obj_center(player);
     17 }
     18 
     19 #else
     20 
     21 void lv_example_ffmpeg_2(void)
     22 {
     23     /*TODO
     24      *fallback for online examples*/
     25 
     26     lv_obj_t * label = lv_label_create(lv_scr_act());
     27     lv_label_set_text(label, "FFmpeg is not installed");
     28     lv_obj_center(label);
     29 }
     30 
     31 #endif
     32 #endif