multifdsink: add num-fds property

multifdsink::num-fds
This commit is contained in:
Arnout Vandecappelle 2009-05-15 23:05:45 +02:00 committed by Wim Taymans
parent f2031e1313
commit 785f748810

View file

@ -218,6 +218,8 @@ enum
PROP_RESEND_STREAMHEADER,
PROP_NUM_FDS,
PROP_LAST
};
@ -520,6 +522,11 @@ gst_multi_fd_sink_class_init (GstMultiFdSinkClass * klass)
DEFAULT_RESEND_STREAMHEADER,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_NUM_FDS,
g_param_spec_uint ("num-fds", "Number of fds",
"The current number of client file descriptors.",
0, G_MAXUINT, 0, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
/**
* GstMultiFdSink::add:
* @gstmultifdsink: the multifdsink element to emit this signal on
@ -2798,6 +2805,9 @@ gst_multi_fd_sink_get_property (GObject * object, guint prop_id, GValue * value,
case PROP_RESEND_STREAMHEADER:
g_value_set_boolean (value, multifdsink->resend_streamheader);
break;
case PROP_NUM_FDS:
g_value_set_uint (value, g_hash_table_size (multifdsink->fd_hash));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);