mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 19:51:11 +00:00
fpsdisplaysink: Rename verbose property to silent for consistency
This commit is contained in:
parent
581714bff0
commit
291a8048d1
2 changed files with 12 additions and 12 deletions
|
@ -54,7 +54,7 @@
|
|||
#define DEFAULT_SIGNAL_FPS_MEASUREMENTS FALSE
|
||||
#define DEFAULT_FPS_UPDATE_INTERVAL_MS 500 /* 500 ms */
|
||||
#define DEFAULT_FONT "Sans 15"
|
||||
#define DEFAULT_VERBOSE FALSE
|
||||
#define DEFAULT_SILENT FALSE
|
||||
|
||||
/* generic templates */
|
||||
static GstStaticPadTemplate fps_display_sink_template =
|
||||
|
@ -87,7 +87,7 @@ enum
|
|||
PROP_SIGNAL_FPS_MEASUREMENTS,
|
||||
PROP_FRAMES_DROPPED,
|
||||
PROP_FRAMES_RENDERED,
|
||||
PROP_VERBOSE
|
||||
PROP_SILENT
|
||||
/* FILL ME */
|
||||
};
|
||||
|
||||
|
@ -164,9 +164,9 @@ fps_display_sink_class_init (GstFPSDisplaySinkClass * klass)
|
|||
"Number of frames rendered", 0, G_MAXUINT, 0,
|
||||
G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
|
||||
|
||||
g_object_class_install_property (gobject_klass, PROP_VERBOSE,
|
||||
g_param_spec_boolean ("verbose", "enable stdout output",
|
||||
"If the element should display statistics on stdout", DEFAULT_VERBOSE,
|
||||
g_object_class_install_property (gobject_klass, PROP_SILENT,
|
||||
g_param_spec_boolean ("silent", "enable stdout output",
|
||||
"Don't produce last_message events", DEFAULT_SILENT,
|
||||
G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE));
|
||||
|
||||
g_object_class_install_property (gobject_klass, PROP_SIGNAL_FPS_MEASUREMENTS,
|
||||
|
@ -338,7 +338,7 @@ fps_display_sink_init (GstFPSDisplaySink * self,
|
|||
self->video_sink = NULL;
|
||||
self->max_fps = -1;
|
||||
self->min_fps = -1;
|
||||
self->verbose = DEFAULT_VERBOSE;
|
||||
self->silent = DEFAULT_SILENT;
|
||||
|
||||
self->ghost_pad = gst_ghost_pad_new_no_target ("sink", GST_PAD_SINK);
|
||||
gst_element_add_pad (GST_ELEMENT (self), self->ghost_pad);
|
||||
|
@ -409,7 +409,7 @@ display_current_fps (gpointer data)
|
|||
g_object_set (self->text_overlay, "text", fps_message, NULL);
|
||||
}
|
||||
|
||||
if (self->verbose) {
|
||||
if (!self->silent) {
|
||||
g_print ("%s\n", fps_message);
|
||||
}
|
||||
|
||||
|
@ -545,8 +545,8 @@ fps_display_sink_set_property (GObject * object, guint prop_id,
|
|||
case PROP_SIGNAL_FPS_MEASUREMENTS:
|
||||
self->signal_measurements = g_value_get_boolean (value);
|
||||
break;
|
||||
case PROP_VERBOSE:
|
||||
self->verbose = g_value_get_boolean (value);
|
||||
case PROP_SILENT:
|
||||
self->silent = g_value_get_boolean (value);
|
||||
break;
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||
|
@ -588,8 +588,8 @@ fps_display_sink_get_property (GObject * object, guint prop_id,
|
|||
case PROP_SIGNAL_FPS_MEASUREMENTS:
|
||||
g_value_set_boolean (value, self->signal_measurements);
|
||||
break;
|
||||
case PROP_VERBOSE:
|
||||
g_value_set_boolean (value, self->verbose);
|
||||
case PROP_SILENT:
|
||||
g_value_set_boolean (value, self->silent);
|
||||
break;
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||
|
|
|
@ -66,7 +66,7 @@ struct _GstFPSDisplaySink
|
|||
GstClockTime fps_update_interval;
|
||||
gdouble max_fps;
|
||||
gdouble min_fps;
|
||||
gboolean verbose;
|
||||
gboolean silent;
|
||||
};
|
||||
|
||||
struct _GstFPSDisplaySinkClass
|
||||
|
|
Loading…
Reference in a new issue