mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-30 12:49:40 +00:00
fpsdisplay: Use PROP_ instead of ARG_ for the property enums
This commit is contained in:
parent
26bc5537ce
commit
a7cbd201b1
1 changed files with 37 additions and 37 deletions
|
@ -77,17 +77,17 @@ enum
|
|||
|
||||
enum
|
||||
{
|
||||
ARG_0,
|
||||
ARG_SYNC,
|
||||
ARG_TEXT_OVERLAY,
|
||||
ARG_VIDEO_SINK,
|
||||
ARG_FPS_UPDATE_INTERVAL,
|
||||
ARG_MAX_FPS,
|
||||
ARG_MIN_FPS,
|
||||
ARG_SIGNAL_FPS_MEASUREMENTS,
|
||||
ARG_FRAMES_DROPPED,
|
||||
ARG_FRAMES_RENDERED,
|
||||
ARG_VERBOSE
|
||||
PROP_0,
|
||||
PROP_SYNC,
|
||||
PROP_TEXT_OVERLAY,
|
||||
PROP_VIDEO_SINK,
|
||||
PROP_FPS_UPDATE_INTERVAL,
|
||||
PROP_MAX_FPS,
|
||||
PROP_MIN_FPS,
|
||||
PROP_SIGNAL_FPS_MEASUREMENTS,
|
||||
PROP_FRAMES_DROPPED,
|
||||
PROP_FRAMES_RENDERED,
|
||||
PROP_VERBOSE
|
||||
/* FILL ME */
|
||||
};
|
||||
|
||||
|
@ -117,59 +117,59 @@ fps_display_sink_class_init (GstFPSDisplaySinkClass * klass)
|
|||
gobject_klass->get_property = fps_display_sink_get_property;
|
||||
gobject_klass->dispose = fps_display_sink_dispose;
|
||||
|
||||
g_object_class_install_property (gobject_klass, ARG_SYNC,
|
||||
g_object_class_install_property (gobject_klass, PROP_SYNC,
|
||||
g_param_spec_boolean ("sync",
|
||||
"Sync", "Sync on the clock (if the internally used sink doesn't "
|
||||
"have this property it will be ignored", DEFAULT_SYNC,
|
||||
G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE));
|
||||
|
||||
g_object_class_install_property (gobject_klass, ARG_TEXT_OVERLAY,
|
||||
g_object_class_install_property (gobject_klass, PROP_TEXT_OVERLAY,
|
||||
g_param_spec_boolean ("text-overlay",
|
||||
"text-overlay",
|
||||
"Whether to use text-overlay", TRUE,
|
||||
G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE));
|
||||
|
||||
g_object_class_install_property (gobject_klass, ARG_VIDEO_SINK,
|
||||
g_object_class_install_property (gobject_klass, PROP_VIDEO_SINK,
|
||||
g_param_spec_object ("video-sink",
|
||||
"video-sink",
|
||||
"Video sink to use (Must only be called on NULL state)",
|
||||
GST_TYPE_ELEMENT, G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE));
|
||||
|
||||
g_object_class_install_property (gobject_klass, ARG_FPS_UPDATE_INTERVAL,
|
||||
g_object_class_install_property (gobject_klass, PROP_FPS_UPDATE_INTERVAL,
|
||||
g_param_spec_int ("fps-update-interval", "Fps update interval",
|
||||
"Time between consecutive frames per second measures and update "
|
||||
" (in ms). Should be set on NULL state", 1, G_MAXINT,
|
||||
DEFAULT_FPS_UPDATE_INTERVAL_MS,
|
||||
G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE));
|
||||
|
||||
g_object_class_install_property (gobject_klass, ARG_MAX_FPS,
|
||||
g_object_class_install_property (gobject_klass, PROP_MAX_FPS,
|
||||
g_param_spec_double ("max-fps", "Max fps",
|
||||
"Maximum fps rate measured. Reset when going from NULL to READY."
|
||||
"-1 means no measurement has yet been done", -1, G_MAXDOUBLE, -1,
|
||||
G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
|
||||
|
||||
g_object_class_install_property (gobject_klass, ARG_MIN_FPS,
|
||||
g_object_class_install_property (gobject_klass, PROP_MIN_FPS,
|
||||
g_param_spec_double ("min-fps", "Min fps",
|
||||
"Minimum fps rate measured. Reset when going from NULL to READY."
|
||||
"-1 means no measurement has yet been done", -1, G_MAXDOUBLE, -1,
|
||||
G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
|
||||
|
||||
g_object_class_install_property (gobject_klass, ARG_FRAMES_DROPPED,
|
||||
g_object_class_install_property (gobject_klass, PROP_FRAMES_DROPPED,
|
||||
g_param_spec_uint ("frames-dropped", "dropped frames",
|
||||
"Number of frames dropped by the sink", 0, G_MAXUINT, 0,
|
||||
G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
|
||||
|
||||
g_object_class_install_property (gobject_klass, ARG_FRAMES_RENDERED,
|
||||
g_object_class_install_property (gobject_klass, PROP_FRAMES_RENDERED,
|
||||
g_param_spec_uint ("frames-rendered", "rendered frames",
|
||||
"Number of frames rendered", 0, G_MAXUINT, 0,
|
||||
G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
|
||||
|
||||
g_object_class_install_property (gobject_klass, ARG_VERBOSE,
|
||||
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_PARAM_STATIC_STRINGS | G_PARAM_READWRITE));
|
||||
|
||||
g_object_class_install_property (gobject_klass, ARG_SIGNAL_FPS_MEASUREMENTS,
|
||||
g_object_class_install_property (gobject_klass, PROP_SIGNAL_FPS_MEASUREMENTS,
|
||||
g_param_spec_boolean ("signal-fps-measurements",
|
||||
"Signal fps measurements",
|
||||
"If the fps-measurements signal should be emited.",
|
||||
|
@ -510,11 +510,11 @@ fps_display_sink_set_property (GObject * object, guint prop_id,
|
|||
GstFPSDisplaySink *self = GST_FPS_DISPLAY_SINK (object);
|
||||
|
||||
switch (prop_id) {
|
||||
case ARG_SYNC:
|
||||
case PROP_SYNC:
|
||||
self->sync = g_value_get_boolean (value);
|
||||
fps_display_sink_update_sink_sync (self);
|
||||
break;
|
||||
case ARG_TEXT_OVERLAY:
|
||||
case PROP_TEXT_OVERLAY:
|
||||
self->use_text_overlay = g_value_get_boolean (value);
|
||||
|
||||
if (self->text_overlay) {
|
||||
|
@ -527,7 +527,7 @@ fps_display_sink_set_property (GObject * object, guint prop_id,
|
|||
}
|
||||
}
|
||||
break;
|
||||
case ARG_VIDEO_SINK:
|
||||
case PROP_VIDEO_SINK:
|
||||
/* FIXME should we add a state-lock or a lock around here?
|
||||
* need to check if it is possible that a state change NULL->READY can
|
||||
* happen while this code is executing on a different thread */
|
||||
|
@ -538,14 +538,14 @@ fps_display_sink_set_property (GObject * object, guint prop_id,
|
|||
}
|
||||
update_video_sink (self, (GstElement *) g_value_get_object (value));
|
||||
break;
|
||||
case ARG_FPS_UPDATE_INTERVAL:
|
||||
case PROP_FPS_UPDATE_INTERVAL:
|
||||
self->fps_update_interval =
|
||||
GST_MSECOND * (GstClockTime) g_value_get_int (value);
|
||||
break;
|
||||
case ARG_SIGNAL_FPS_MEASUREMENTS:
|
||||
case PROP_SIGNAL_FPS_MEASUREMENTS:
|
||||
self->signal_measurements = g_value_get_boolean (value);
|
||||
break;
|
||||
case ARG_VERBOSE:
|
||||
case PROP_VERBOSE:
|
||||
self->verbose = g_value_get_boolean (value);
|
||||
break;
|
||||
default:
|
||||
|
@ -561,34 +561,34 @@ fps_display_sink_get_property (GObject * object, guint prop_id,
|
|||
GstFPSDisplaySink *self = GST_FPS_DISPLAY_SINK (object);
|
||||
|
||||
switch (prop_id) {
|
||||
case ARG_SYNC:
|
||||
case PROP_SYNC:
|
||||
g_value_set_boolean (value, self->sync);
|
||||
break;
|
||||
case ARG_TEXT_OVERLAY:
|
||||
case PROP_TEXT_OVERLAY:
|
||||
g_value_set_boolean (value, self->use_text_overlay);
|
||||
break;
|
||||
case ARG_VIDEO_SINK:
|
||||
case PROP_VIDEO_SINK:
|
||||
g_value_set_object (value, self->video_sink);
|
||||
break;
|
||||
case ARG_FPS_UPDATE_INTERVAL:
|
||||
case PROP_FPS_UPDATE_INTERVAL:
|
||||
g_value_set_int (value, (gint) (self->fps_update_interval / GST_MSECOND));
|
||||
break;
|
||||
case ARG_MAX_FPS:
|
||||
case PROP_MAX_FPS:
|
||||
g_value_set_double (value, self->max_fps);
|
||||
break;
|
||||
case ARG_MIN_FPS:
|
||||
case PROP_MIN_FPS:
|
||||
g_value_set_double (value, self->min_fps);
|
||||
break;
|
||||
case ARG_FRAMES_DROPPED:
|
||||
case PROP_FRAMES_DROPPED:
|
||||
g_value_set_uint (value, g_atomic_int_get (&self->frames_dropped));
|
||||
break;
|
||||
case ARG_FRAMES_RENDERED:
|
||||
case PROP_FRAMES_RENDERED:
|
||||
g_value_set_uint (value, g_atomic_int_get (&self->frames_rendered));
|
||||
break;
|
||||
case ARG_SIGNAL_FPS_MEASUREMENTS:
|
||||
case PROP_SIGNAL_FPS_MEASUREMENTS:
|
||||
g_value_set_boolean (value, self->signal_measurements);
|
||||
break;
|
||||
case ARG_VERBOSE:
|
||||
case PROP_VERBOSE:
|
||||
g_value_set_boolean (value, self->verbose);
|
||||
break;
|
||||
default:
|
||||
|
|
Loading…
Reference in a new issue