mikroSDK Reference Manual
lv_ffmpeg.h
Go to the documentation of this file.
1
5#ifndef LV_FFMPEG_H
6#define LV_FFMPEG_H
7
8#ifdef __cplusplus
9extern "C" {
10#endif
11
12/*********************
13 * INCLUDES
14 *********************/
15#include "../../../lvgl.h"
16#if LV_USE_FFMPEG != 0
17
18/*********************
19 * DEFINES
20 *********************/
21
22/**********************
23 * TYPEDEFS
24 **********************/
25struct ffmpeg_context_s;
26
27extern const lv_obj_class_t lv_ffmpeg_player_class;
28
29typedef struct {
30 lv_img_t img;
31 lv_timer_t * timer;
32 lv_img_dsc_t imgdsc;
33 bool auto_restart;
34 struct ffmpeg_context_s * ffmpeg_ctx;
35} lv_ffmpeg_player_t;
36
37typedef enum {
38 LV_FFMPEG_PLAYER_CMD_START,
39 LV_FFMPEG_PLAYER_CMD_STOP,
40 LV_FFMPEG_PLAYER_CMD_PAUSE,
41 LV_FFMPEG_PLAYER_CMD_RESUME,
42 _LV_FFMPEG_PLAYER_CMD_LAST
43} lv_ffmpeg_player_cmd_t;
44
45/**********************
46 * GLOBAL PROTOTYPES
47 **********************/
48
52void lv_ffmpeg_init(void);
53
59int lv_ffmpeg_get_frame_num(const char * path);
60
66lv_obj_t * lv_ffmpeg_player_create(lv_obj_t * parent);
67
74lv_res_t lv_ffmpeg_player_set_src(lv_obj_t * obj, const char * path);
75
81void lv_ffmpeg_player_set_cmd(lv_obj_t * obj, lv_ffmpeg_player_cmd_t cmd);
82
88void lv_ffmpeg_player_set_auto_restart(lv_obj_t * obj, bool en);
89
90/*=====================
91 * Other functions
92 *====================*/
93
94/**********************
95 * MACROS
96 **********************/
97
98#endif /*LV_USE_FFMPEG*/
99
100#ifdef __cplusplus
101} /*extern "C"*/
102#endif
103
104#endif /*LV_FFMPEG_H*/
Definition lv_obj_class.h:49
Definition lv_obj.h:174
Definition lv_timer.h:44
Definition lv_img_buf.h:141