Lines Matching refs:src

177         const camera_metadata_t *src,  in allocate_copy_camera_metadata_checked()  argument
180 if (src == NULL) { in allocate_copy_camera_metadata_checked()
185 memcpy(buffer, src, src_size); in allocate_copy_camera_metadata_checked()
280 const camera_metadata_t *src) { in copy_camera_metadata() argument
281 size_t memory_needed = get_camera_metadata_compact_size(src); in copy_camera_metadata()
287 place_camera_metadata(dst, dst_size, src->entry_count, src->data_count); in copy_camera_metadata()
289 metadata->flags = src->flags; in copy_camera_metadata()
290 metadata->entry_count = src->entry_count; in copy_camera_metadata()
291 metadata->data_count = src->data_count; in copy_camera_metadata()
293 memcpy(get_entries(metadata), get_entries(src), in copy_camera_metadata()
295 memcpy(get_data(metadata), get_data(src), in copy_camera_metadata()
459 const camera_metadata_t *src) { in append_camera_metadata() argument
460 if (dst == NULL || src == NULL ) return ERROR; in append_camera_metadata()
462 if (dst->entry_capacity < src->entry_count + dst->entry_count) return ERROR; in append_camera_metadata()
463 if (dst->data_capacity < src->data_count + dst->data_count) return ERROR; in append_camera_metadata()
465 memcpy(get_entries(dst) + dst->entry_count, get_entries(src), in append_camera_metadata()
466 sizeof(camera_metadata_buffer_entry_t[src->entry_count])); in append_camera_metadata()
467 memcpy(get_data(dst) + dst->data_count, get_data(src), in append_camera_metadata()
468 sizeof(uint8_t[src->data_count])); in append_camera_metadata()
471 for (size_t i = 0; i < src->entry_count; i++, entry++) { in append_camera_metadata()
480 dst->flags |= src->flags & FLAG_SORTED; in append_camera_metadata()
481 } else if (src->entry_count != 0) { in append_camera_metadata()
487 dst->entry_count += src->entry_count; in append_camera_metadata()
488 dst->data_count += src->data_count; in append_camera_metadata()
494 camera_metadata_t *clone_camera_metadata(const camera_metadata_t *src) { in clone_camera_metadata() argument
496 if (src == NULL) return NULL; in clone_camera_metadata()
498 get_camera_metadata_entry_count(src), in clone_camera_metadata()
499 get_camera_metadata_data_count(src)); in clone_camera_metadata()
501 res = append_camera_metadata(clone, src); in clone_camera_metadata()
595 int get_camera_metadata_entry(camera_metadata_t *src, in get_camera_metadata_entry() argument
598 if (src == NULL || entry == NULL) return ERROR; in get_camera_metadata_entry()
599 if (index >= src->entry_count) return ERROR; in get_camera_metadata_entry()
601 camera_metadata_buffer_entry_t *buffer_entry = get_entries(src) + index; in get_camera_metadata_entry()
609 entry->data.u8 = get_data(src) + buffer_entry->data.offset; in get_camera_metadata_entry()
616 int get_camera_metadata_ro_entry(const camera_metadata_t *src, in get_camera_metadata_ro_entry() argument
619 return get_camera_metadata_entry((camera_metadata_t*)src, index, in get_camera_metadata_ro_entry()
623 int find_camera_metadata_entry(camera_metadata_t *src, in find_camera_metadata_entry() argument
626 if (src == NULL) return ERROR; in find_camera_metadata_entry()
629 if (src->flags & FLAG_SORTED) { in find_camera_metadata_entry()
635 get_entries(src), in find_camera_metadata_entry()
636 src->entry_count, in find_camera_metadata_entry()
640 index = search_entry - get_entries(src); in find_camera_metadata_entry()
643 camera_metadata_buffer_entry_t *search_entry = get_entries(src); in find_camera_metadata_entry()
644 for (index = 0; index < src->entry_count; index++, search_entry++) { in find_camera_metadata_entry()
649 if (index == src->entry_count) return NOT_FOUND; in find_camera_metadata_entry()
652 return get_camera_metadata_entry(src, index, in find_camera_metadata_entry()
656 int find_camera_metadata_ro_entry(const camera_metadata_t *src, in find_camera_metadata_ro_entry() argument
659 return find_camera_metadata_entry((camera_metadata_t*)src, tag, in find_camera_metadata_ro_entry()