feat(lib) add ffmpeg video and image decoder (#2805)

* add ffmpeg decoder to extra/libs

* fix(Kconfig) add ffmpeg configuration

Signed-off-by: pengyiqiang <pengyiqiang@xiaomi.com>

* feat(example) add ffmpeg decoder example

Signed-off-by: pengyiqiang <pengyiqiang@xiaomi.com>

* update lv_conf_template.h

* feat(example) add picture and video to ffmpeg example

* docs(libs) update FFMpeg introduction

Signed-off-by: pengyiqiang <pengyiqiang@xiaomi.com>

* fix(ffmpeg) replace with new videos and examples

Signed-off-by: pengyiqiang <pengyiqiang@xiaomi.com>

* fix(ffmpeg) remove the include of lv_img_cache.h

* fix(ffmpeg) add LV_ASSERT_OBJ

* Update examples/libs/ffmpeg/lv_example_ffmpeg_2.c

Co-authored-by: pengyiqiang <pengyiqiang@xiaomi.com>
Co-authored-by: Gabor Kiss-Vamosi <kisvegabor@gmail.com>
This commit is contained in:
_VIFEXTech
2021-11-19 15:49:39 +08:00
committed by GitHub
parent bdc6331ba6
commit a97ac7ec8e
15 changed files with 1146 additions and 0 deletions

34
docs/libs/ffmpeg.md Normal file
View File

@@ -0,0 +1,34 @@
```eval_rst
.. include:: /header.rst
:github_url: |github_link_base|/libs/ffmpeg.md
```
# FFmpeg support
[FFmpeg](https://www.ffmpeg.org/) A complete, cross-platform solution to record, convert and stream audio and video.
## Install FFmpeg
- Download FFmpeg from [here](https://www.ffmpeg.org/download.html)
- `./configure --disable-all --disable-autodetect --disable-podpages --disable-asm --enable-avcodec --enable-avformat --enable-decoders --enable-encoders --enable-demuxers --enable-parsers --enable-protocol='file' --enable-swscale --enable-zlib`
- `make`
- `sudo make install`
## Add FFmpeg to your project
- Add library: `FFmpeg` (for GCC: `-lavformat -lavcodec -lavutil -lswscale -lm -lz -lpthread`)
## Usage
Enable `LV_USE_FFMPEG` in `lv_conf.h`.
See the examples below.
Note that, the FFmpeg extension doesn't use LVGL's file system.
You can simply pass the path to the font as usual on your operating system or platform.
## API
```eval_rst
.. doxygenfile:: lv_ffmpeg.h
:project: lvgl
```

View File

@@ -18,5 +18,6 @@
freetype
qrcode
rlottie
ffmpeg
```