rework props with pod

This commit is contained in:
Wim Taymans 2017-02-27 21:25:33 +01:00
parent f02f93cda9
commit dbae2e3f96
25 changed files with 232 additions and 472 deletions

View file

@ -86,9 +86,10 @@ static const struct _test_format {
} framerate_vals;
} props;
} test_format = {
{ { sizeof (test_format.props) + sizeof (SpaFormatBody), SPA_POD_TYPE_FORMAT },
{ SPA_MEDIA_TYPE_VIDEO,
SPA_MEDIA_SUBTYPE_RAW },
{ { { sizeof (test_format.props) + sizeof (SpaFormatBody) + sizeof (SpaPODObjectBody), SPA_POD_TYPE_OBJECT },
{ 0, 0 } },
{ { { sizeof (uint32_t), SPA_POD_TYPE_INT }, SPA_MEDIA_TYPE_VIDEO },
{ { sizeof (uint32_t), SPA_POD_TYPE_INT }, SPA_MEDIA_SUBTYPE_RAW } },
}, {
{ { sizeof (test_format.props.format_vals) + sizeof (SpaPODPropBody),
SPA_POD_TYPE_PROP } ,
@ -156,7 +157,7 @@ main (int argc, char *argv[])
spa_pod_builder_pop (&b, &frame[0]);
spa_debug_pod (&fmt->pod);
spa_debug_pod (&fmt->obj.pod);
memset (&b, 0, sizeof(b));
b.data = buffer;
@ -183,10 +184,10 @@ main (int argc, char *argv[])
0);
fmt = SPA_MEMBER (buffer, o, SpaFormat);
spa_debug_pod (&fmt->pod);
spa_debug_pod (&fmt->obj.pod);
spa_debug_format (fmt);
spa_debug_pod (&test_format.fmt.pod);
spa_debug_pod (&test_format.fmt.obj.pod);
spa_debug_format (&test_format.fmt);
return 0;