DataHoarder
f605079083
All checks were successful
continuous-integration/drone/push Build is passing
22 lines
510 B
C
22 lines
510 B
C
#include "libx264.h"
|
|
|
|
#include "_cgo_export.h"
|
|
|
|
const char* Version() {
|
|
return X264_VERSION;
|
|
}
|
|
|
|
void SetLogCallback( x264_param_t *p ) {
|
|
p->pf_log = LogCallback;
|
|
}
|
|
|
|
#define LOG_MAX_MESSAGE_SIZE 4096
|
|
|
|
void LogCallback( void *p, int i_level, const char *psz_fmt, va_list arg ) {
|
|
char message[LOG_MAX_MESSAGE_SIZE+1];
|
|
int n = vsnprintf(message, LOG_MAX_MESSAGE_SIZE, psz_fmt, arg);
|
|
if (n > 0 && n < LOG_MAX_MESSAGE_SIZE) {
|
|
//success
|
|
logCallback(i_level, message, n, p);
|
|
}
|
|
} |