ffmpeg: Add ListFormats and ListEncoders

These two functions allow the frontend to get a list of encoders/formats and their specific options.

Retrieving the options is harder than it sounds due to FFmpeg's strange AVClass and AVOption system. For example, for integer and flags options, 'named constants' can be set. They are of type `AV_OPT_TYPE_CONST` and are categoried according to the `unit` field. An option can recognize all constants of the same `unit`.
This commit is contained in:
zhupengfei 2020-02-01 12:28:13 +08:00
parent 4161163d9c
commit 8c4bcf9f59
No known key found for this signature in database
GPG key ID: DD129E108BD09378
3 changed files with 284 additions and 2 deletions

View file

@ -492,5 +492,5 @@ if (ARCHITECTURE_x86_64)
endif()
if (ENABLE_FFMPEG_VIDEO_DUMPER)
target_link_libraries(core PRIVATE FFmpeg::avcodec FFmpeg::avformat FFmpeg::swscale FFmpeg::swresample FFmpeg::avutil)
target_link_libraries(core PUBLIC FFmpeg::avcodec FFmpeg::avformat FFmpeg::swscale FFmpeg::swresample FFmpeg::avutil)
endif()