Remove description

Documentation should go somewhere else
This commit is contained in:
Wim Taymans 2016-10-13 19:25:49 +02:00
parent 672e5d8fa6
commit 523868d6bd
15 changed files with 228 additions and 259 deletions

View file

@ -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,

View file

@ -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) {

View file

@ -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);
}

View file

@ -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,