mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-22 00:06:36 +00:00
Don't assume all properties are writeable in any case
This commit is contained in:
parent
60bce938cb
commit
5404a9565a
13 changed files with 34 additions and 29 deletions
|
@ -223,7 +223,6 @@ print_element_properties (GstElement * element, gint pfx)
|
|||
GParamSpec **property_specs;
|
||||
guint num_properties;
|
||||
gint i;
|
||||
gboolean readable;
|
||||
|
||||
property_specs = g_object_class_list_properties
|
||||
(G_OBJECT_GET_CLASS (element), &num_properties);
|
||||
|
@ -233,8 +232,9 @@ print_element_properties (GstElement * element, gint pfx)
|
|||
for (i = 0; i < num_properties; i++) {
|
||||
GValue value = { 0, };
|
||||
GParamSpec *param = property_specs[i];
|
||||
gboolean readable, writeable;
|
||||
|
||||
readable = FALSE;
|
||||
readable = writeable = FALSE;
|
||||
|
||||
g_value_init (&value, param->value_type);
|
||||
if (param->flags & G_PARAM_READABLE) {
|
||||
|
@ -242,6 +242,9 @@ print_element_properties (GstElement * element, gint pfx)
|
|||
readable = TRUE;
|
||||
}
|
||||
|
||||
if (param->flags & G_PARAM_WRITABLE)
|
||||
writeable = TRUE;
|
||||
|
||||
/* Ignore GstObject, GstElement, GstBin, GstPipeline properties */
|
||||
if (param->owner_type == GST_TYPE_OBJECT ||
|
||||
param->owner_type == GST_TYPE_ELEMENT ||
|
||||
|
@ -254,9 +257,11 @@ print_element_properties (GstElement * element, gint pfx)
|
|||
PUT_ESCAPED (pfx + 2, "type", g_type_name (param->value_type));
|
||||
PUT_ESCAPED (pfx + 2, "nick", g_param_spec_get_nick (param));
|
||||
PUT_ESCAPED (pfx + 2, "blurb", g_param_spec_get_blurb (param));
|
||||
if (readable) {
|
||||
if (readable && writeable) {
|
||||
PUT_ESCAPED (pfx + 2, "flags", "RW");
|
||||
} else {
|
||||
} else if (readable) {
|
||||
PUT_ESCAPED (pfx + 2, "flags", "R");
|
||||
} else if (writeable) {
|
||||
PUT_ESCAPED (pfx + 2, "flags", "W");
|
||||
}
|
||||
|
||||
|
|
|
@ -89,7 +89,7 @@
|
|||
<type>gint</type>
|
||||
<nick>NStreams</nick>
|
||||
<blurb>number of streams</blurb>
|
||||
<flags>RW</flags>
|
||||
<flags>R</flags>
|
||||
<range min="0" max="2147483647"/>
|
||||
<default>0</default>
|
||||
</element-property>
|
||||
|
@ -98,21 +98,21 @@
|
|||
<type>gpointer</type>
|
||||
<nick>Stream info</nick>
|
||||
<blurb>List of streaminfo</blurb>
|
||||
<flags>RW</flags>
|
||||
<flags>R</flags>
|
||||
</element-property>
|
||||
<element-property>
|
||||
<name>stream-info-value-array</name>
|
||||
<type>GValueArray</type>
|
||||
<nick>StreamInfo GValueArray</nick>
|
||||
<blurb>value array of streaminfo</blurb>
|
||||
<flags>RW</flags>
|
||||
<flags>R</flags>
|
||||
</element-property>
|
||||
<element-property>
|
||||
<name>source</name>
|
||||
<type>GstElement</type>
|
||||
<nick>Source</nick>
|
||||
<blurb>Source element</blurb>
|
||||
<flags>RW</flags>
|
||||
<flags>R</flags>
|
||||
<object-type>GstElement</object-type>
|
||||
</element-property>
|
||||
<element-property>
|
||||
|
@ -197,7 +197,7 @@
|
|||
<type>GstBuffer</type>
|
||||
<nick>Frame</nick>
|
||||
<blurb>The last frame (NULL = no video available)</blurb>
|
||||
<flags>RW</flags>
|
||||
<flags>R</flags>
|
||||
</element-property>
|
||||
<element-property>
|
||||
<name>subtitle-font-desc</name>
|
||||
|
|
|
@ -60,7 +60,7 @@
|
|||
<type>GstElement</type>
|
||||
<nick>Source</nick>
|
||||
<blurb>Source element</blurb>
|
||||
<flags>RW</flags>
|
||||
<flags>R</flags>
|
||||
<object-type>GstElement</object-type>
|
||||
</element-property>
|
||||
<element-property>
|
||||
|
@ -85,7 +85,7 @@
|
|||
<type>gint</type>
|
||||
<nick>Number Video</nick>
|
||||
<blurb>Total number of video streams</blurb>
|
||||
<flags>RW</flags>
|
||||
<flags>R</flags>
|
||||
<range min="0" max="2147483647"/>
|
||||
<default>0</default>
|
||||
</element-property>
|
||||
|
@ -103,7 +103,7 @@
|
|||
<type>gint</type>
|
||||
<nick>Number Audio</nick>
|
||||
<blurb>Total number of audio streams</blurb>
|
||||
<flags>RW</flags>
|
||||
<flags>R</flags>
|
||||
<range min="0" max="2147483647"/>
|
||||
<default>0</default>
|
||||
</element-property>
|
||||
|
@ -121,7 +121,7 @@
|
|||
<type>gint</type>
|
||||
<nick>Number Text</nick>
|
||||
<blurb>Total number of text streams</blurb>
|
||||
<flags>RW</flags>
|
||||
<flags>R</flags>
|
||||
<range min="0" max="2147483647"/>
|
||||
<default>0</default>
|
||||
</element-property>
|
||||
|
@ -204,7 +204,7 @@
|
|||
<type>GstBuffer</type>
|
||||
<nick>Frame</nick>
|
||||
<blurb>The last frame (NULL = no video available)</blurb>
|
||||
<flags>RW</flags>
|
||||
<flags>R</flags>
|
||||
</element-property>
|
||||
<element-property>
|
||||
<name>subtitle-font-desc</name>
|
||||
|
|
|
@ -111,7 +111,7 @@
|
|||
<type>GstBuffer</type>
|
||||
<nick>Last Buffer</nick>
|
||||
<blurb>The last buffer received in the sink</blurb>
|
||||
<flags>RW</flags>
|
||||
<flags>R</flags>
|
||||
</element-property>
|
||||
<element-property>
|
||||
<name>blocksize</name>
|
||||
|
@ -220,7 +220,7 @@
|
|||
<type>gchararray</type>
|
||||
<nick>Adaptor name</nick>
|
||||
<blurb>The name of the video adaptor</blurb>
|
||||
<flags>RW</flags>
|
||||
<flags>R</flags>
|
||||
<default>NULL</default>
|
||||
</element-property>
|
||||
<element-property>
|
||||
|
|
|
@ -104,7 +104,7 @@
|
|||
<type>GstBuffer</type>
|
||||
<nick>Last Buffer</nick>
|
||||
<blurb>The last buffer received in the sink</blurb>
|
||||
<flags>RW</flags>
|
||||
<flags>R</flags>
|
||||
</element-property>
|
||||
<element-property>
|
||||
<name>blocksize</name>
|
||||
|
@ -170,7 +170,7 @@
|
|||
<type>gchararray</type>
|
||||
<nick>Last Message</nick>
|
||||
<blurb>The message describing current status</blurb>
|
||||
<flags>RW</flags>
|
||||
<flags>R</flags>
|
||||
<default>NULL</default>
|
||||
</element-property>
|
||||
<element-property>
|
||||
|
|
|
@ -203,7 +203,7 @@
|
|||
<type>gchararray</type>
|
||||
<nick>last-message</nick>
|
||||
<blurb>The last status message</blurb>
|
||||
<flags>RW</flags>
|
||||
<flags>R</flags>
|
||||
<default>NULL</default>
|
||||
</element-property>
|
||||
<element-property>
|
||||
|
|
|
@ -106,7 +106,7 @@
|
|||
<type>GstBuffer</type>
|
||||
<nick>Last Buffer</nick>
|
||||
<blurb>The last buffer received in the sink</blurb>
|
||||
<flags>RW</flags>
|
||||
<flags>R</flags>
|
||||
</element-property>
|
||||
<element-property>
|
||||
<name>blocksize</name>
|
||||
|
|
|
@ -106,7 +106,7 @@
|
|||
<type>GstBuffer</type>
|
||||
<nick>Last Buffer</nick>
|
||||
<blurb>The last buffer received in the sink</blurb>
|
||||
<flags>RW</flags>
|
||||
<flags>R</flags>
|
||||
</element-property>
|
||||
<element-property>
|
||||
<name>blocksize</name>
|
||||
|
|
|
@ -96,7 +96,7 @@
|
|||
<type>gint</type>
|
||||
<nick>File-descriptor</nick>
|
||||
<blurb>File-descriptor for the file being mmap()d</blurb>
|
||||
<flags>RW</flags>
|
||||
<flags>R</flags>
|
||||
<range min="0" max="2147483647"/>
|
||||
<default>0</default>
|
||||
</element-property>
|
||||
|
|
|
@ -128,7 +128,7 @@
|
|||
<type>gchararray</type>
|
||||
<nick>last-message</nick>
|
||||
<blurb>last-message</blurb>
|
||||
<flags>RW</flags>
|
||||
<flags>R</flags>
|
||||
<default>NULL</default>
|
||||
</element-property>
|
||||
<element-property>
|
||||
|
|
|
@ -66,7 +66,7 @@
|
|||
<type>guint</type>
|
||||
<nick>Current level (buffers)</nick>
|
||||
<blurb>Current number of buffers in the queue</blurb>
|
||||
<flags>RW</flags>
|
||||
<flags>R</flags>
|
||||
<range min="0" max="4294967295"/>
|
||||
<default>0</default>
|
||||
</element-property>
|
||||
|
@ -75,7 +75,7 @@
|
|||
<type>guint</type>
|
||||
<nick>Current level (kB)</nick>
|
||||
<blurb>Current amount of data in the queue (bytes)</blurb>
|
||||
<flags>RW</flags>
|
||||
<flags>R</flags>
|
||||
<range min="0" max="4294967295"/>
|
||||
<default>0</default>
|
||||
</element-property>
|
||||
|
@ -84,7 +84,7 @@
|
|||
<type>guint64</type>
|
||||
<nick>Current level (ns)</nick>
|
||||
<blurb>Current amount of data in the queue (in ns)</blurb>
|
||||
<flags>RW</flags>
|
||||
<flags>R</flags>
|
||||
<range min="0" max="18446744073709551615"/>
|
||||
<default>0</default>
|
||||
</element-property>
|
||||
|
|
|
@ -57,7 +57,7 @@
|
|||
<type>gint</type>
|
||||
<nick>Num Src Pads</nick>
|
||||
<blurb>The number of source pads</blurb>
|
||||
<flags>RW</flags>
|
||||
<flags>R</flags>
|
||||
<range min="0" max="2147483647"/>
|
||||
<default>0</default>
|
||||
</element-property>
|
||||
|
@ -90,7 +90,7 @@
|
|||
<type>gchararray</type>
|
||||
<nick>Last Message</nick>
|
||||
<blurb>The message describing current status</blurb>
|
||||
<flags>RW</flags>
|
||||
<flags>R</flags>
|
||||
<default>NULL</default>
|
||||
</element-property>
|
||||
<element-property>
|
||||
|
|
|
@ -66,7 +66,7 @@
|
|||
<type>GstCaps</type>
|
||||
<nick>caps</nick>
|
||||
<blurb>detected capabilities in stream</blurb>
|
||||
<flags>RW</flags>
|
||||
<flags>R</flags>
|
||||
<default>NULL</default>
|
||||
</element-property>
|
||||
<element-property>
|
||||
|
|
Loading…
Reference in a new issue