gstd-1.x icon indicating copy to clipboard operation
gstd-1.x copied to clipboard

Get (get_element) not obtaining integer value

Open carlos-aguero opened this issue 5 years ago • 3 comments

carlos-aguero avatar Jul 02 '20 20:07 carlos-aguero

Gstd always returning text, is this a bug or a restriction, are properties always returned as string? gstc element get @michaelgruner ?

carlos-aguero avatar Jul 08 '20 16:07 carlos-aguero

The gstd-client C API element_get only works for a string in the following case.

It works for: gstc_element_get (client, pipeName, "videotestsrc", "pattern", "%s", &val_str); But it doesn't work for a gstc_element_get (client, pipeName, "videotestsrc", "pattern", "%d", &val_int);

The gstd_parser (gstd_parser_read) always returns a string value.

{
    "name" : "pattern",
    "value" : "SMPTE 100% color bars",
    "param" : {
        "description" : "Type of test pattern to generate",
        "type" : "GstVideoTestSrcPattern",
        "access" : "((GstdParamFlags) READ | 226)"
}

Abrahamon avatar Jul 08 '20 16:07 Abrahamon

The element_get works for properties that are integer: gstc_element_get (client, pipeName, "videotestsrc", "num-buffers", "%d", &val_int);

Abrahamon avatar Jul 13 '20 14:07 Abrahamon