mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-25 00:28:21 +00:00
utils: remove gst_element_class_install_std_props()
It's only used in one place (rtmp), and there not very well.
This commit is contained in:
parent
41841899c7
commit
552d726c3a
4 changed files with 0 additions and 128 deletions
|
@ -674,7 +674,6 @@ GST_ELEMENT_METADATA_LONGNAME
|
|||
gst_element_class_add_pad_template
|
||||
gst_element_class_get_pad_template
|
||||
gst_element_class_get_pad_template_list
|
||||
gst_element_class_install_std_props
|
||||
gst_element_class_set_metadata
|
||||
gst_element_class_add_metadata
|
||||
|
||||
|
|
122
gst/gstutils.c
122
gst/gstutils.c
|
@ -2506,128 +2506,6 @@ gst_bin_remove_many (GstBin * bin, GstElement * element_1, ...)
|
|||
va_end (args);
|
||||
}
|
||||
|
||||
static void
|
||||
gst_element_populate_std_props (GObjectClass * klass, const gchar * prop_name,
|
||||
guint arg_id, GParamFlags flags)
|
||||
{
|
||||
GQuark prop_id = g_quark_from_string (prop_name);
|
||||
GParamSpec *pspec;
|
||||
|
||||
static GQuark fd_id = 0;
|
||||
static GQuark blocksize_id;
|
||||
static GQuark bytesperread_id;
|
||||
static GQuark dump_id;
|
||||
static GQuark filesize_id;
|
||||
static GQuark mmapsize_id;
|
||||
static GQuark location_id;
|
||||
static GQuark offset_id;
|
||||
static GQuark silent_id;
|
||||
static GQuark touch_id;
|
||||
|
||||
flags |= G_PARAM_STATIC_STRINGS;
|
||||
|
||||
if (!fd_id) {
|
||||
fd_id = g_quark_from_static_string ("fd");
|
||||
blocksize_id = g_quark_from_static_string ("blocksize");
|
||||
bytesperread_id = g_quark_from_static_string ("bytesperread");
|
||||
dump_id = g_quark_from_static_string ("dump");
|
||||
filesize_id = g_quark_from_static_string ("filesize");
|
||||
mmapsize_id = g_quark_from_static_string ("mmapsize");
|
||||
location_id = g_quark_from_static_string ("location");
|
||||
offset_id = g_quark_from_static_string ("offset");
|
||||
silent_id = g_quark_from_static_string ("silent");
|
||||
touch_id = g_quark_from_static_string ("touch");
|
||||
}
|
||||
|
||||
if (prop_id == fd_id) {
|
||||
pspec = g_param_spec_int ("fd", "File-descriptor",
|
||||
"File-descriptor for the file being read", 0, G_MAXINT, 0, flags);
|
||||
} else if (prop_id == blocksize_id) {
|
||||
pspec = g_param_spec_ulong ("blocksize", "Block Size",
|
||||
"Block size to read per buffer", 0, G_MAXULONG, 4096, flags);
|
||||
|
||||
} else if (prop_id == bytesperread_id) {
|
||||
pspec = g_param_spec_int ("bytesperread", "Bytes per read",
|
||||
"Number of bytes to read per buffer", G_MININT, G_MAXINT, 0, flags);
|
||||
|
||||
} else if (prop_id == dump_id) {
|
||||
pspec = g_param_spec_boolean ("dump", "Dump",
|
||||
"Dump bytes to stdout", FALSE, flags);
|
||||
|
||||
} else if (prop_id == filesize_id) {
|
||||
pspec = g_param_spec_int64 ("filesize", "File Size",
|
||||
"Size of the file being read", 0, G_MAXINT64, 0, flags);
|
||||
|
||||
} else if (prop_id == mmapsize_id) {
|
||||
pspec = g_param_spec_ulong ("mmapsize", "mmap() Block Size",
|
||||
"Size in bytes of mmap()d regions", 0, G_MAXULONG, 4 * 1048576, flags);
|
||||
|
||||
} else if (prop_id == location_id) {
|
||||
pspec = g_param_spec_string ("location", "File Location",
|
||||
"Location of the file to read", NULL, flags);
|
||||
|
||||
} else if (prop_id == offset_id) {
|
||||
pspec = g_param_spec_int64 ("offset", "File Offset",
|
||||
"Byte offset of current read pointer", 0, G_MAXINT64, 0, flags);
|
||||
|
||||
} else if (prop_id == silent_id) {
|
||||
pspec = g_param_spec_boolean ("silent", "Silent", "Don't produce events",
|
||||
FALSE, flags);
|
||||
|
||||
} else if (prop_id == touch_id) {
|
||||
pspec = g_param_spec_boolean ("touch", "Touch read data",
|
||||
"Touch data to force disk read before " "push ()", TRUE, flags);
|
||||
} else {
|
||||
g_warning ("Unknown - 'standard' property '%s' id %d from klass %s",
|
||||
prop_name, arg_id, g_type_name (G_OBJECT_CLASS_TYPE (klass)));
|
||||
pspec = NULL;
|
||||
}
|
||||
|
||||
if (pspec) {
|
||||
g_object_class_install_property (klass, arg_id, pspec);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* gst_element_class_install_std_props:
|
||||
* @klass: the #GstElementClass to add the properties to.
|
||||
* @first_name: the name of the first property.
|
||||
* in a NULL terminated
|
||||
* @...: the id and flags of the first property, followed by
|
||||
* further 'name', 'id', 'flags' triplets and terminated by NULL.
|
||||
*
|
||||
* Adds a list of standardized properties with types to the @klass.
|
||||
* the id is for the property switch in your get_prop method, and
|
||||
* the flags determine readability / writeability.
|
||||
**/
|
||||
void
|
||||
gst_element_class_install_std_props (GstElementClass * klass,
|
||||
const gchar * first_name, ...)
|
||||
{
|
||||
const char *name;
|
||||
|
||||
va_list args;
|
||||
|
||||
g_return_if_fail (GST_IS_ELEMENT_CLASS (klass));
|
||||
|
||||
va_start (args, first_name);
|
||||
|
||||
name = first_name;
|
||||
|
||||
while (name) {
|
||||
int arg_id = va_arg (args, int);
|
||||
GParamFlags flags = (GParamFlags) va_arg (args, int);
|
||||
|
||||
gst_element_populate_std_props ((GObjectClass *) klass, name, arg_id,
|
||||
flags);
|
||||
|
||||
name = va_arg (args, char *);
|
||||
}
|
||||
|
||||
va_end (args);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* gst_buffer_merge:
|
||||
* @buf1: (transfer none): the first source #GstBuffer to merge.
|
||||
|
|
|
@ -885,10 +885,6 @@ gboolean gst_element_query_duration (GstElement *element, Gs
|
|||
gboolean gst_element_query_convert (GstElement *element, GstFormat src_format, gint64 src_val,
|
||||
GstFormat dest_format, gint64 *dest_val);
|
||||
|
||||
/* element class functions */
|
||||
void gst_element_class_install_std_props (GstElementClass * klass,
|
||||
const gchar * first_name, ...) G_GNUC_NULL_TERMINATED;
|
||||
|
||||
/* pad functions */
|
||||
void gst_pad_use_fixed_caps (GstPad *pad);
|
||||
GstElement* gst_pad_get_parent_element (GstPad *pad);
|
||||
|
|
|
@ -314,7 +314,6 @@ EXPORTS
|
|||
gst_element_class_get_metadata
|
||||
gst_element_class_get_pad_template
|
||||
gst_element_class_get_pad_template_list
|
||||
gst_element_class_install_std_props
|
||||
gst_element_class_set_metadata
|
||||
gst_element_continue_state
|
||||
gst_element_create_all_pads
|
||||
|
|
Loading…
Reference in a new issue