On 05/21/2018 01:23 PM, Frediano Ziglio wrote:
Allow to see frame size even if frame data is disabled.
Useful to compute frame statistics not spending huge amount of space
for frame data.
Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx>
---
src/spice-streaming-agent.cpp | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/src/spice-streaming-agent.cpp b/src/spice-streaming-agent.cpp
index 9ccc9da..d694eab 100644
--- a/src/spice-streaming-agent.cpp
+++ b/src/spice-streaming-agent.cpp
@@ -329,7 +329,7 @@ static void cursor_changes(StreamPort *stream_port, Display *display, int event_
}
#define STAT_LOG(format, ...) do { \
- if (f_log && !log_binary) { \
+ if (f_log) { \
Hi Frediano,
Wouldn't that make the binary video file not playable (since it
will now be a mixture of binary frames and statistics) ?
Uri.
fprintf(f_log, "%" PRIu64 ": " format "\n", get_time(), ## __VA_ARGS__); \
} \
} while(0)
@@ -387,12 +387,11 @@ do_capture(StreamPort &stream_port, FILE *f_log)
spice_stream_send_format(stream_port, width, height, codec);
}
+ STAT_LOG("Frame of %zu bytes:", frame.buffer_size);
if (f_log) {
if (log_binary) {
fwrite(frame.buffer, frame.buffer_size, 1, f_log);
} else {
- fprintf(f_log, "%" PRIu64 ": Frame of %zu bytes:\n",
- get_time(), frame.buffer_size);
hexdump(frame.buffer, frame.buffer_size, f_log);
}
}
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel