FFmpeg 日志输出系统介绍
首先,我们要学习的就是FFmpeg的日志输出系统 。
FFmpeg提供了av_log_set_level()用于设置当前Log的级别。具体的声明代码如下:
/**
* Set the log level
*
* @see lavu_log_constants
*
* @param level Logging level
*/
void av_log_set_level(int level);
FFmpeg 日志输出的核心函数方法为: av_log() 。声明位于libavutil\log.h,具体的声明代码如下:
/**
* Send the specified message to the log if the level is less than or equal
* to the current av_log_level. By default, all logging messages are sent to
* stderr. This behavior can be altered by setting a different logging callback
* function.
* @see av_log_set_callback
*
* @param avcl A pointer to an arbitrary struct of which the first field is a
* pointer to an AVClass struct.
* @param level The importance level of the message expressed using a @ref
* lavu_log_constants "Logging Constant".
* @param fmt The format string (printf-compatible) that specifies how
* su

本文介绍了FFmpeg的日志输出系统,包括av_log_set_level()函数用于设置日志级别,核心函数av_log()及其不同级别。通过av_log_callback,可以自定义日志输出函数。示例代码展示了如何创建并设置自定义的my_logoutput()函数来打印多媒体文件格式。
:FFmpeg 打印日志&spm=1001.2101.3001.5002&articleId=111827439&d=1&t=3&u=3ae58efeaa3e445daac02c98ab02c450)
1870

被折叠的 条评论
为什么被折叠?



