First pass at integrating pipeline with application

This commit is contained in:
Benjamin Schaaf
2020-11-26 00:34:57 +11:00
parent e26d0ddd4b
commit dd45690d47
11 changed files with 2035 additions and 1443 deletions

View File

@@ -16,7 +16,7 @@ double get_time()
void on_capture(MPImage image, void *user_data)
{
size_t num_bytes = mp_pixel_format_bytes_per_pixel(image.pixel_format) * image.width * image.height;
size_t num_bytes = mp_pixel_format_width_to_bytes(image.pixel_format, image.width) * image.height;
uint8_t *data = malloc(num_bytes);
memcpy(data, image.data, num_bytes);