unified picture_t with api

This commit is contained in:
Devaev Maxim
2019-09-13 02:15:34 +03:00
parent 1d1c7c705d
commit 433e884fad
14 changed files with 242 additions and 169 deletions

View File

@@ -200,7 +200,7 @@ int encoder_compress_buffer(struct encoder_t *encoder, struct device_t *dev, uns
assert(encoder->run->type != ENCODER_TYPE_UNKNOWN);
dev->run->pictures[buf_index].encode_begin_time = get_now_monotonic();
dev->run->pictures[buf_index]->encode_begin_time = get_now_monotonic();
if (encoder->run->type == ENCODER_TYPE_CPU) {
cpu_encoder_compress_buffer(dev, buf_index, encoder->run->quality);
@@ -215,10 +215,10 @@ int encoder_compress_buffer(struct encoder_t *encoder, struct device_t *dev, uns
}
# endif
dev->run->pictures[buf_index].encode_end_time = get_now_monotonic();
dev->run->pictures[buf_index]->encode_end_time = get_now_monotonic();
dev->run->pictures[buf_index].width = dev->run->width;
dev->run->pictures[buf_index].height = dev->run->height;
dev->run->pictures[buf_index]->width = dev->run->width;
dev->run->pictures[buf_index]->height = dev->run->height;
return 0;