example(ffmpeg): replaced av_init_packet by av_packet_alloc to get rid of deprecation … (#3634)
This commit is contained in:
21
examples/libs/ffmpeg/lv_example_ffmpeg_1.py
Normal file
21
examples/libs/ffmpeg/lv_example_ffmpeg_1.py
Normal file
@@ -0,0 +1,21 @@
|
||||
#!/opt/bin/lv_micropython-ffmpeg -i
|
||||
import sys
|
||||
import lvgl as lv
|
||||
import display_driver
|
||||
|
||||
try:
|
||||
#
|
||||
# Open an image from a file
|
||||
#
|
||||
img = lv.img(lv.scr_act())
|
||||
img.set_src("ffmpeg.png")
|
||||
img.center()
|
||||
except Exception as e:
|
||||
print(e)
|
||||
# TODO
|
||||
# fallback for online examples
|
||||
|
||||
label = lv.label(lv.scr_act())
|
||||
label.set_text("FFmpeg is not installed")
|
||||
label.center()
|
||||
|
||||
Reference in New Issue
Block a user