MCPcopy Create free account
hub / github.com/ddnet/ddnet / AvLogCallback

Function AvLogCallback

src/engine/client/video.cpp:56–72  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

54}
55
56[[gnu::format(printf, 3, 0)]] static void AvLogCallback(void *pUser, int Level, const char *pFormat, va_list VarArgs)
57{
58 const LEVEL LogLevel = AvLevelToLogLevel(Level);
59 if(LogLevel <= LEVEL_INFO)
60 {
61 char aLog[4096]; // Longest log line length
62 int Length = str_format_v(aLog, sizeof(aLog), pFormat, VarArgs);
63 if(Length > 0)
64 {
65 if(aLog[Length - 1] == '\n')
66 {
67 aLog[Length - 1] = '\0';
68 }
69 log_log(LogLevel, "videorecorder/libav", "%s", aLog);
70 }
71 }
72}
73
74void CVideo::Init()
75{

Callers

nothing calls this directly

Calls 3

AvLevelToLogLevelFunction · 0.85
str_format_vFunction · 0.85
log_logFunction · 0.85

Tested by

no test coverage detected