diff mbox

Patch to get drop and render frame in fps-measurement signal

Message ID AANLkTinV7d=iwCjU9bU1DKxt7P9SPWAoSiMR2Guq9aNa@mail.gmail.com
State New
Headers show

Commit Message

Vishal Raj March 1, 2011, 10:58 a.m. UTC
Hi all,

At present, fpsdisplaysink plugin provides frame rate, drop rate and
average fps by connecting to fps-measurement signal.Two extra
parameters have been added in FPS-Measurement signal in order to get
number of dropped and rendered frames.

GIT Patch have been sent to upstream community and attached with this
mail. Patch is based on gst-plugins-bad-0.10.20.

Thread for conversation is :
https://bugzilla.gnome.org/show_bug.cgi?id=643469

Regards,
Vishal Raj
diff mbox

Patch

From 2028980f819155b68ed662ccad5e6ea754fa7d68 Mon Sep 17 00:00:00 2001
From: Vishal Raj <vishal.raj@linaro.org>
Date: Tue, 1 Mar 2011 13:00:57 -0500
Subject: [PATCH] added dropped and rendered frames data in fps-measurement signal

---
 gst/debugutils/debugutils-marshal.list |    2 +-
 gst/debugutils/fpsdisplaysink.c        |    6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/gst/debugutils/debugutils-marshal.list b/gst/debugutils/debugutils-marshal.list
index 8073fd3..2c9e11b 100644
--- a/gst/debugutils/debugutils-marshal.list
+++ b/gst/debugutils/debugutils-marshal.list
@@ -1,2 +1,2 @@ 
-VOID:DOUBLE,DOUBLE,DOUBLE
+VOID:DOUBLE,DOUBLE,DOUBLE,UINT64,UINT64
 
diff --git a/gst/debugutils/fpsdisplaysink.c b/gst/debugutils/fpsdisplaysink.c
index 1a9e557..50a8eaf 100644
--- a/gst/debugutils/fpsdisplaysink.c
+++ b/gst/debugutils/fpsdisplaysink.c
@@ -166,8 +166,8 @@  fps_display_sink_class_init (GstFPSDisplaySinkClass * klass)
   fpsdisplaysink_signals[SIGNAL_FPS_MEASUREMENTS] =
       g_signal_new ("fps-measurements", G_TYPE_FROM_CLASS (klass),
       G_SIGNAL_RUN_LAST, 0, NULL, NULL,
-      __gst_debugutils_marshal_VOID__DOUBLE_DOUBLE_DOUBLE,
-      G_TYPE_NONE, 3, G_TYPE_DOUBLE, G_TYPE_DOUBLE, G_TYPE_DOUBLE);
+      __gst_debugutils_marshal_VOID__DOUBLE_DOUBLE_DOUBLE_UINT64_UINT64,
+      G_TYPE_NONE, 5, G_TYPE_DOUBLE, G_TYPE_DOUBLE, G_TYPE_DOUBLE, G_TYPE_UINT64, G_TYPE_UINT64);
 
   gstelement_klass->change_state = fps_display_sink_change_state;
 
@@ -355,7 +355,7 @@  display_current_fps (gpointer data)
           "avg-fps:%f", rr, dr, average_fps);
       g_signal_emit (G_OBJECT (self),
           fpsdisplaysink_signals[SIGNAL_FPS_MEASUREMENTS], 0, rr, dr,
-          average_fps);
+          average_fps,self->frames_rendered,self->frames_dropped );
     }
 
     if (dr == 0.0) {
-- 
1.7.1