Format: implement intersection and fixate

This commit is contained in:
Wim Taymans 2017-02-28 15:09:34 +01:00
parent 9dd826136d
commit 7a7ede96e5
11 changed files with 205 additions and 195 deletions

View file

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