BabitMF / bmf

Cross-platform, customizable multimedia/video processing framework. With strong GPU acceleration, heterogeneous design, multi-language support, easy to use, multi-framework compatible and high performance, the framework is ideal for transcoding, AI inference, algorithm integration, live video streaming, and more.
https://babitmf.github.io/
Apache License 2.0
773 stars 65 forks source link

Provide printing macros for ffmpeg header #47

Closed tongyuantongyu closed 1 year ago

tongyuantongyu commented 1 year ago

On glibc < 2.18, PRId64 and likewise is only provided under cpp if __STDC_FORMAT_MACROS is defined.

Also, don't override CMAKE_CXX_FLAGS,as these can be specified through command line, if compiling for target environment need some extra compiler flags.

sfeiwong commented 1 year ago

代码中有用到这个MACROS的地方? 是给后续预留么

tongyuantongyu commented 1 year ago

代码中有用到这个MACROS的地方? 是给后续预留么

是引入的ffmpeg头用到的:https://github.com/FFmpeg/FFmpeg/blob/n4.4.4/libavutil/timestamp.h#L29

<cinttypes>有时会define __STDC_FORMAT_MACROS,一开始排查问题按照编译器提示添加了<cinttypes>的引入,现在测试了一下,手动定义__STDC_FORMAT_MACROS之后不需要#include <cinttypes>了。