[Spice-commits] 2 commits - configure.ac meson_options.txt src/channel-display-gst.c subprojects/spice-common

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Feb 19 15:53:43 UTC 2019


 configure.ac              |    1 +
 meson_options.txt         |    5 +++++
 src/channel-display-gst.c |   12 ++++++++----
 subprojects/spice-common  |    2 +-
 4 files changed, 15 insertions(+), 5 deletions(-)

New commits:
commit dd778e8595a0c32882996d2d4b6d8f9f042c4fae
Author: Frediano Ziglio <fziglio at redhat.com>
Date:   Sat Jan 26 08:53:51 2019 +0000

    channel-display-gst: Use recorder for frame statistics
    
    Allows to handle these statistics in a more flexible way.
    
    Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
    Acked-by: Victor Toso <victortoso at redhat.com>

diff --git a/src/channel-display-gst.c b/src/channel-display-gst.c
index c63592b..aa615ad 100644
--- a/src/channel-display-gst.c
+++ b/src/channel-display-gst.c
@@ -20,6 +20,7 @@
 #include "spice-client.h"
 #include "spice-common.h"
 #include "spice-channel-priv.h"
+#include "common/recorder.h"
 
 #include "channel-display-priv.h"
 
@@ -109,6 +110,8 @@ static void schedule_frame(SpiceGstDecoder *decoder);
 static void fetch_pending_sample(SpiceGstDecoder *decoder);
 static SpiceGstFrame *get_decoded_frame(SpiceGstDecoder *decoder, GstBuffer *buffer);
 
+RECORDER(frames_stats, 64, "Frames statistics");
+
 static int spice_gst_buffer_get_stride(GstBuffer *buffer)
 {
     GstVideoMeta *video = gst_buffer_get_video_meta(buffer);
@@ -248,10 +251,11 @@ static SpiceGstFrame *get_decoded_frame(SpiceGstDecoder *decoder, GstBuffer *buf
 
         const SpiceFrame *frame = gstframe->encoded_frame;
         int64_t duration = g_get_monotonic_time() - frame->creation_time;
-        SPICE_DEBUG("frame mm_time %u size %u creation time %" G_GINT64_FORMAT
-                    " decoded time %" G_GINT64_FORMAT " queue %u",
-                    frame->mm_time, frame->size, frame->creation_time,
-                    duration, decoder->decoding_queue->length);
+        record(frames_stats,
+               "frame mm_time %u size %u creation time %" PRId64
+               " decoded time %" PRId64 " queue %u",
+               frame->mm_time, frame->size, frame->creation_time,
+               duration, decoder->decoding_queue->length);
     }
     return gstframe;
 }
commit 11e24061ead3029942cbad391988cf661b4770f1
Author: Frediano Ziglio <fziglio at redhat.com>
Date:   Mon Nov 19 20:56:16 2018 +0000

    Allows to enable recorder integration
    
    recorder library will be used to collect some statistics during
    development.
    
    Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
    Acked-by: Victor Toso <victortoso at redhat.com>

diff --git a/configure.ac b/configure.ac
index 7dab0be..2e6f7e7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -120,6 +120,7 @@ PKG_CHECK_EXISTS(openssl,
   [SPICE_GLIB_REQUIRES="${SPICE_GLIB_REQUIRES} openssl"],
   [SPICE_GLIB_LIBS="${SPICE_GLIB_LIBS} ${SSL_LIBS}"])
 
+SPICE_CHECK_RECORDER
 SPICE_CHECK_SASL
 
 AC_MSG_CHECKING([which gtk+ version to compile against])
diff --git a/meson_options.txt b/meson_options.txt
index 2e605b7..9804217 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -80,3 +80,8 @@ option('smartcard',
 option('gtk_doc',
        type : 'feature',
        description : 'Generate API documentation with gtk-doc')
+
+option('recorder',
+    type : 'boolean',
+    value : false,
+    description: 'Enable recorder instrumentation')
diff --git a/subprojects/spice-common b/subprojects/spice-common
index 0a753b9..2e914f3 160000
--- a/subprojects/spice-common
+++ b/subprojects/spice-common
@@ -1 +1 @@
-Subproject commit 0a753b93b50b548a2ac04023c96a7cda83f204bf
+Subproject commit 2e914f3305f685c82143fa04067ce9f57fbfd602


More information about the Spice-commits mailing list