diff options
author | Thiago Santos <thiago.sousa.santos@collabora.co.uk> | 2010-07-01 16:28:57 -0300 |
---|---|---|
committer | Thiago Santos <thiago.sousa.santos@collabora.co.uk> | 2010-07-01 17:13:25 -0300 |
commit | c470918903507b1aef539a61dd7d8a3570216154 (patch) | |
tree | dd4e9f37636bce9a6ac55d498240437fdd6a270a /gst/debugutils/fpsdisplaysink.c | |
parent | 677ae19bd0a4b8473464689e6ddd21868adaca60 (diff) | |
download | gstreamer-plugins-bad-c470918903507b1aef539a61dd7d8a3570216154.tar.gz |
fpsdisplaysink: signal-fps-measurements is writable
signal-fps-measurements is a readwrite property, not read-only.
Also adds some more debugging logs.
Diffstat (limited to 'gst/debugutils/fpsdisplaysink.c')
-rw-r--r-- | gst/debugutils/fpsdisplaysink.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/gst/debugutils/fpsdisplaysink.c b/gst/debugutils/fpsdisplaysink.c index 89199b47b..1a9e5570d 100644 --- a/gst/debugutils/fpsdisplaysink.c +++ b/gst/debugutils/fpsdisplaysink.c @@ -150,7 +150,7 @@ fps_display_sink_class_init (GstFPSDisplaySinkClass * klass) "Signal fps measurements", "If the fps-measurements signal should be emited.", DEFAULT_SIGNAL_FPS_MEASUREMENTS, - G_PARAM_STATIC_STRINGS | G_PARAM_READABLE)); + G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE)); /** * GstFPSDisplaySink::fps-measurements: @@ -320,10 +320,14 @@ display_current_fps (gpointer data) gint64 current_ts; /* if query failed try again on next timer tick */ - if (!gst_element_query (self->video_sink, self->query)) + if (!gst_element_query (self->video_sink, self->query)) { + GST_DEBUG_OBJECT (self, "Failed to query position, skipping measurement"); return TRUE; + } gst_query_parse_position (self->query, NULL, ¤t_ts); + GST_LOG_OBJECT (self, "Received position %" GST_TIME_FORMAT, + GST_TIME_ARGS (current_ts)); if (GST_CLOCK_TIME_IS_VALID (self->last_ts)) { gdouble rr, dr, average_fps; @@ -347,6 +351,8 @@ display_current_fps (gpointer data) } if (self->signal_measurements) { + GST_LOG_OBJECT (self, "Signaling measurements: fps:%f droprate:%f " + "avg-fps:%f", rr, dr, average_fps); g_signal_emit (G_OBJECT (self), fpsdisplaysink_signals[SIGNAL_FPS_MEASUREMENTS], 0, rr, dr, average_fps); @@ -421,6 +427,8 @@ no_text_overlay: gst_object_unref (target_pad); /* Set a timeout for the fps display */ + GST_DEBUG_OBJECT (self, "setting a timeout with a %dms interval", + self->fps_update_interval); self->timeout_id = g_timeout_add (self->fps_update_interval, display_current_fps, (gpointer) self); |