mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-20 23:36:38 +00:00
multifdsink: add num-fds property
multifdsink::num-fds
This commit is contained in:
parent
f2031e1313
commit
785f748810
1 changed files with 10 additions and 0 deletions
|
@ -218,6 +218,8 @@ enum
|
||||||
|
|
||||||
PROP_RESEND_STREAMHEADER,
|
PROP_RESEND_STREAMHEADER,
|
||||||
|
|
||||||
|
PROP_NUM_FDS,
|
||||||
|
|
||||||
PROP_LAST
|
PROP_LAST
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -520,6 +522,11 @@ gst_multi_fd_sink_class_init (GstMultiFdSinkClass * klass)
|
||||||
DEFAULT_RESEND_STREAMHEADER,
|
DEFAULT_RESEND_STREAMHEADER,
|
||||||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
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::add:
|
||||||
* @gstmultifdsink: the multifdsink element to emit this signal on
|
* @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:
|
case PROP_RESEND_STREAMHEADER:
|
||||||
g_value_set_boolean (value, multifdsink->resend_streamheader);
|
g_value_set_boolean (value, multifdsink->resend_streamheader);
|
||||||
break;
|
break;
|
||||||
|
case PROP_NUM_FDS:
|
||||||
|
g_value_set_uint (value, g_hash_table_size (multifdsink->fd_hash));
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||||
|
|
Loading…
Reference in a new issue