diff --git a/pinos/gst/gstpinosformat.c b/pinos/gst/gstpinosformat.c index 1f93729a4..3aa43f4a7 100644 --- a/pinos/gst/gstpinosformat.c +++ b/pinos/gst/gstpinosformat.c @@ -187,7 +187,6 @@ handle_video_size (ConvertData *d) d->bpi[d->pi].range_values = &d->bri[d->ri]; d->bri[d->ri].name = NULL; - d->bri[d->ri].description = NULL; d->bri[d->ri].val.size = sizeof (SpaRectangle); d->bri[d->ri].val.value = d->p; sv->width = gst_value_get_int_range_min (val); @@ -196,7 +195,6 @@ handle_video_size (ConvertData *d) d->ri++; d->bri[d->ri].name = NULL; - d->bri[d->ri].description = NULL; d->bri[d->ri].val.size = sizeof (SpaRectangle); d->bri[d->ri].val.value = d->p; sv->width = gst_value_get_int_range_max (val); @@ -251,7 +249,6 @@ handle_video_framerate (ConvertData *d) d->bpi[d->pi].range_values = &d->bri[d->ri]; d->bri[d->ri].name = NULL; - d->bri[d->ri].description = NULL; d->bri[d->ri].val.size = sizeof (SpaFraction); d->bri[d->ri].val.value = d->p; sv->num = gst_value_get_fraction_numerator (min); @@ -260,7 +257,6 @@ handle_video_framerate (ConvertData *d) d->ri++; d->bri[d->ri].name = NULL; - d->bri[d->ri].description = NULL; d->bri[d->ri].val.size = sizeof (SpaFraction); d->bri[d->ri].val.value = d->p; sv->num = gst_value_get_fraction_numerator (max); diff --git a/spa/include/spa/props.h b/spa/include/spa/props.h index 39d47a4aa..3a871292c 100644 --- a/spa/include/spa/props.h +++ b/spa/include/spa/props.h @@ -117,12 +117,10 @@ typedef struct { /** * SpaPropRangeInfo: * @name: name of this value - * @description: user visible description of this value * @val: the value */ typedef struct { const char *name; - const char *description; SpaPropValue val; } SpaPropRangeInfo; @@ -131,7 +129,6 @@ typedef struct { * @id: unique id * @offset: offset in structure with data * @name: human readable name - * @description: description of the property * @flags: property flags * @type: property type * @max_size: maximum size of property value @@ -144,7 +141,6 @@ typedef struct { uint32_t id; size_t offset; const char *name; - const char *description; SpaPropFlags flags; SpaPropType type; size_t maxsize; diff --git a/spa/lib/audio-raw.c b/spa/lib/audio-raw.c index a99bef9c3..fd23f205e 100644 --- a/spa/lib/audio-raw.c +++ b/spa/lib/audio-raw.c @@ -66,36 +66,36 @@ static const uint32_t format_values[] = { }; static const SpaPropRangeInfo format_format_range[] = { - { "S8", "S8", { sizeof (uint32_t), &format_values[0] } }, - { "U8", "U8", { sizeof (uint32_t), &format_values[1] } }, - { "S16LE", "S16LE", { sizeof (uint32_t), &format_values[2] } }, - { "S16BE", "S16BE", { sizeof (uint32_t), &format_values[3] } }, - { "U16LE", "U16LE", { sizeof (uint32_t), &format_values[4] } }, - { "U16BE", "U16BE", { sizeof (uint32_t), &format_values[5] } }, - { "S24_32LE", "S24_32LE", { sizeof (uint32_t), &format_values[6] } }, - { "S24_32BE", "S24_32BE", { sizeof (uint32_t), &format_values[7] } }, - { "U24_32LE", "U24_32LE", { sizeof (uint32_t), &format_values[8] } }, - { "U24_32BE", "U24_32BE", { sizeof (uint32_t), &format_values[9] } }, - { "S32LE", "S32LE", { sizeof (uint32_t), &format_values[10] } }, - { "S32BE", "S32BE", { sizeof (uint32_t), &format_values[11] } }, - { "U32LE", "U32LE", { sizeof (uint32_t), &format_values[12] } }, - { "U32BE", "U32BE", { sizeof (uint32_t), &format_values[13] } }, - { "S24LE", "S24LE", { sizeof (uint32_t), &format_values[14] } }, - { "S24BE", "S24BE", { sizeof (uint32_t), &format_values[15] } }, - { "U24LE", "U24LE", { sizeof (uint32_t), &format_values[16] } }, - { "U24BE", "U24BE", { sizeof (uint32_t), &format_values[17] } }, - { "S20LE", "S20LE", { sizeof (uint32_t), &format_values[18] } }, - { "S20BE", "S20BE", { sizeof (uint32_t), &format_values[19] } }, - { "U20LE", "U20LE", { sizeof (uint32_t), &format_values[20] } }, - { "U20BE", "U20BE", { sizeof (uint32_t), &format_values[21] } }, - { "S18LE", "S18LE", { sizeof (uint32_t), &format_values[22] } }, - { "S18BE", "S18BE", { sizeof (uint32_t), &format_values[23] } }, - { "U18LE", "U18LE", { sizeof (uint32_t), &format_values[24] } }, - { "U18BE", "U18BE", { sizeof (uint32_t), &format_values[25] } }, - { "F32LE", "F32LE", { sizeof (uint32_t), &format_values[26] } }, - { "F32BE", "F32BE", { sizeof (uint32_t), &format_values[27] } }, - { "F64LE", "F64LE", { sizeof (uint32_t), &format_values[28] } }, - { "F64BE", "F64BE", { sizeof (uint32_t), &format_values[29] } }, + { "S8", { sizeof (uint32_t), &format_values[0] } }, + { "U8", { sizeof (uint32_t), &format_values[1] } }, + { "S16LE", { sizeof (uint32_t), &format_values[2] } }, + { "S16BE", { sizeof (uint32_t), &format_values[3] } }, + { "U16LE", { sizeof (uint32_t), &format_values[4] } }, + { "U16BE", { sizeof (uint32_t), &format_values[5] } }, + { "S24_32LE", { sizeof (uint32_t), &format_values[6] } }, + { "S24_32BE", { sizeof (uint32_t), &format_values[7] } }, + { "U24_32LE", { sizeof (uint32_t), &format_values[8] } }, + { "U24_32BE", { sizeof (uint32_t), &format_values[9] } }, + { "S32LE", { sizeof (uint32_t), &format_values[10] } }, + { "S32BE", { sizeof (uint32_t), &format_values[11] } }, + { "U32LE", { sizeof (uint32_t), &format_values[12] } }, + { "U32BE", { sizeof (uint32_t), &format_values[13] } }, + { "S24LE", { sizeof (uint32_t), &format_values[14] } }, + { "S24BE", { sizeof (uint32_t), &format_values[15] } }, + { "U24LE", { sizeof (uint32_t), &format_values[16] } }, + { "U24BE", { sizeof (uint32_t), &format_values[17] } }, + { "S20LE", { sizeof (uint32_t), &format_values[18] } }, + { "S20BE", { sizeof (uint32_t), &format_values[19] } }, + { "U20LE", { sizeof (uint32_t), &format_values[20] } }, + { "U20BE", { sizeof (uint32_t), &format_values[21] } }, + { "S18LE", { sizeof (uint32_t), &format_values[22] } }, + { "S18BE", { sizeof (uint32_t), &format_values[23] } }, + { "U18LE", { sizeof (uint32_t), &format_values[24] } }, + { "U18BE", { sizeof (uint32_t), &format_values[25] } }, + { "F32LE", { sizeof (uint32_t), &format_values[26] } }, + { "F32BE", { sizeof (uint32_t), &format_values[27] } }, + { "F64LE", { sizeof (uint32_t), &format_values[28] } }, + { "F64BE", { sizeof (uint32_t), &format_values[29] } }, }; static const uint32_t format_layouts[] = { @@ -104,8 +104,8 @@ static const uint32_t format_layouts[] = { }; static const SpaPropRangeInfo layouts_range[] = { - { "interleaved", "Interleaved samples", { sizeof (uint32_t), &format_layouts[0] } }, - { "non-interleaved", "Non-interleaved samples", { sizeof (uint32_t), &format_layouts[1] } }, + { "interleaved", { sizeof (uint32_t), &format_layouts[0] } }, + { "non-interleaved", { sizeof (uint32_t), &format_layouts[1] } }, }; static const uint32_t format_flags[] = { @@ -114,58 +114,58 @@ static const uint32_t format_flags[] = { }; static const SpaPropRangeInfo flags_range[] = { - { "none", "No flags", { sizeof (uint32_t), &format_flags[0] } }, - { "unpositioned", "Unpositioned channels", { sizeof (uint32_t), &format_flags[1] } }, + { "none", { sizeof (uint32_t), &format_flags[0] } }, + { "unpositioned", { sizeof (uint32_t), &format_flags[1] } }, }; static const uint32_t min_uint32 = 1; static const uint32_t max_uint32 = UINT32_MAX; static const SpaPropRangeInfo uint32_range[] = { - { "min", "Minimum value", { sizeof (uint32_t), &min_uint32 } }, - { "max", "Maximum value", { sizeof (uint32_t), &max_uint32 } }, + { "min", { sizeof (uint32_t), &min_uint32 } }, + { "max", { sizeof (uint32_t), &max_uint32 } }, }; static const SpaPropInfo format_prop_info[] = { { SPA_PROP_ID_AUDIO_INFO, 0, - "info", "the SpaAudioInfo structure", + "info", SPA_PROP_FLAG_READWRITE | SPA_PROP_FLAG_OPTIONAL | SPA_PROP_FLAG_INFO, SPA_PROP_TYPE_POINTER, sizeof (SpaAudioInfoRaw), SPA_PROP_RANGE_TYPE_NONE, 0, NULL, NULL }, { SPA_PROP_ID_AUDIO_FORMAT, 0, - "format", "The media format", + "format", SPA_PROP_FLAG_READWRITE, SPA_PROP_TYPE_UINT32, sizeof (uint32_t), SPA_PROP_RANGE_TYPE_ENUM, SPA_N_ELEMENTS (format_format_range), format_format_range, NULL }, { SPA_PROP_ID_AUDIO_FLAGS, 0, - "flags", "Sample Flags", + "flags", SPA_PROP_FLAG_READWRITE, SPA_PROP_TYPE_UINT32, sizeof (uint32_t), SPA_PROP_RANGE_TYPE_FLAGS, SPA_N_ELEMENTS (flags_range), flags_range, NULL }, { SPA_PROP_ID_AUDIO_LAYOUT, 0, - "layout", "Sample Layout", + "layout", SPA_PROP_FLAG_READWRITE, SPA_PROP_TYPE_UINT32, sizeof (uint32_t), SPA_PROP_RANGE_TYPE_ENUM, SPA_N_ELEMENTS (layouts_range), layouts_range, NULL }, { SPA_PROP_ID_AUDIO_RATE, 0, - "rate", "Audio sample rate", + "rate", SPA_PROP_FLAG_READWRITE, SPA_PROP_TYPE_UINT32, sizeof (uint32_t), SPA_PROP_RANGE_TYPE_MIN_MAX, 2, uint32_range, NULL }, { SPA_PROP_ID_AUDIO_CHANNELS, 0, - "channels", "Audio channels", + "channels", SPA_PROP_FLAG_READWRITE, SPA_PROP_TYPE_UINT32, sizeof (uint32_t), SPA_PROP_RANGE_TYPE_MIN_MAX, 2, uint32_range, NULL }, { SPA_PROP_ID_AUDIO_CHANNEL_MASK, 0, - "channel-mask", "Audio channel mask", + "channel-mask", SPA_PROP_FLAG_READWRITE, SPA_PROP_TYPE_BITMASK, sizeof (uint32_t), SPA_PROP_RANGE_TYPE_NONE, 0, NULL, diff --git a/spa/lib/debug.c b/spa/lib/debug.c index ce18965cf..45da1c7c5 100644 --- a/spa/lib/debug.c +++ b/spa/lib/debug.c @@ -377,7 +377,7 @@ spa_debug_props (const SpaProps *props, bool print_ranges) info = &props->prop_info[i]; - fprintf (stderr, " %-20s: %s\n", info->name, info->description); + fprintf (stderr, " %-20s\n", info->name); fprintf (stderr, "%-23.23s flags: ", ""); if (info->flags & SPA_PROP_FLAG_READABLE) fprintf (stderr, "readable "); @@ -430,7 +430,7 @@ spa_debug_props (const SpaProps *props, bool print_ranges) const SpaPropRangeInfo *rinfo = &info->range_values[j]; fprintf (stderr, "%-23.23s ", ""); print_value (info, &rinfo->val); - fprintf (stderr, "\t: %-12s - %s \n", rinfo->name, rinfo->description); + fprintf (stderr, "\t: %-12s\n", rinfo->name); } } if (info->tags) { diff --git a/spa/lib/props.c b/spa/lib/props.c index a1ab6b75f..128c03259 100644 --- a/spa/lib/props.c +++ b/spa/lib/props.c @@ -119,14 +119,12 @@ spa_props_get_size (const SpaProps *props) pi = (SpaPropInfo *) &props->prop_info[i]; len += sizeof (SpaPropInfo); len += pi->name ? strlen (pi->name) + 1 : 0; - len += pi->description ? strlen (pi->description) + 1 : 0; /* for the value */ len += pi->maxsize; for (j = 0; j < pi->n_range_values; j++) { ri = (SpaPropRangeInfo *)&pi->range_values[j]; len += sizeof (SpaPropRangeInfo); len += ri->name ? strlen (ri->name) + 1 : 0; - len += ri->description ? strlen (ri->description) + 1 : 0; /* the size of the range value */ len += ri->val.size; } @@ -172,14 +170,6 @@ spa_props_serialize (void *p, const SpaProps *props) } else { pi[i].name = 0; } - if (pi[i].description) { - slen = strlen (pi[i].description) + 1; - memcpy (p, pi[i].description, slen); - pi[i].description = SPA_INT_TO_PTR (SPA_PTRDIFF (p, tp)); - p += slen; - } else { - pi[i].description = 0; - } for (j = 0; j < pi[i].n_range_values; j++, c++) { if (ri[c].name) { slen = strlen (ri[c].name) + 1; @@ -189,14 +179,6 @@ spa_props_serialize (void *p, const SpaProps *props) } else { ri[c].name = 0; } - if (ri[c].description) { - slen = strlen (ri[c].description) + 1; - memcpy (p, ri[c].description, slen); - ri[c].description = SPA_INT_TO_PTR (SPA_PTRDIFF (p, tp)); - p += slen; - } else { - ri[c].description = 0; - } if (ri[c].val.size) { memcpy (p, ri[c].val.value, ri[c].val.size); ri[c].val.value = SPA_INT_TO_PTR (SPA_PTRDIFF (p, tp)); @@ -237,8 +219,6 @@ spa_props_deserialize (void *p, off_t offset) pi = (SpaPropInfo *) &tp->prop_info[i]; if (pi->name) pi->name = SPA_MEMBER (tp, SPA_PTR_TO_INT (pi->name), char); - if (pi->description) - pi->description = SPA_MEMBER (tp, SPA_PTR_TO_INT (pi->description), char); if (pi->range_values) pi->range_values = SPA_MEMBER (tp, SPA_PTR_TO_INT (pi->range_values), SpaPropRangeInfo); @@ -246,8 +226,6 @@ spa_props_deserialize (void *p, off_t offset) ri = (SpaPropRangeInfo *) &pi->range_values[j]; if (ri->name) ri->name = SPA_MEMBER (tp, SPA_PTR_TO_INT (ri->name), char); - if (ri->description) - ri->description = SPA_MEMBER (tp, SPA_PTR_TO_INT (ri->description), char); if (ri->val.value) ri->val.value = SPA_MEMBER (tp, SPA_PTR_TO_INT (ri->val.value), void); } diff --git a/spa/lib/video-raw.c b/spa/lib/video-raw.c index 2b300d3b4..c7b63b1f5 100644 --- a/spa/lib/video-raw.c +++ b/spa/lib/video-raw.c @@ -93,77 +93,77 @@ static const uint32_t format_values[] = { }; static const SpaPropRangeInfo format_range[] = { - { "ENCODED", "ENCODED", { sizeof (uint32_t), &format_values[1] } }, - { "I420", "I420", { sizeof (uint32_t), &format_values[2] } }, - { "YV12", "YV12", { sizeof (uint32_t), &format_values[3] } }, - { "YUY2", "YUY2", { sizeof (uint32_t), &format_values[4] } }, - { "UYVY", "UYVY", { sizeof (uint32_t), &format_values[5] } }, - { "AYUV", "AYUV", { sizeof (uint32_t), &format_values[6] } }, - { "RGBx", "RGBx", { sizeof (uint32_t), &format_values[7] } }, - { "BGRx", "BGRx", { sizeof (uint32_t), &format_values[8] } }, - { "xRGB", "xRGB", { sizeof (uint32_t), &format_values[9] } }, - { "xBGR", "xBGR", { sizeof (uint32_t), &format_values[10] } }, - { "RGBA", "RGBA", { sizeof (uint32_t), &format_values[11] } }, - { "BGRA", "BGRA", { sizeof (uint32_t), &format_values[12] } }, - { "ARGB", "ARGB", { sizeof (uint32_t), &format_values[13] } }, - { "ABGR", "ABGR", { sizeof (uint32_t), &format_values[14] } }, - { "RGB", "RGB", { sizeof (uint32_t), &format_values[15] } }, - { "BGR", "BGR", { sizeof (uint32_t), &format_values[16] } }, - { "Y41B", "Y41B", { sizeof (uint32_t), &format_values[17] } }, - { "Y42B", "Y42B", { sizeof (uint32_t), &format_values[18] } }, - { "YVYU", "YVYU", { sizeof (uint32_t), &format_values[19] } }, - { "Y444", "Y444", { sizeof (uint32_t), &format_values[20] } }, - { "v210", "v210", { sizeof (uint32_t), &format_values[21] } }, - { "v216", "v216", { sizeof (uint32_t), &format_values[22] } }, - { "NV12", "NV12", { sizeof (uint32_t), &format_values[23] } }, - { "NV21", "NV21", { sizeof (uint32_t), &format_values[24] } }, - { "GRAY8", "GRAY8", { sizeof (uint32_t), &format_values[25] } }, - { "GRAY16_BE", "GRAY16_BE", { sizeof (uint32_t), &format_values[26] } }, - { "GRAY16_LE", "GRAY16_LE", { sizeof (uint32_t), &format_values[27] } }, - { "v308", "v308", { sizeof (uint32_t), &format_values[28] } }, - { "RGB16", "RGB16", { sizeof (uint32_t), &format_values[29] } }, - { "BGR16", "BGR16", { sizeof (uint32_t), &format_values[30] } }, - { "RGB15", "RGB15", { sizeof (uint32_t), &format_values[31] } }, - { "BGR15", "BGR15", { sizeof (uint32_t), &format_values[32] } }, - { "UYVP", "UYVP", { sizeof (uint32_t), &format_values[33] } }, - { "A420", "A420", { sizeof (uint32_t), &format_values[34] } }, - { "RGB8P", "RGB8P", { sizeof (uint32_t), &format_values[35] } }, - { "YUV9", "YUV9", { sizeof (uint32_t), &format_values[36] } }, - { "YVU9", "YVU9", { sizeof (uint32_t), &format_values[37] } }, - { "IYU1", "IYU1", { sizeof (uint32_t), &format_values[38] } }, - { "ARGB64", "ARGB64", { sizeof (uint32_t), &format_values[39] } }, - { "AYUV64", "AYUV64", { sizeof (uint32_t), &format_values[40] } }, - { "r210", "r210", { sizeof (uint32_t), &format_values[41] } }, - { "I420_10BE", "I420_10BE", { sizeof (uint32_t), &format_values[42] } }, - { "I420_10LE", "I420_10LE", { sizeof (uint32_t), &format_values[43] } }, - { "I422_10BE", "I422_10BE", { sizeof (uint32_t), &format_values[44] } }, - { "I422_10LE", "I422_10LE", { sizeof (uint32_t), &format_values[45] } }, - { "I444_10BE", "I444_10BE", { sizeof (uint32_t), &format_values[46] } }, - { "I444_10LE", "I444_10LE", { sizeof (uint32_t), &format_values[47] } }, - { "GBR", "GBR", { sizeof (uint32_t), &format_values[48] } }, - { "GBR_10BE", "GBR_10BE", { sizeof (uint32_t), &format_values[49] } }, - { "GBR_10LE", "GBR_10LE", { sizeof (uint32_t), &format_values[50] } }, - { "NV16", "NV16", { sizeof (uint32_t), &format_values[51] } }, - { "NV24", "NV24", { sizeof (uint32_t), &format_values[52] } }, - { "NV12_64Z32", "NV12_64Z32", { sizeof (uint32_t), &format_values[53] } }, - { "A420_10BE", "A420_10BE", { sizeof (uint32_t), &format_values[54] } }, - { "A420_10LE", "A420_10LE", { sizeof (uint32_t), &format_values[55] } }, - { "A422_10BE", "A422_10BE", { sizeof (uint32_t), &format_values[56] } }, - { "A422_10LE", "A422_10LE", { sizeof (uint32_t), &format_values[57] } }, - { "A444_10BE", "A444_10BE", { sizeof (uint32_t), &format_values[58] } }, - { "A444_10LE", "A444_10LE", { sizeof (uint32_t), &format_values[59] } }, - { "NV61", "NV61", { sizeof (uint32_t), &format_values[60] } }, - { "P010_10BE", "P010_10BE", { sizeof (uint32_t), &format_values[61] } }, - { "P010_10LE", "P010_10LE", { sizeof (uint32_t), &format_values[62] } }, - { "IYU2", "IYU2", { sizeof (uint32_t), &format_values[63] } }, + { "ENCODED", { sizeof (uint32_t), &format_values[1] } }, + { "I420", { sizeof (uint32_t), &format_values[2] } }, + { "YV12", { sizeof (uint32_t), &format_values[3] } }, + { "YUY2", { sizeof (uint32_t), &format_values[4] } }, + { "UYVY", { sizeof (uint32_t), &format_values[5] } }, + { "AYUV", { sizeof (uint32_t), &format_values[6] } }, + { "RGBx", { sizeof (uint32_t), &format_values[7] } }, + { "BGRx", { sizeof (uint32_t), &format_values[8] } }, + { "xRGB", { sizeof (uint32_t), &format_values[9] } }, + { "xBGR", { sizeof (uint32_t), &format_values[10] } }, + { "RGBA", { sizeof (uint32_t), &format_values[11] } }, + { "BGRA", { sizeof (uint32_t), &format_values[12] } }, + { "ARGB", { sizeof (uint32_t), &format_values[13] } }, + { "ABGR", { sizeof (uint32_t), &format_values[14] } }, + { "RGB", { sizeof (uint32_t), &format_values[15] } }, + { "BGR", { sizeof (uint32_t), &format_values[16] } }, + { "Y41B", { sizeof (uint32_t), &format_values[17] } }, + { "Y42B", { sizeof (uint32_t), &format_values[18] } }, + { "YVYU", { sizeof (uint32_t), &format_values[19] } }, + { "Y444", { sizeof (uint32_t), &format_values[20] } }, + { "v210", { sizeof (uint32_t), &format_values[21] } }, + { "v216", { sizeof (uint32_t), &format_values[22] } }, + { "NV12", { sizeof (uint32_t), &format_values[23] } }, + { "NV21", { sizeof (uint32_t), &format_values[24] } }, + { "GRAY8", { sizeof (uint32_t), &format_values[25] } }, + { "GRAY16_BE", { sizeof (uint32_t), &format_values[26] } }, + { "GRAY16_LE", { sizeof (uint32_t), &format_values[27] } }, + { "v308", { sizeof (uint32_t), &format_values[28] } }, + { "RGB16", { sizeof (uint32_t), &format_values[29] } }, + { "BGR16", { sizeof (uint32_t), &format_values[30] } }, + { "RGB15", { sizeof (uint32_t), &format_values[31] } }, + { "BGR15", { sizeof (uint32_t), &format_values[32] } }, + { "UYVP", { sizeof (uint32_t), &format_values[33] } }, + { "A420", { sizeof (uint32_t), &format_values[34] } }, + { "RGB8P", { sizeof (uint32_t), &format_values[35] } }, + { "YUV9", { sizeof (uint32_t), &format_values[36] } }, + { "YVU9", { sizeof (uint32_t), &format_values[37] } }, + { "IYU1", { sizeof (uint32_t), &format_values[38] } }, + { "ARGB64", { sizeof (uint32_t), &format_values[39] } }, + { "AYUV64", { sizeof (uint32_t), &format_values[40] } }, + { "r210", { sizeof (uint32_t), &format_values[41] } }, + { "I420_10BE", { sizeof (uint32_t), &format_values[42] } }, + { "I420_10LE", { sizeof (uint32_t), &format_values[43] } }, + { "I422_10BE", { sizeof (uint32_t), &format_values[44] } }, + { "I422_10LE", { sizeof (uint32_t), &format_values[45] } }, + { "I444_10BE", { sizeof (uint32_t), &format_values[46] } }, + { "I444_10LE", { sizeof (uint32_t), &format_values[47] } }, + { "GBR", { sizeof (uint32_t), &format_values[48] } }, + { "GBR_10BE", { sizeof (uint32_t), &format_values[49] } }, + { "GBR_10LE", { sizeof (uint32_t), &format_values[50] } }, + { "NV16", { sizeof (uint32_t), &format_values[51] } }, + { "NV24", { sizeof (uint32_t), &format_values[52] } }, + { "NV12_64Z32", { sizeof (uint32_t), &format_values[53] } }, + { "A420_10BE", { sizeof (uint32_t), &format_values[54] } }, + { "A420_10LE", { sizeof (uint32_t), &format_values[55] } }, + { "A422_10BE", { sizeof (uint32_t), &format_values[56] } }, + { "A422_10LE", { sizeof (uint32_t), &format_values[57] } }, + { "A444_10BE", { sizeof (uint32_t), &format_values[58] } }, + { "A444_10LE", { sizeof (uint32_t), &format_values[59] } }, + { "NV61", { sizeof (uint32_t), &format_values[60] } }, + { "P010_10BE", { sizeof (uint32_t), &format_values[61] } }, + { "P010_10LE", { sizeof (uint32_t), &format_values[62] } }, + { "IYU2", { sizeof (uint32_t), &format_values[63] } }, }; static const SpaRectangle min_size = { 1, 1 }; static const SpaRectangle max_size = { UINT32_MAX, UINT32_MAX }; static const SpaPropRangeInfo size_range[] = { - { "min", "Minimum value", { sizeof (SpaRectangle), &min_size } }, - { "max", "Maximum value", { sizeof (SpaRectangle), &max_size } }, + { "min", { sizeof (SpaRectangle), &min_size } }, + { "max", { sizeof (SpaRectangle), &max_size } }, }; static const uint32_t interlace_modes[] = { @@ -174,10 +174,10 @@ static const uint32_t interlace_modes[] = { }; static const SpaPropRangeInfo interlace_mode_range[] = { - { "progressive", "Progressive video", { sizeof (uint32_t), &interlace_modes[0] } }, - { "interleaved", "Interleaved video", { sizeof (uint32_t), &interlace_modes[1] } }, - { "mixed", "Mixed interlaced video", { sizeof (uint32_t), &interlace_modes[2] } }, - { "fields", "Fields interlaced video", { sizeof (uint32_t), &interlace_modes[3] } }, + { "progressive", { sizeof (uint32_t), &interlace_modes[0] } }, + { "interleaved", { sizeof (uint32_t), &interlace_modes[1] } }, + { "mixed", { sizeof (uint32_t), &interlace_modes[2] } }, + { "fields", { sizeof (uint32_t), &interlace_modes[3] } }, }; @@ -198,18 +198,18 @@ static const uint32_t multiview_modes[] = { }; static const SpaPropRangeInfo multiview_mode_range[] = { - { "mono", "Mono", { sizeof (uint32_t), &multiview_modes[1] } }, - { "left", "Left", { sizeof (uint32_t), &multiview_modes[2] } }, - { "right", "Right", { sizeof (uint32_t), &multiview_modes[3] } }, - { "side-by-side", "Side by side", { sizeof (uint32_t), &multiview_modes[4] } }, - { "side-by-side-quincunx", "Side by side Cuincunx", { sizeof (uint32_t), &multiview_modes[5] } }, - { "column-interleaved", "Column Interleaved", { sizeof (uint32_t), &multiview_modes[6] } }, - { "row-interleaved", "Row Interleaved", { sizeof (uint32_t), &multiview_modes[7] } }, - { "top-bottom", "Top Bottom", { sizeof (uint32_t), &multiview_modes[8] } }, - { "checkerboard", "Checkerboard", { sizeof (uint32_t), &multiview_modes[9] } }, - { "frame-by-frame", "Frame by frame", { sizeof (uint32_t), &multiview_modes[10] } }, - { "multiview-frame-by-frame", "Multiview Frame by frame", { sizeof (uint32_t), &multiview_modes[11] } }, - { "separated", "Separated", { sizeof (uint32_t), &multiview_modes[12] } }, + { "mono", { sizeof (uint32_t), &multiview_modes[1] } }, + { "left", { sizeof (uint32_t), &multiview_modes[2] } }, + { "right", { sizeof (uint32_t), &multiview_modes[3] } }, + { "side-by-side", { sizeof (uint32_t), &multiview_modes[4] } }, + { "side-by-side-quincunx", { sizeof (uint32_t), &multiview_modes[5] } }, + { "column-interleaved", { sizeof (uint32_t), &multiview_modes[6] } }, + { "row-interleaved", { sizeof (uint32_t), &multiview_modes[7] } }, + { "top-bottom", { sizeof (uint32_t), &multiview_modes[8] } }, + { "checkerboard", { sizeof (uint32_t), &multiview_modes[9] } }, + { "frame-by-frame", { sizeof (uint32_t), &multiview_modes[10] } }, + { "multiview-frame-by-frame", { sizeof (uint32_t), &multiview_modes[11] } }, + { "separated", { sizeof (uint32_t), &multiview_modes[12] } }, }; static const uint32_t multiview_flags[] = { @@ -224,14 +224,14 @@ static const uint32_t multiview_flags[] = { }; static const SpaPropRangeInfo multiview_flags_range[] = { - { "none", "None", { sizeof (uint32_t), &multiview_flags[0] } }, - { "right-view-first", "Right view first", { sizeof (uint32_t), &multiview_flags[1] } }, - { "left-flipped", "Left flipped", { sizeof (uint32_t), &multiview_flags[2] } }, - { "left-flopped", "Left flopped", { sizeof (uint32_t), &multiview_flags[3] } }, - { "right-flipped", "Right flipped", { sizeof (uint32_t), &multiview_flags[4] } }, - { "right-flopped", "Right flopped", { sizeof (uint32_t), &multiview_flags[5] } }, - { "half-aspect", "Half aspect", { sizeof (uint32_t), &multiview_flags[6] } }, - { "mixed-mono", "Mixed mono", { sizeof (uint32_t), &multiview_flags[7] } }, + { "none", { sizeof (uint32_t), &multiview_flags[0] } }, + { "right-view-first", { sizeof (uint32_t), &multiview_flags[1] } }, + { "left-flipped", { sizeof (uint32_t), &multiview_flags[2] } }, + { "left-flopped", { sizeof (uint32_t), &multiview_flags[3] } }, + { "right-flipped", { sizeof (uint32_t), &multiview_flags[4] } }, + { "right-flopped", { sizeof (uint32_t), &multiview_flags[5] } }, + { "half-aspect", { sizeof (uint32_t), &multiview_flags[6] } }, + { "mixed-mono", { sizeof (uint32_t), &multiview_flags[7] } }, }; static const uint32_t chroma_sites[] = { @@ -243,11 +243,11 @@ static const uint32_t chroma_sites[] = { }; static const SpaPropRangeInfo chroma_site_range[] = { - { "unknown", "Unknown", { sizeof (uint32_t), &chroma_sites[0] } }, - { "none", "None", { sizeof (uint32_t), &chroma_sites[1] } }, - { "h-cosited", "H-cosited", { sizeof (uint32_t), &chroma_sites[2] } }, - { "v-cosited", "V-cosited", { sizeof (uint32_t), &chroma_sites[3] } }, - { "alt-line", "Alt line", { sizeof (uint32_t), &chroma_sites[4] } } + { "unknown", { sizeof (uint32_t), &chroma_sites[0] } }, + { "none", { sizeof (uint32_t), &chroma_sites[1] } }, + { "h-cosited", { sizeof (uint32_t), &chroma_sites[2] } }, + { "v-cosited", { sizeof (uint32_t), &chroma_sites[3] } }, + { "alt-line", { sizeof (uint32_t), &chroma_sites[4] } } }; static const uint32_t color_ranges[] = { @@ -257,9 +257,9 @@ static const uint32_t color_ranges[] = { }; static const SpaPropRangeInfo color_range_range[] = { - { "unknown", "Unknown color range", { sizeof (uint32_t), &color_ranges[0] } }, - { "0_255", "0-255", { sizeof (uint32_t), &color_ranges[1] } }, - { "16_235", "16-235", { sizeof (uint32_t), &color_ranges[2] } }, + { "unknown", { sizeof (uint32_t), &color_ranges[0] } }, + { "0_255", { sizeof (uint32_t), &color_ranges[1] } }, + { "16_235", { sizeof (uint32_t), &color_ranges[2] } }, }; static const uint32_t color_matrices[] = { @@ -273,13 +273,13 @@ static const uint32_t color_matrices[] = { }; static const SpaPropRangeInfo color_matrix_range[] = { - { "unknown", "Unknown color matrix", { sizeof (uint32_t), &color_matrices[0] } }, - { "rgb", "identity matrix", { sizeof (uint32_t), &color_matrices[1] } }, - { "fcc", "FCC color matrix", { sizeof (uint32_t), &color_matrices[2] } }, - { "bt709", "ITU-R BT.709 color matrix", { sizeof (uint32_t), &color_matrices[3] } }, - { "bt601", "ITU-R BT.601 color matrix", { sizeof (uint32_t), &color_matrices[4] } }, - { "smpte240m", "SMPTE 240M color matrix", { sizeof (uint32_t), &color_matrices[5] } }, - { "bt2020", "ITU-R BT.2020 color matrix", { sizeof (uint32_t), &color_matrices[6] } }, + { "unknown", { sizeof (uint32_t), &color_matrices[0] } }, + { "rgb", { sizeof (uint32_t), &color_matrices[1] } }, + { "fcc", { sizeof (uint32_t), &color_matrices[2] } }, + { "bt709", { sizeof (uint32_t), &color_matrices[3] } }, + { "bt601", { sizeof (uint32_t), &color_matrices[4] } }, + { "smpte240m", { sizeof (uint32_t), &color_matrices[5] } }, + { "bt2020", { sizeof (uint32_t), &color_matrices[6] } }, }; static const uint32_t transfer_functions[] = { @@ -299,19 +299,19 @@ static const uint32_t transfer_functions[] = { }; static const SpaPropRangeInfo transfer_function_range[] = { - { "unknown", "Unknown transfer function", { sizeof (uint32_t), &transfer_functions[0] } }, - { "gamma10", "linear RGB, gamma 1.0 curve", { sizeof (uint32_t), &transfer_functions[1] } }, - { "gamma18", "gamma 1.8 curve", { sizeof (uint32_t), &transfer_functions[2] } }, - { "gamma20", "gamma 2.0 curve", { sizeof (uint32_t), &transfer_functions[3] } }, - { "gamma22", "gamma 2.2 curve", { sizeof (uint32_t), &transfer_functions[4] } }, - { "bt709", "Gamma 2.2 curve with a linear segment", { sizeof (uint32_t), &transfer_functions[5] } }, - { "smpte240m", "Gamma 2.2 curve with a linear segment", { sizeof (uint32_t), &transfer_functions[6] } }, - { "srgb", "Gamma 2.4 curve with a linear segment", { sizeof (uint32_t), &transfer_functions[7] } }, - { "gamma28", "Gamma 2.8 curve", { sizeof (uint32_t), &transfer_functions[8] } }, - { "log100", "Logarithmic transfer characteristic 100:1 range", { sizeof (uint32_t), &transfer_functions[9] } }, - { "log316", "Logarithmic transfer characteristic 316.22777:1 range", { sizeof (uint32_t), &transfer_functions[10] } }, - { "bt2020_12", "Gamma 2.2 curve with a linear segment", { sizeof (uint32_t), &transfer_functions[11] } }, - { "adobergb", "Gamma 2.19921875", { sizeof (uint32_t), &transfer_functions[12] } }, + { "unknown", { sizeof (uint32_t), &transfer_functions[0] } }, + { "gamma10", { sizeof (uint32_t), &transfer_functions[1] } }, + { "gamma18", { sizeof (uint32_t), &transfer_functions[2] } }, + { "gamma20", { sizeof (uint32_t), &transfer_functions[3] } }, + { "gamma22", { sizeof (uint32_t), &transfer_functions[4] } }, + { "bt709", { sizeof (uint32_t), &transfer_functions[5] } }, + { "smpte240m", { sizeof (uint32_t), &transfer_functions[6] } }, + { "srgb", { sizeof (uint32_t), &transfer_functions[7] } }, + { "gamma28", { sizeof (uint32_t), &transfer_functions[8] } }, + { "log100", { sizeof (uint32_t), &transfer_functions[9] } }, + { "log316", { sizeof (uint32_t), &transfer_functions[10] } }, + { "bt2020_12", { sizeof (uint32_t), &transfer_functions[11] } }, + { "adobergb", { sizeof (uint32_t), &transfer_functions[12] } }, }; static const uint32_t color_primaries[] = { @@ -327,121 +327,121 @@ static const uint32_t color_primaries[] = { }; static const SpaPropRangeInfo color_primaries_range[] = { - { "unknown", "Unknown color primaries", { sizeof (uint32_t), &color_primaries[0] } }, - { "bt709", "BT709 primaries", { sizeof (uint32_t), &color_primaries[1] } }, - { "bt470M", "BT470M primaries", { sizeof (uint32_t), &color_primaries[2] } }, - { "bt470BG", "BT470BG primaries", { sizeof (uint32_t), &color_primaries[3] } }, - { "smpte170m", "SMPTE170M primaries", { sizeof (uint32_t), &color_primaries[4] } }, - { "smpte240m", "SMPTE240M primaries", { sizeof (uint32_t), &color_primaries[5] } }, - { "film", "Generic film primaries", { sizeof (uint32_t), &color_primaries[6] } }, - { "bt2020", "BT2020 primaries", { sizeof (uint32_t), &color_primaries[7] } }, - { "adobergb", "Adobe RGB primaries", { sizeof (uint32_t), &color_primaries[8] } }, + { "unknown", { sizeof (uint32_t), &color_primaries[0] } }, + { "bt709", { sizeof (uint32_t), &color_primaries[1] } }, + { "bt470M", { sizeof (uint32_t), &color_primaries[2] } }, + { "bt470BG", { sizeof (uint32_t), &color_primaries[3] } }, + { "smpte170m", { sizeof (uint32_t), &color_primaries[4] } }, + { "smpte240m", { sizeof (uint32_t), &color_primaries[5] } }, + { "film", { sizeof (uint32_t), &color_primaries[6] } }, + { "bt2020", { sizeof (uint32_t), &color_primaries[7] } }, + { "adobergb", { sizeof (uint32_t), &color_primaries[8] } }, }; static const uint32_t min_uint32 = 1; static const uint32_t max_uint32 = UINT32_MAX; static const SpaPropRangeInfo uint32_range[] = { - { "min", "Minimum value", { sizeof (uint32_t), &min_uint32 } }, - { "max", "Maximum value", { sizeof (uint32_t), &max_uint32 } }, + { "min", { sizeof (uint32_t), &min_uint32 } }, + { "max", { sizeof (uint32_t), &max_uint32 } }, }; static const SpaFraction min_framerate = { 0, 1 }; static const SpaFraction max_framerate = { UINT32_MAX, 1 }; static const SpaPropRangeInfo framerate_range[] = { - { "min", "Minimum value", { sizeof (SpaFraction), &min_framerate } }, - { "max", "Maximum value", { sizeof (SpaFraction), &max_framerate } }, + { "min", { sizeof (SpaFraction), &min_framerate } }, + { "max", { sizeof (SpaFraction), &max_framerate } }, }; static const SpaPropInfo format_prop_info[] = { { SPA_PROP_ID_VIDEO_INFO, 0, - "info", "the SpaVideoInfo structure", + "info", SPA_PROP_FLAG_READWRITE | SPA_PROP_FLAG_OPTIONAL | SPA_PROP_FLAG_INFO, SPA_PROP_TYPE_POINTER, sizeof (SpaVideoInfoRaw), SPA_PROP_RANGE_TYPE_NONE, 0, NULL, NULL }, { SPA_PROP_ID_VIDEO_FORMAT, 0, - "format", "The media format", + "format", SPA_PROP_FLAG_READWRITE, SPA_PROP_TYPE_UINT32, sizeof (uint32_t), SPA_PROP_RANGE_TYPE_ENUM, SPA_N_ELEMENTS (format_range), format_range, NULL }, { SPA_PROP_ID_VIDEO_SIZE, 0, - "size", "Video size", + "size", SPA_PROP_FLAG_READWRITE, SPA_PROP_TYPE_RECTANGLE, sizeof (SpaRectangle), SPA_PROP_RANGE_TYPE_MIN_MAX, 2, size_range, NULL }, { SPA_PROP_ID_VIDEO_FRAMERATE, 0, - "framerate", "Video framerate", + "framerate", SPA_PROP_FLAG_READWRITE, SPA_PROP_TYPE_FRACTION, sizeof (SpaFraction), SPA_PROP_RANGE_TYPE_MIN_MAX, 2, framerate_range, NULL }, { SPA_PROP_ID_VIDEO_MAX_FRAMERATE, 0, - "max-framerate", "Video max framerate", + "max-framerate", SPA_PROP_FLAG_READWRITE | SPA_PROP_FLAG_OPTIONAL, SPA_PROP_TYPE_FRACTION, sizeof (SpaFraction), SPA_PROP_RANGE_TYPE_MIN_MAX, 2, framerate_range, NULL }, { SPA_PROP_ID_VIDEO_VIEWS, 0, - "views", "Video number of views", + "views", SPA_PROP_FLAG_READWRITE | SPA_PROP_FLAG_OPTIONAL, SPA_PROP_TYPE_UINT32, sizeof (uint32_t), SPA_PROP_RANGE_TYPE_MIN_MAX, 2, uint32_range, NULL }, { SPA_PROP_ID_VIDEO_INTERLACE_MODE, 0, - "interlace-mode", "Interlace mode", + "interlace-mode", SPA_PROP_FLAG_READWRITE | SPA_PROP_FLAG_OPTIONAL, SPA_PROP_TYPE_UINT32, sizeof (uint32_t), SPA_PROP_RANGE_TYPE_ENUM, SPA_N_ELEMENTS (interlace_mode_range), interlace_mode_range, NULL }, { SPA_PROP_ID_VIDEO_PIXEL_ASPECT_RATIO, 0, - "pixel-aspect-ratio", "Video pixel aspect ratio", + "pixel-aspect-ratio", SPA_PROP_FLAG_READWRITE | SPA_PROP_FLAG_OPTIONAL, SPA_PROP_TYPE_FRACTION, sizeof (SpaFraction), SPA_PROP_RANGE_TYPE_MIN_MAX, 2, framerate_range, NULL }, { SPA_PROP_ID_VIDEO_MULTIVIEW_MODE, 0, - "multiview-mode", "Multiview mode", + "multiview-mode", SPA_PROP_FLAG_READWRITE | SPA_PROP_FLAG_OPTIONAL, SPA_PROP_TYPE_UINT32, sizeof (uint32_t), SPA_PROP_RANGE_TYPE_ENUM, SPA_N_ELEMENTS (multiview_mode_range), multiview_mode_range, NULL }, { SPA_PROP_ID_VIDEO_MULTIVIEW_FLAGS, 0, - "multiview-flags", "Multiview flags", + "multiview-flags", SPA_PROP_FLAG_READWRITE | SPA_PROP_FLAG_OPTIONAL, SPA_PROP_TYPE_UINT32, sizeof (uint32_t), SPA_PROP_RANGE_TYPE_FLAGS, SPA_N_ELEMENTS (multiview_flags_range), multiview_flags_range, NULL }, { SPA_PROP_ID_VIDEO_CHROMA_SITE, 0, - "chroma-site", "Chroma site", + "chroma-site", SPA_PROP_FLAG_READWRITE | SPA_PROP_FLAG_OPTIONAL, SPA_PROP_TYPE_UINT32, sizeof (uint32_t), SPA_PROP_RANGE_TYPE_FLAGS, SPA_N_ELEMENTS (chroma_site_range), chroma_site_range, NULL }, { SPA_PROP_ID_VIDEO_COLOR_RANGE, 0, - "color-range", "Color range", + "color-range", SPA_PROP_FLAG_READWRITE | SPA_PROP_FLAG_OPTIONAL, SPA_PROP_TYPE_UINT32, sizeof (uint32_t), SPA_PROP_RANGE_TYPE_ENUM, SPA_N_ELEMENTS (color_range_range), color_range_range, NULL }, { SPA_PROP_ID_VIDEO_COLOR_MATRIX, 0, - "color-matrix", "Color matrix", + "color-matrix", SPA_PROP_FLAG_READWRITE | SPA_PROP_FLAG_OPTIONAL, SPA_PROP_TYPE_UINT32, sizeof (uint32_t), SPA_PROP_RANGE_TYPE_ENUM, SPA_N_ELEMENTS (color_matrix_range), color_matrix_range, NULL }, { SPA_PROP_ID_VIDEO_TRANSFER_FUNCTION, 0, - "transfer-function", "Transfer function", + "transfer-function", SPA_PROP_FLAG_READWRITE | SPA_PROP_FLAG_OPTIONAL, SPA_PROP_TYPE_UINT32, sizeof (uint32_t), SPA_PROP_RANGE_TYPE_ENUM, SPA_N_ELEMENTS (transfer_function_range), transfer_function_range, NULL }, { SPA_PROP_ID_VIDEO_COLOR_PRIMARIES, 0, - "color-primaries", "Color primaries", + "color-primaries", SPA_PROP_FLAG_READWRITE | SPA_PROP_FLAG_OPTIONAL, SPA_PROP_TYPE_UINT32, sizeof (uint32_t), SPA_PROP_RANGE_TYPE_ENUM, SPA_N_ELEMENTS (color_primaries_range), color_primaries_range, diff --git a/spa/plugins/alsa/alsa-sink.c b/spa/plugins/alsa/alsa-sink.c index c8fd06c64..9daf3585c 100644 --- a/spa/plugins/alsa/alsa-sink.c +++ b/spa/plugins/alsa/alsa-sink.c @@ -54,8 +54,8 @@ static const uint32_t min_uint32 = 1; static const uint32_t max_uint32 = UINT32_MAX; static const SpaPropRangeInfo uint32_range[] = { - { "min", "Minimum value", { 4, &min_uint32 } }, - { "max", "Maximum value", { 4, &max_uint32 } }, + { "min", { 4, &min_uint32 } }, + { "max", { 4, &max_uint32 } }, }; enum { @@ -71,37 +71,37 @@ enum { static const SpaPropInfo prop_info[] = { { PROP_ID_DEVICE, offsetof (SpaALSAProps, device), - "device", "ALSA device, as defined in an asound configuration file", + "device", SPA_PROP_FLAG_READWRITE, SPA_PROP_TYPE_STRING, 63, SPA_PROP_RANGE_TYPE_NONE, 0, NULL, NULL }, { PROP_ID_DEVICE_NAME, offsetof (SpaALSAProps, device_name), - "device-name", "Human-readable name of the sound device", + "device-name", SPA_PROP_FLAG_READABLE, SPA_PROP_TYPE_STRING, 127, SPA_PROP_RANGE_TYPE_NONE, 0, NULL, NULL }, { PROP_ID_CARD_NAME, offsetof (SpaALSAProps, card_name), - "card-name", "Human-readable name of the sound card", + "card-name", SPA_PROP_FLAG_READABLE, SPA_PROP_TYPE_STRING, 127, SPA_PROP_RANGE_TYPE_NONE, 0, NULL, NULL }, { PROP_ID_BUFFER_TIME, offsetof (SpaALSAProps, buffer_time), - "buffer-time", "The total size of the buffer in time", + "buffer-time", SPA_PROP_FLAG_READWRITE, SPA_PROP_TYPE_UINT32, sizeof (uint32_t), SPA_PROP_RANGE_TYPE_MIN_MAX, 2, uint32_range, NULL }, { PROP_ID_PERIOD_TIME, offsetof (SpaALSAProps, period_time), - "period-time", "The size of a period in time", + "period-time", SPA_PROP_FLAG_READWRITE, SPA_PROP_TYPE_UINT32, sizeof (uint32_t), SPA_PROP_RANGE_TYPE_MIN_MAX, 2, uint32_range, NULL }, { PROP_ID_PERIOD_EVENT, offsetof (SpaALSAProps, period_event), - "period-event", "Generate an event each period", + "period-event", SPA_PROP_FLAG_READWRITE, SPA_PROP_TYPE_BOOL, sizeof (bool), SPA_PROP_RANGE_TYPE_NONE, 0, NULL, diff --git a/spa/plugins/alsa/alsa-source.c b/spa/plugins/alsa/alsa-source.c index 06e012504..418aada09 100644 --- a/spa/plugins/alsa/alsa-source.c +++ b/spa/plugins/alsa/alsa-source.c @@ -56,8 +56,8 @@ static const uint32_t min_uint32 = 1; static const uint32_t max_uint32 = UINT32_MAX; static const SpaPropRangeInfo uint32_range[] = { - { "min", "Minimum value", { 4, &min_uint32 } }, - { "max", "Maximum value", { 4, &max_uint32 } }, + { "min", { 4, &min_uint32 } }, + { "max", { 4, &max_uint32 } }, }; enum { @@ -73,37 +73,37 @@ enum { static const SpaPropInfo prop_info[] = { { PROP_ID_DEVICE, offsetof (SpaALSAProps, device), - "device", "ALSA device, as defined in an asound configuration file", + "device", SPA_PROP_FLAG_READWRITE, SPA_PROP_TYPE_STRING, 63, SPA_PROP_RANGE_TYPE_NONE, 0, NULL, NULL }, { PROP_ID_DEVICE_NAME, offsetof (SpaALSAProps, device_name), - "device-name", "Human-readable name of the sound device", + "device-name", SPA_PROP_FLAG_READABLE, SPA_PROP_TYPE_STRING, 127, SPA_PROP_RANGE_TYPE_NONE, 0, NULL, NULL }, { PROP_ID_CARD_NAME, offsetof (SpaALSAProps, card_name), - "card-name", "Human-readable name of the sound card", + "card-name", SPA_PROP_FLAG_READABLE, SPA_PROP_TYPE_STRING, 127, SPA_PROP_RANGE_TYPE_NONE, 0, NULL, NULL }, { PROP_ID_BUFFER_TIME, offsetof (SpaALSAProps, buffer_time), - "buffer-time", "The total size of the buffer in time", + "buffer-time", SPA_PROP_FLAG_READWRITE, SPA_PROP_TYPE_UINT32, sizeof (uint32_t), SPA_PROP_RANGE_TYPE_MIN_MAX, 2, uint32_range, NULL }, { PROP_ID_PERIOD_TIME, offsetof (SpaALSAProps, period_time), - "period-time", "The size of a period in time", + "period-time", SPA_PROP_FLAG_READWRITE, SPA_PROP_TYPE_UINT32, sizeof (uint32_t), SPA_PROP_RANGE_TYPE_MIN_MAX, 2, uint32_range, NULL }, { PROP_ID_PERIOD_EVENT, offsetof (SpaALSAProps, period_event), - "period-event", "Generate an event each period", + "period-event", SPA_PROP_FLAG_READWRITE, SPA_PROP_TYPE_BOOL, sizeof (bool), SPA_PROP_RANGE_TYPE_NONE, 0, NULL, diff --git a/spa/plugins/audiotestsrc/audiotestsrc.c b/spa/plugins/audiotestsrc/audiotestsrc.c index 2ead498c1..d43fa9ee3 100644 --- a/spa/plugins/audiotestsrc/audiotestsrc.c +++ b/spa/plugins/audiotestsrc/audiotestsrc.c @@ -117,21 +117,21 @@ static const double min_freq = 0.0; static const double max_freq = 50000000.0; static const SpaPropRangeInfo volume_range[] = { - { "min", "Minimum value", { sizeof (double), &min_volume } }, - { "max", "Maximum value", { sizeof (double), &max_volume } }, + { "min", { sizeof (double), &min_volume } }, + { "max", { sizeof (double), &max_volume } }, }; static const uint32_t wave_val_sine = 0; static const uint32_t wave_val_square = 1; static const SpaPropRangeInfo wave_range[] = { - { "sine", "Sine", { sizeof (uint32_t), &wave_val_sine } }, - { "square", "Square", { sizeof (uint32_t), &wave_val_square } }, + { "sine", { sizeof (uint32_t), &wave_val_sine } }, + { "square", { sizeof (uint32_t), &wave_val_square } }, }; static const SpaPropRangeInfo freq_range[] = { - { "min", "Minimum value", { sizeof (double), &min_freq } }, - { "max", "Maximum value", { sizeof (double), &max_freq } }, + { "min", { sizeof (double), &min_freq } }, + { "max", { sizeof (double), &max_freq } }, }; enum { @@ -145,25 +145,25 @@ enum { static const SpaPropInfo prop_info[] = { { PROP_ID_WAVE, offsetof (SpaAudioTestSrcProps, wave), - "wave", "Oscillator waveform", + "wave", SPA_PROP_FLAG_READWRITE, SPA_PROP_TYPE_UINT32, sizeof (uint32_t), SPA_PROP_RANGE_TYPE_ENUM, SPA_N_ELEMENTS (wave_range), wave_range, NULL }, { PROP_ID_FREQ, offsetof (SpaAudioTestSrcProps, freq), - "freq", "Frequency of test signal. The sample rate needs to be at least 4 times higher", + "freq", SPA_PROP_FLAG_READWRITE, SPA_PROP_TYPE_DOUBLE, sizeof (double), SPA_PROP_RANGE_TYPE_MIN_MAX, 2, freq_range, NULL }, { PROP_ID_VOLUME, offsetof (SpaAudioTestSrcProps, volume), - "volume", "The Volume factor", + "volume", SPA_PROP_FLAG_READWRITE, SPA_PROP_TYPE_DOUBLE, sizeof (double), SPA_PROP_RANGE_TYPE_MIN_MAX, 2, volume_range, NULL }, { PROP_ID_LIVE, offsetof (SpaAudioTestSrcProps, live), - "live", "Timestamp against the clock", + "live", SPA_PROP_FLAG_READWRITE, SPA_PROP_TYPE_BOOL, sizeof (bool), SPA_PROP_RANGE_TYPE_NONE, 0, NULL, diff --git a/spa/plugins/remote/proxy.c b/spa/plugins/remote/proxy.c index a536e3e6d..667ad408d 100644 --- a/spa/plugins/remote/proxy.c +++ b/spa/plugins/remote/proxy.c @@ -128,7 +128,7 @@ enum { static const SpaPropInfo prop_info[PROP_ID_LAST] = { { PROP_ID_SOCKET, offsetof (SpaProxyProps, socketfd), - "socket", "The Socket factor", + "socket", SPA_PROP_FLAG_READWRITE, SPA_PROP_TYPE_INT, sizeof (int), SPA_PROP_RANGE_TYPE_NONE, 0, NULL, diff --git a/spa/plugins/v4l2/v4l2-source.c b/spa/plugins/v4l2/v4l2-source.c index 9eef2646e..155ccd0e8 100644 --- a/spa/plugins/v4l2/v4l2-source.c +++ b/spa/plugins/v4l2/v4l2-source.c @@ -161,19 +161,19 @@ enum { static const SpaPropInfo prop_info[] = { { PROP_ID_DEVICE, offsetof (SpaV4l2SourceProps, device), - "device", "V4l2 device location", + "device", SPA_PROP_FLAG_READWRITE, SPA_PROP_TYPE_STRING, 63, SPA_PROP_RANGE_TYPE_NONE, 0, NULL, NULL }, { PROP_ID_DEVICE_NAME, offsetof (SpaV4l2SourceProps, device_name), - "device-name", "Human-readable name of the device", + "device-name", SPA_PROP_FLAG_READABLE, SPA_PROP_TYPE_STRING, 127, SPA_PROP_RANGE_TYPE_NONE, 0, NULL, NULL }, { PROP_ID_DEVICE_FD, offsetof (SpaV4l2SourceProps, device_fd), - "device-fd", "Device file descriptor", + "device-fd", SPA_PROP_FLAG_READABLE, SPA_PROP_TYPE_UINT32, sizeof (uint32_t), SPA_PROP_RANGE_TYPE_NONE, 0, NULL, diff --git a/spa/plugins/v4l2/v4l2-utils.c b/spa/plugins/v4l2/v4l2-utils.c index 35796fb28..c9d251a81 100644 --- a/spa/plugins/v4l2/v4l2-utils.c +++ b/spa/plugins/v4l2/v4l2-utils.c @@ -683,7 +683,6 @@ have_size: have_framerate: fmt->ranges[i].name = NULL; - fmt->ranges[i].description = NULL; if (state->frmival.type == V4L2_FRMIVAL_TYPE_DISCRETE) { fmt->infos[pi].range_type = SPA_PROP_RANGE_TYPE_ENUM; fmt->framerates[i].num = state->frmival.discrete.denominator; diff --git a/spa/plugins/videotestsrc/videotestsrc.c b/spa/plugins/videotestsrc/videotestsrc.c index eb02cb40d..4583568f1 100644 --- a/spa/plugins/videotestsrc/videotestsrc.c +++ b/spa/plugins/videotestsrc/videotestsrc.c @@ -119,7 +119,7 @@ enum { static const SpaPropInfo prop_info[] = { { PROP_ID_LIVE, offsetof (SpaVideoTestSrcProps, live), - "live", "Timestamp against the clock", + "live", SPA_PROP_FLAG_READWRITE, SPA_PROP_TYPE_BOOL, sizeof (bool), SPA_PROP_RANGE_TYPE_NONE, 0, NULL, diff --git a/spa/plugins/volume/volume.c b/spa/plugins/volume/volume.c index 6ffc29d00..d94cd730a 100644 --- a/spa/plugins/volume/volume.c +++ b/spa/plugins/volume/volume.c @@ -77,8 +77,8 @@ static const double max_volume = 10.0; static const bool default_mute = false; static const SpaPropRangeInfo volume_range[] = { - { "min", "Minimum value", { sizeof (double), &min_volume } }, - { "max", "Maximum value", { sizeof (double), &max_volume } }, + { "min", { sizeof (double), &min_volume } }, + { "max", { sizeof (double), &max_volume } }, }; enum { @@ -90,13 +90,13 @@ enum { static const SpaPropInfo prop_info[] = { { PROP_ID_VOLUME, offsetof (SpaVolumeProps, volume), - "volume", "The Volume factor", + "volume", SPA_PROP_FLAG_READWRITE, SPA_PROP_TYPE_DOUBLE, sizeof (double), SPA_PROP_RANGE_TYPE_MIN_MAX, 2, volume_range, NULL }, { PROP_ID_MUTE, offsetof (SpaVolumeProps, mute), - "mute", "Mute", + "mute", SPA_PROP_FLAG_READWRITE, SPA_PROP_TYPE_BOOL, sizeof (bool), SPA_PROP_RANGE_TYPE_NONE, 0, NULL, diff --git a/spa/plugins/xv/xv-sink.c b/spa/plugins/xv/xv-sink.c index 73180c88a..c4565d092 100644 --- a/spa/plugins/xv/xv-sink.c +++ b/spa/plugins/xv/xv-sink.c @@ -110,19 +110,19 @@ enum { static const SpaPropInfo prop_info[] = { { PROP_ID_DEVICE, offsetof (SpaXvSinkProps, device), - "device", "Xv device location", + "device", SPA_PROP_FLAG_READWRITE, SPA_PROP_TYPE_STRING, 63, SPA_PROP_RANGE_TYPE_NONE, 0, NULL, NULL }, { PROP_ID_DEVICE_NAME, offsetof (SpaXvSinkProps, device_name), - "device-name", "Human-readable name of the device", + "device-name", SPA_PROP_FLAG_READABLE, SPA_PROP_TYPE_STRING, 127, SPA_PROP_RANGE_TYPE_NONE, 0, NULL, NULL }, { PROP_ID_DEVICE_FD, offsetof (SpaXvSinkProps, device_fd), - "device-fd", "Device file descriptor", + "device-fd", SPA_PROP_FLAG_READABLE, SPA_PROP_TYPE_UINT32, sizeof (uint32_t), SPA_PROP_RANGE_TYPE_NONE, 0, NULL,