0

I have a C++ solution which uses x264.lib. I've set params.i_log_level = X264_LOG_DEBUG; in order to be able to see some logging from x264 lib. However during debugging in Visual Studio Output window I do not see any x264 related logs.

How can I see those logs?

4

1 回答 1

1

启用日志级别,您将保留默认的日志记录处理程序以生成调试输出。这会写入stderr并且输出不会出现在 Visual Studio 输出窗口中。

static void x264_log_default( void *p_unused, int i_level, const char *psz_fmt, 
  va_list arg )
{
    // ...
    fprintf( stderr, "x264 [%s]: ", psz_prefix );
    vfprintf( stderr, psz_fmt, arg );

您需要提供自己的日志功能params.pf_log并将数据传递给OutputDebugStringAPI。这样它就会出现在 VS 输出窗口中。

于 2013-10-21T09:48:02.900 回答