Lines Matching refs:player
151 lv_ffmpeg_player_t * player = (lv_ffmpeg_player_t *)obj; in lv_ffmpeg_player_set_src() local
153 if(player->ffmpeg_ctx) { in lv_ffmpeg_player_set_src()
154 ffmpeg_close(player->ffmpeg_ctx); in lv_ffmpeg_player_set_src()
155 player->ffmpeg_ctx = NULL; in lv_ffmpeg_player_set_src()
158 lv_timer_pause(player->timer); in lv_ffmpeg_player_set_src()
160 player->ffmpeg_ctx = ffmpeg_open_file(path); in lv_ffmpeg_player_set_src()
162 if(!player->ffmpeg_ctx) { in lv_ffmpeg_player_set_src()
167 if(ffmpeg_image_allocate(player->ffmpeg_ctx) < 0) { in lv_ffmpeg_player_set_src()
169 ffmpeg_close(player->ffmpeg_ctx); in lv_ffmpeg_player_set_src()
173 bool has_alpha = player->ffmpeg_ctx->has_alpha; in lv_ffmpeg_player_set_src()
174 int width = player->ffmpeg_ctx->video_dec_ctx->width; in lv_ffmpeg_player_set_src()
175 int height = player->ffmpeg_ctx->video_dec_ctx->height; in lv_ffmpeg_player_set_src()
185 player->imgdsc.header.always_zero = 0; in lv_ffmpeg_player_set_src()
186 player->imgdsc.header.w = width; in lv_ffmpeg_player_set_src()
187 player->imgdsc.header.h = height; in lv_ffmpeg_player_set_src()
188 player->imgdsc.data_size = data_size; in lv_ffmpeg_player_set_src()
189 player->imgdsc.header.cf = has_alpha ? LV_IMG_CF_TRUE_COLOR_ALPHA : LV_IMG_CF_TRUE_COLOR; in lv_ffmpeg_player_set_src()
190 player->imgdsc.data = ffmpeg_get_img_data(player->ffmpeg_ctx); in lv_ffmpeg_player_set_src()
192 lv_img_set_src(&player->img.obj, &(player->imgdsc)); in lv_ffmpeg_player_set_src()
194 int period = ffmpeg_get_frame_refr_period(player->ffmpeg_ctx); in lv_ffmpeg_player_set_src()
199 lv_timer_set_period(player->timer, period); in lv_ffmpeg_player_set_src()
214 lv_ffmpeg_player_t * player = (lv_ffmpeg_player_t *)obj; in lv_ffmpeg_player_set_cmd() local
216 if(!player->ffmpeg_ctx) { in lv_ffmpeg_player_set_cmd()
221 lv_timer_t * timer = player->timer; in lv_ffmpeg_player_set_cmd()
225 av_seek_frame(player->ffmpeg_ctx->fmt_ctx, in lv_ffmpeg_player_set_cmd()
231 av_seek_frame(player->ffmpeg_ctx->fmt_ctx, in lv_ffmpeg_player_set_cmd()
253 lv_ffmpeg_player_t * player = (lv_ffmpeg_player_t *)obj; in lv_ffmpeg_player_set_auto_restart() local
254 player->auto_restart = en; in lv_ffmpeg_player_set_auto_restart()
815 lv_ffmpeg_player_t * player = (lv_ffmpeg_player_t *)obj; in lv_ffmpeg_player_frame_update_cb() local
817 if(!player->ffmpeg_ctx) { in lv_ffmpeg_player_frame_update_cb()
821 int has_next = ffmpeg_update_next_frame(player->ffmpeg_ctx); in lv_ffmpeg_player_frame_update_cb()
824 …lv_ffmpeg_player_set_cmd(obj, player->auto_restart ? LV_FFMPEG_PLAYER_CMD_START : LV_FFMPEG_PLAYER… in lv_ffmpeg_player_frame_update_cb()
829 if(player->ffmpeg_ctx->has_alpha) { in lv_ffmpeg_player_frame_update_cb()
830 convert_color_depth((uint8_t *)(player->imgdsc.data), in lv_ffmpeg_player_frame_update_cb()
831 player->imgdsc.header.w * player->imgdsc.header.h); in lv_ffmpeg_player_frame_update_cb()
844 lv_ffmpeg_player_t * player = (lv_ffmpeg_player_t *)obj; in lv_ffmpeg_player_constructor() local
846 player->auto_restart = false; in lv_ffmpeg_player_constructor()
847 player->ffmpeg_ctx = NULL; in lv_ffmpeg_player_constructor()
848 player->timer = lv_timer_create(lv_ffmpeg_player_frame_update_cb, in lv_ffmpeg_player_constructor()
850 lv_timer_pause(player->timer); in lv_ffmpeg_player_constructor()
860 lv_ffmpeg_player_t * player = (lv_ffmpeg_player_t *)obj; in lv_ffmpeg_player_destructor() local
862 if(player->timer) { in lv_ffmpeg_player_destructor()
863 lv_timer_del(player->timer); in lv_ffmpeg_player_destructor()
864 player->timer = NULL; in lv_ffmpeg_player_destructor()
869 ffmpeg_close(player->ffmpeg_ctx); in lv_ffmpeg_player_destructor()
870 player->ffmpeg_ctx = NULL; in lv_ffmpeg_player_destructor()