12 #include "../generic/py_capi_utils.h"
15 # include <libavcodec/avcodec.h>
16 # include <libavdevice/avdevice.h>
17 # include <libavformat/avformat.h>
18 # include <libavutil/avutil.h>
19 # include <libswscale/swscale.h>
24 #define DEF_FFMPEG_LIB_VERSION(lib) \
25 {(#lib "_version"), ("The " #lib " version as a tuple of 3 numbers")}, \
27 (#lib "_version_string"), ("The " #lib " version formatted as a string") \
31 {
"supported",
"Boolean, True when Blender is built with FFmpeg support"},
41 #undef DEF_FFMPEG_LIB_VERSION
45 "This module contains information about FFmpeg blender is linked against",
52 PyObject *ffmpeg_info;
60 if (ffmpeg_info ==
NULL) {
65 # define SetIntItem(flag) PyStructSequence_SET_ITEM(ffmpeg_info, pos++, PyLong_FromLong(flag))
68 # define SetStrItem(str) PyStructSequence_SET_ITEM(ffmpeg_info, pos++, PyUnicode_FromString(str))
70 #define SetObjItem(obj) PyStructSequence_SET_ITEM(ffmpeg_info, pos++, obj)
73 # define FFMPEG_LIB_VERSION(lib) \
75 curversion = lib##_version(); \
77 PyC_Tuple_Pack_I32(curversion >> 16, (curversion >> 8) % 256, curversion % 256)); \
78 SetObjItem(PyUnicode_FromFormat( \
79 "%2d, %2d, %2d", curversion >> 16, (curversion >> 8) % 256, curversion % 256)); \
83 # define FFMPEG_LIB_VERSION(lib) \
85 SetStrItem("Unknown"); \
86 SetStrItem("Unknown"); \
103 #undef FFMPEG_LIB_VERSION
106 Py_DECREF(ffmpeg_info);
#define DEF_FFMPEG_LIB_VERSION(lib)
static PyObject * make_ffmpeg_info(void)
static PyTypeObject BlenderAppFFmpegType
PyObject * BPY_app_ffmpeg_struct(void)
static PyStructSequence_Desc app_ffmpeg_info_desc
static PyStructSequence_Field app_ffmpeg_info_fields[]
#define FFMPEG_LIB_VERSION(lib)