Question

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?

Était-ce utile?

La solution

Enabling log level, you leave default logging handler to generate debug output. This writes to stderr and the output does not appear on Visual Studio output window.

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 );

You need to provide your own log function in params.pf_log and have the data passed to OutputDebugString API. This way it is going to come up on VS output window.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top