mirror of
https://github.com/kasmtech/KasmVNC.git
synced 2026-07-17 16:36:49 +00:00
VNC-151 Introduce DEBUG_LOG macro for debug encoder logging
This commit is contained in:
parent
f4129057f6
commit
564baa6a54
2 changed files with 12 additions and 2 deletions
|
|
@ -124,7 +124,7 @@ namespace rfb {
|
|||
}
|
||||
|
||||
if (pkt->flags & AV_PKT_FLAG_KEY)
|
||||
vlog.debug("Key frame %ld", frame->pts);
|
||||
DEBUG_LOG(vlog, "Key frame %ld", frame->pts);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
@ -138,7 +138,7 @@ namespace rfb {
|
|||
os->writeU8(pkt->flags & AV_PKT_FLAG_KEY);
|
||||
encoders::write_compact(os, pkt->size);
|
||||
os->writeBytes(&pkt->data[0], pkt->size);
|
||||
vlog.debug("Screen id %d, codec %d, frame size: %d", layout.id, msg_codec_id, pkt->size);
|
||||
DEBUG_LOG(vlog, "Screen id %d, codec %d, frame size: %d", layout.id, msg_codec_id, pkt->size);
|
||||
|
||||
ffmpeg.av_packet_unref(pkt);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,5 +3,15 @@
|
|||
#include "rdr/OutStream.h"
|
||||
|
||||
namespace rfb::encoders {
|
||||
|
||||
#define DEBUG_ENCODERS 1
|
||||
|
||||
#if DEBUG_ENCODERS
|
||||
#define DEBUG_LOG(log, ...) \
|
||||
log.debug(__VA_ARGS__)
|
||||
#else
|
||||
#define DEBUG_LOG(log, ...)
|
||||
#endif
|
||||
|
||||
void write_compact(rdr::OutStream *os, int value);
|
||||
} // namespace rfb::encoders
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue