lv_ffmpeg.h

Enums

enum lv_ffmpeg_player_cmd_t

Values:

enumerator LV_FFMPEG_PLAYER_CMD_START
enumerator LV_FFMPEG_PLAYER_CMD_STOP
enumerator LV_FFMPEG_PLAYER_CMD_PAUSE
enumerator LV_FFMPEG_PLAYER_CMD_RESUME
enumerator LV_FFMPEG_PLAYER_CMD_LAST

Functions

void lv_ffmpeg_init(void)

Register FFMPEG image decoder

int lv_ffmpeg_get_frame_num(const char *path)

Get the number of frames contained in the file

参数:

path -- image or video file name

返回:

Number of frames, less than 0 means failed

lv_obj_t *lv_ffmpeg_player_create(lv_obj_t *parent)

Create ffmpeg_player object

参数:

parent -- pointer to an object, it will be the parent of the new player

返回:

pointer to the created ffmpeg_player

lv_result_t lv_ffmpeg_player_set_src(lv_obj_t *obj, const char *path)

Set the path of the file to be played

参数:
  • obj -- pointer to a ffmpeg_player object

  • path -- video file path

返回:

LV_RESULT_OK: no error; LV_RESULT_INVALID: can't get the info.

void lv_ffmpeg_player_set_cmd(lv_obj_t *obj, lv_ffmpeg_player_cmd_t cmd)

Set command control video player

参数:
  • obj -- pointer to a ffmpeg_player object

  • cmd -- control commands

void lv_ffmpeg_player_set_auto_restart(lv_obj_t *obj, bool en)

Set the video to automatically replay

参数:
  • obj -- pointer to a ffmpeg_player object

  • en -- true: enable the auto restart

Variables

const lv_obj_class_t lv_ffmpeg_player_class