spa: Add buffer meta information VideoTransform

This metadata can be used to signal that a buffer is transformed.
The values are intentionally choosen to coincide with
wl_output::transform from the wayland windowsystem.
This commit is contained in:
columbarius 2022-10-23 21:32:34 +02:00 committed by Wim Taymans
parent f038e3f238
commit 01b2552b71
2 changed files with 32 additions and 10 deletions

View file

@ -47,7 +47,8 @@ PWTEST(buffer_abi_types)
pwtest_int_eq(SPA_META_Cursor, 5);
pwtest_int_eq(SPA_META_Control, 6);
pwtest_int_eq(SPA_META_Busy, 7);
pwtest_int_eq(_SPA_META_LAST, 8);
pwtest_int_eq(SPA_META_VideoTransform, 8);
pwtest_int_eq(_SPA_META_LAST, 9);
return PWTEST_PASS;
}
@ -64,6 +65,7 @@ PWTEST(buffer_abi_sizes)
pwtest_int_eq(sizeof(struct spa_meta_region), 16U);
pwtest_int_eq(sizeof(struct spa_meta_bitmap), 20U);
pwtest_int_eq(sizeof(struct spa_meta_cursor), 28U);
pwtest_int_eq(sizeof(struct spa_meta_videotransform), 4U);
return PWTEST_PASS;
#else
@ -75,6 +77,7 @@ PWTEST(buffer_abi_sizes)
fprintf(stderr, "%zd\n", sizeof(struct spa_meta_region));
fprintf(stderr, "%zd\n", sizeof(struct spa_meta_bitmap));
fprintf(stderr, "%zd\n", sizeof(struct spa_meta_cursor));
fprintf(stderr, "%zd\n", sizeof(struct spa_meta_videotransform));
return PWTEST_SKIP;
#endif
}