20# include <libavcodec/avcodec.h>
21# include <libavdevice/avdevice.h>
22# include <libavformat/avformat.h>
23# include <libavutil/avutil.h>
24# include <libswscale/swscale.h>
30#define DEF_FFMPEG_LIB_VERSION(lib) \
31 {(#lib "_version"), ("The " #lib " version as a tuple of 3 numbers")}, \
33 (#lib "_version_string"), ("The " #lib " version formatted as a string") \
37 {
"supported",
"Boolean, True when Blender is built with FFmpeg support"},
47#undef DEF_FFMPEG_LIB_VERSION
51 "This module contains information about FFmpeg blender is linked against",
58 PyObject *ffmpeg_info;
66 if (ffmpeg_info ==
nullptr) {
71# define SetIntItem(flag) PyStructSequence_SET_ITEM(ffmpeg_info, pos++, PyLong_FromLong(flag))
74# define SetStrItem(str) PyStructSequence_SET_ITEM(ffmpeg_info, pos++, PyUnicode_FromString(str))
76#define SetObjItem(obj) PyStructSequence_SET_ITEM(ffmpeg_info, pos++, obj)
79# define FFMPEG_LIB_VERSION(lib) \
81 curversion = lib##_version(); \
83 PyC_Tuple_Pack_I32({curversion >> 16, (curversion >> 8) % 256, curversion % 256})); \
84 SetObjItem(PyUnicode_FromFormat( \
85 "%2d, %2d, %2d", curversion >> 16, (curversion >> 8) % 256, curversion % 256)); \
89# define FFMPEG_LIB_VERSION(lib) \
91 SetStrItem("Unknown"); \
92 SetStrItem("Unknown"); \
109#undef FFMPEG_LIB_VERSION
#define DEF_FFMPEG_LIB_VERSION(lib)
static PyTypeObject BlenderAppFFmpegType
static PyStructSequence_Desc app_ffmpeg_info_desc
PyObject * BPY_app_ffmpeg_struct()
static PyStructSequence_Field app_ffmpeg_info_fields[]
#define FFMPEG_LIB_VERSION(lib)
static PyObject * make_ffmpeg_info()
header-only compatibility defines.