1b8bc0d8aSopenharmony_ci/* exif-content.c 2b8bc0d8aSopenharmony_ci * 3b8bc0d8aSopenharmony_ci * Copyright (c) 2001 Lutz Mueller <lutz@users.sourceforge.net> 4b8bc0d8aSopenharmony_ci * 5b8bc0d8aSopenharmony_ci * This library is free software; you can redistribute it and/or 6b8bc0d8aSopenharmony_ci * modify it under the terms of the GNU Lesser General Public 7b8bc0d8aSopenharmony_ci * License as published by the Free Software Foundation; either 8b8bc0d8aSopenharmony_ci * version 2 of the License, or (at your option) any later version. 9b8bc0d8aSopenharmony_ci * 10b8bc0d8aSopenharmony_ci * This library is distributed in the hope that it will be useful, 11b8bc0d8aSopenharmony_ci * but WITHOUT ANY WARRANTY; without even the implied warranty of 12b8bc0d8aSopenharmony_ci * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13b8bc0d8aSopenharmony_ci * Lesser General Public License for more details. 14b8bc0d8aSopenharmony_ci * 15b8bc0d8aSopenharmony_ci * You should have received a copy of the GNU Lesser General Public 16b8bc0d8aSopenharmony_ci * License along with this library; if not, write to the 17b8bc0d8aSopenharmony_ci * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 18b8bc0d8aSopenharmony_ci * Boston, MA 02110-1301 USA. 19b8bc0d8aSopenharmony_ci */ 20b8bc0d8aSopenharmony_ci 21b8bc0d8aSopenharmony_ci#include <config.h> 22b8bc0d8aSopenharmony_ci 23b8bc0d8aSopenharmony_ci#include <libexif/exif-content.h> 24b8bc0d8aSopenharmony_ci#include <libexif/exif-system.h> 25b8bc0d8aSopenharmony_ci 26b8bc0d8aSopenharmony_ci#include <stdlib.h> 27b8bc0d8aSopenharmony_ci#include <stdio.h> 28b8bc0d8aSopenharmony_ci#include <string.h> 29b8bc0d8aSopenharmony_ci 30b8bc0d8aSopenharmony_ci/* unused constant 31b8bc0d8aSopenharmony_ci * static const unsigned char ExifHeader[] = {0x45, 0x78, 0x69, 0x66, 0x00, 0x00}; 32b8bc0d8aSopenharmony_ci */ 33b8bc0d8aSopenharmony_ci 34b8bc0d8aSopenharmony_cistruct _ExifContentPrivate 35b8bc0d8aSopenharmony_ci{ 36b8bc0d8aSopenharmony_ci unsigned int ref_count; 37b8bc0d8aSopenharmony_ci 38b8bc0d8aSopenharmony_ci ExifMem *mem; 39b8bc0d8aSopenharmony_ci ExifLog *log; 40b8bc0d8aSopenharmony_ci}; 41b8bc0d8aSopenharmony_ci 42b8bc0d8aSopenharmony_ciExifContent * 43b8bc0d8aSopenharmony_ciexif_content_new (void) 44b8bc0d8aSopenharmony_ci{ 45b8bc0d8aSopenharmony_ci ExifMem *mem = exif_mem_new_default (); 46b8bc0d8aSopenharmony_ci ExifContent *content = exif_content_new_mem (mem); 47b8bc0d8aSopenharmony_ci 48b8bc0d8aSopenharmony_ci exif_mem_unref (mem); 49b8bc0d8aSopenharmony_ci 50b8bc0d8aSopenharmony_ci return content; 51b8bc0d8aSopenharmony_ci} 52b8bc0d8aSopenharmony_ci 53b8bc0d8aSopenharmony_ciExifContent * 54b8bc0d8aSopenharmony_ciexif_content_new_mem (ExifMem *mem) 55b8bc0d8aSopenharmony_ci{ 56b8bc0d8aSopenharmony_ci ExifContent *content; 57b8bc0d8aSopenharmony_ci 58b8bc0d8aSopenharmony_ci if (!mem) return NULL; 59b8bc0d8aSopenharmony_ci 60b8bc0d8aSopenharmony_ci content = exif_mem_alloc (mem, (ExifLong) sizeof (ExifContent)); 61b8bc0d8aSopenharmony_ci if (!content) 62b8bc0d8aSopenharmony_ci return NULL; 63b8bc0d8aSopenharmony_ci content->priv = exif_mem_alloc (mem, 64b8bc0d8aSopenharmony_ci (ExifLong) sizeof (ExifContentPrivate)); 65b8bc0d8aSopenharmony_ci if (!content->priv) { 66b8bc0d8aSopenharmony_ci exif_mem_free (mem, content); 67b8bc0d8aSopenharmony_ci return NULL; 68b8bc0d8aSopenharmony_ci } 69b8bc0d8aSopenharmony_ci 70b8bc0d8aSopenharmony_ci content->priv->ref_count = 1; 71b8bc0d8aSopenharmony_ci 72b8bc0d8aSopenharmony_ci content->priv->mem = mem; 73b8bc0d8aSopenharmony_ci exif_mem_ref (mem); 74b8bc0d8aSopenharmony_ci 75b8bc0d8aSopenharmony_ci return content; 76b8bc0d8aSopenharmony_ci} 77b8bc0d8aSopenharmony_ci 78b8bc0d8aSopenharmony_civoid 79b8bc0d8aSopenharmony_ciexif_content_ref (ExifContent *content) 80b8bc0d8aSopenharmony_ci{ 81b8bc0d8aSopenharmony_ci if (!content) 82b8bc0d8aSopenharmony_ci return; 83b8bc0d8aSopenharmony_ci 84b8bc0d8aSopenharmony_ci content->priv->ref_count++; 85b8bc0d8aSopenharmony_ci} 86b8bc0d8aSopenharmony_ci 87b8bc0d8aSopenharmony_civoid 88b8bc0d8aSopenharmony_ciexif_content_unref (ExifContent *content) 89b8bc0d8aSopenharmony_ci{ 90b8bc0d8aSopenharmony_ci if (!content) 91b8bc0d8aSopenharmony_ci return; 92b8bc0d8aSopenharmony_ci 93b8bc0d8aSopenharmony_ci content->priv->ref_count--; 94b8bc0d8aSopenharmony_ci if (!content->priv->ref_count) 95b8bc0d8aSopenharmony_ci exif_content_free (content); 96b8bc0d8aSopenharmony_ci} 97b8bc0d8aSopenharmony_ci 98b8bc0d8aSopenharmony_civoid 99b8bc0d8aSopenharmony_ciexif_content_free (ExifContent *content) 100b8bc0d8aSopenharmony_ci{ 101b8bc0d8aSopenharmony_ci ExifMem *mem = (content && content->priv) ? content->priv->mem : NULL; 102b8bc0d8aSopenharmony_ci unsigned int i; 103b8bc0d8aSopenharmony_ci 104b8bc0d8aSopenharmony_ci if (!content) return; 105b8bc0d8aSopenharmony_ci 106b8bc0d8aSopenharmony_ci for (i = 0; i < content->count; i++) 107b8bc0d8aSopenharmony_ci exif_entry_unref (content->entries[i]); 108b8bc0d8aSopenharmony_ci exif_mem_free (mem, content->entries); 109b8bc0d8aSopenharmony_ci 110b8bc0d8aSopenharmony_ci if (content->priv) { 111b8bc0d8aSopenharmony_ci exif_log_unref (content->priv->log); 112b8bc0d8aSopenharmony_ci } 113b8bc0d8aSopenharmony_ci 114b8bc0d8aSopenharmony_ci exif_mem_free (mem, content->priv); 115b8bc0d8aSopenharmony_ci exif_mem_free (mem, content); 116b8bc0d8aSopenharmony_ci exif_mem_unref (mem); 117b8bc0d8aSopenharmony_ci} 118b8bc0d8aSopenharmony_ci 119b8bc0d8aSopenharmony_civoid 120b8bc0d8aSopenharmony_ciexif_content_dump (ExifContent *content, unsigned int indent) 121b8bc0d8aSopenharmony_ci{ 122b8bc0d8aSopenharmony_ci char buf[1024]; 123b8bc0d8aSopenharmony_ci unsigned int i, l; 124b8bc0d8aSopenharmony_ci 125b8bc0d8aSopenharmony_ci if (!content) 126b8bc0d8aSopenharmony_ci return; 127b8bc0d8aSopenharmony_ci 128b8bc0d8aSopenharmony_ci l = MIN(sizeof(buf)-1, 2*indent); 129b8bc0d8aSopenharmony_ci memset(buf, ' ', l); 130b8bc0d8aSopenharmony_ci buf[l] = '\0'; 131b8bc0d8aSopenharmony_ci 132b8bc0d8aSopenharmony_ci printf ("%sDumping exif content (%u entries)...\n", buf, 133b8bc0d8aSopenharmony_ci content->count); 134b8bc0d8aSopenharmony_ci for (i = 0; i < content->count; i++) 135b8bc0d8aSopenharmony_ci exif_entry_dump (content->entries[i], indent + 1); 136b8bc0d8aSopenharmony_ci} 137b8bc0d8aSopenharmony_ci 138b8bc0d8aSopenharmony_civoid 139b8bc0d8aSopenharmony_ciexif_content_add_entry (ExifContent *c, ExifEntry *entry) 140b8bc0d8aSopenharmony_ci{ 141b8bc0d8aSopenharmony_ci ExifEntry **entries; 142b8bc0d8aSopenharmony_ci if (!c || !c->priv || !entry || entry->parent) return; 143b8bc0d8aSopenharmony_ci 144b8bc0d8aSopenharmony_ci /* One tag can only be added once to an IFD. */ 145b8bc0d8aSopenharmony_ci if (exif_content_get_entry (c, entry->tag) && entry->tag != EXIF_TAG_MAKER_NOTE) { 146b8bc0d8aSopenharmony_ci exif_log (c->priv->log, EXIF_LOG_CODE_DEBUG, "ExifContent", 147b8bc0d8aSopenharmony_ci "An attempt has been made to add " 148b8bc0d8aSopenharmony_ci "the tag '%s' twice to an IFD. This is against " 149b8bc0d8aSopenharmony_ci "specification.", exif_tag_get_name (entry->tag)); 150b8bc0d8aSopenharmony_ci return; 151b8bc0d8aSopenharmony_ci } 152b8bc0d8aSopenharmony_ci 153b8bc0d8aSopenharmony_ci entries = exif_mem_realloc (c->priv->mem, 154b8bc0d8aSopenharmony_ci c->entries, sizeof (ExifEntry*) * (c->count + 1)); 155b8bc0d8aSopenharmony_ci if (!entries) return; 156b8bc0d8aSopenharmony_ci entry->parent = c; 157b8bc0d8aSopenharmony_ci entries[c->count++] = entry; 158b8bc0d8aSopenharmony_ci c->entries = entries; 159b8bc0d8aSopenharmony_ci exif_entry_ref (entry); 160b8bc0d8aSopenharmony_ci} 161b8bc0d8aSopenharmony_ci 162b8bc0d8aSopenharmony_civoid 163b8bc0d8aSopenharmony_ciexif_content_remove_entry (ExifContent *c, ExifEntry *e) 164b8bc0d8aSopenharmony_ci{ 165b8bc0d8aSopenharmony_ci unsigned int i; 166b8bc0d8aSopenharmony_ci ExifEntry **t, *temp; 167b8bc0d8aSopenharmony_ci 168b8bc0d8aSopenharmony_ci if (!c || !c->priv || !e || (e->parent != c)) return; 169b8bc0d8aSopenharmony_ci 170b8bc0d8aSopenharmony_ci /* Search the entry */ 171b8bc0d8aSopenharmony_ci for (i = 0; i < c->count; i++) 172b8bc0d8aSopenharmony_ci if (c->entries[i] == e) 173b8bc0d8aSopenharmony_ci break; 174b8bc0d8aSopenharmony_ci 175b8bc0d8aSopenharmony_ci if (i == c->count) 176b8bc0d8aSopenharmony_ci return; 177b8bc0d8aSopenharmony_ci 178b8bc0d8aSopenharmony_ci /* Remove the entry */ 179b8bc0d8aSopenharmony_ci temp = c->entries[c->count-1]; 180b8bc0d8aSopenharmony_ci if (c->count > 1) { 181b8bc0d8aSopenharmony_ci t = exif_mem_realloc (c->priv->mem, c->entries, 182b8bc0d8aSopenharmony_ci sizeof(ExifEntry*) * (c->count - 1)); 183b8bc0d8aSopenharmony_ci if (!t) { 184b8bc0d8aSopenharmony_ci return; 185b8bc0d8aSopenharmony_ci } 186b8bc0d8aSopenharmony_ci c->entries = t; 187b8bc0d8aSopenharmony_ci c->count--; 188b8bc0d8aSopenharmony_ci if (i != c->count) { /* we deallocated the last slot already */ 189b8bc0d8aSopenharmony_ci memmove (&t[i], &t[i + 1], sizeof (ExifEntry*) * (c->count - i - 1)); 190b8bc0d8aSopenharmony_ci t[c->count-1] = temp; 191b8bc0d8aSopenharmony_ci } 192b8bc0d8aSopenharmony_ci } else { 193b8bc0d8aSopenharmony_ci exif_mem_free (c->priv->mem, c->entries); 194b8bc0d8aSopenharmony_ci c->entries = NULL; 195b8bc0d8aSopenharmony_ci c->count = 0; 196b8bc0d8aSopenharmony_ci } 197b8bc0d8aSopenharmony_ci e->parent = NULL; 198b8bc0d8aSopenharmony_ci exif_entry_unref (e); 199b8bc0d8aSopenharmony_ci} 200b8bc0d8aSopenharmony_ci 201b8bc0d8aSopenharmony_ciExifEntry * 202b8bc0d8aSopenharmony_ciexif_content_get_entry (ExifContent *content, ExifTag tag) 203b8bc0d8aSopenharmony_ci{ 204b8bc0d8aSopenharmony_ci unsigned int i; 205b8bc0d8aSopenharmony_ci 206b8bc0d8aSopenharmony_ci if (!content) 207b8bc0d8aSopenharmony_ci return (NULL); 208b8bc0d8aSopenharmony_ci 209b8bc0d8aSopenharmony_ci for (i = 0; i < content->count; i++) 210b8bc0d8aSopenharmony_ci if (content->entries[i]->tag == tag) 211b8bc0d8aSopenharmony_ci return (content->entries[i]); 212b8bc0d8aSopenharmony_ci return (NULL); 213b8bc0d8aSopenharmony_ci} 214b8bc0d8aSopenharmony_ci 215b8bc0d8aSopenharmony_ciExifEntry * 216b8bc0d8aSopenharmony_ciexif_content_get_huawei_makenote_entry (ExifContent *content) 217b8bc0d8aSopenharmony_ci{ 218b8bc0d8aSopenharmony_ci if (!content) 219b8bc0d8aSopenharmony_ci return (NULL); 220b8bc0d8aSopenharmony_ci 221b8bc0d8aSopenharmony_ci ExifEntry *entry = NULL; 222b8bc0d8aSopenharmony_ci for (unsigned int i = 0; i < content->count; i++) { 223b8bc0d8aSopenharmony_ci entry = content->entries[i]; 224b8bc0d8aSopenharmony_ci if (entry->tag == EXIF_TAG_MAKER_NOTE) { 225b8bc0d8aSopenharmony_ci if (entry->data && (entry->size >= 8) && 226b8bc0d8aSopenharmony_ci (!memcmp(entry->data, "HUAWEI\0\0", 8))) { 227b8bc0d8aSopenharmony_ci return entry; 228b8bc0d8aSopenharmony_ci } 229b8bc0d8aSopenharmony_ci } 230b8bc0d8aSopenharmony_ci } 231b8bc0d8aSopenharmony_ci 232b8bc0d8aSopenharmony_ci return (NULL); 233b8bc0d8aSopenharmony_ci} 234b8bc0d8aSopenharmony_ci 235b8bc0d8aSopenharmony_civoid 236b8bc0d8aSopenharmony_ciexif_content_foreach_entry (ExifContent *content, 237b8bc0d8aSopenharmony_ci ExifContentForeachEntryFunc func, void *data) 238b8bc0d8aSopenharmony_ci{ 239b8bc0d8aSopenharmony_ci unsigned int i; 240b8bc0d8aSopenharmony_ci 241b8bc0d8aSopenharmony_ci if (!content || !func) 242b8bc0d8aSopenharmony_ci return; 243b8bc0d8aSopenharmony_ci 244b8bc0d8aSopenharmony_ci for (i = 0; i < content->count; i++) 245b8bc0d8aSopenharmony_ci func (content->entries[i], data); 246b8bc0d8aSopenharmony_ci} 247b8bc0d8aSopenharmony_ci 248b8bc0d8aSopenharmony_civoid 249b8bc0d8aSopenharmony_ciexif_content_log (ExifContent *content, ExifLog *log) 250b8bc0d8aSopenharmony_ci{ 251b8bc0d8aSopenharmony_ci if (!content || !content->priv || !log || content->priv->log == log) 252b8bc0d8aSopenharmony_ci return; 253b8bc0d8aSopenharmony_ci 254b8bc0d8aSopenharmony_ci if (content->priv->log) exif_log_unref (content->priv->log); 255b8bc0d8aSopenharmony_ci content->priv->log = log; 256b8bc0d8aSopenharmony_ci exif_log_ref (log); 257b8bc0d8aSopenharmony_ci} 258b8bc0d8aSopenharmony_ci 259b8bc0d8aSopenharmony_ciExifIfd 260b8bc0d8aSopenharmony_ciexif_content_get_ifd (ExifContent *c) 261b8bc0d8aSopenharmony_ci{ 262b8bc0d8aSopenharmony_ci if (!c || !c->parent) return EXIF_IFD_COUNT; 263b8bc0d8aSopenharmony_ci 264b8bc0d8aSopenharmony_ci return 265b8bc0d8aSopenharmony_ci ((c)->parent->ifd[EXIF_IFD_EXIF] == (c)) ? EXIF_IFD_EXIF : 266b8bc0d8aSopenharmony_ci ((c)->parent->ifd[EXIF_IFD_0] == (c)) ? EXIF_IFD_0 : 267b8bc0d8aSopenharmony_ci ((c)->parent->ifd[EXIF_IFD_1] == (c)) ? EXIF_IFD_1 : 268b8bc0d8aSopenharmony_ci ((c)->parent->ifd[EXIF_IFD_GPS] == (c)) ? EXIF_IFD_GPS : 269b8bc0d8aSopenharmony_ci ((c)->parent->ifd[EXIF_IFD_INTEROPERABILITY] == (c)) ? EXIF_IFD_INTEROPERABILITY : 270b8bc0d8aSopenharmony_ci EXIF_IFD_COUNT; 271b8bc0d8aSopenharmony_ci} 272b8bc0d8aSopenharmony_ci 273b8bc0d8aSopenharmony_cistatic void 274b8bc0d8aSopenharmony_cifix_func (ExifEntry *e, void *UNUSED(data)) 275b8bc0d8aSopenharmony_ci{ 276b8bc0d8aSopenharmony_ci exif_entry_fix (e); 277b8bc0d8aSopenharmony_ci} 278b8bc0d8aSopenharmony_ci 279b8bc0d8aSopenharmony_ci/*! 280b8bc0d8aSopenharmony_ci * Check if this entry is unknown and if so, delete it. 281b8bc0d8aSopenharmony_ci * \note Be careful calling this function in a loop. Deleting an entry from 282b8bc0d8aSopenharmony_ci * an ExifContent changes the index of subsequent entries, as well as the 283b8bc0d8aSopenharmony_ci * total size of the entries array. 284b8bc0d8aSopenharmony_ci */ 285b8bc0d8aSopenharmony_cistatic void 286b8bc0d8aSopenharmony_ciremove_not_recorded (ExifEntry *e, void *UNUSED(data)) 287b8bc0d8aSopenharmony_ci{ 288b8bc0d8aSopenharmony_ci ExifIfd ifd = exif_entry_get_ifd(e) ; 289b8bc0d8aSopenharmony_ci ExifContent *c = e->parent; 290b8bc0d8aSopenharmony_ci ExifDataType dt = exif_data_get_data_type (c->parent); 291b8bc0d8aSopenharmony_ci ExifTag t = e->tag; 292b8bc0d8aSopenharmony_ci 293b8bc0d8aSopenharmony_ci if (exif_tag_get_support_level_in_ifd (t, ifd, dt) == 294b8bc0d8aSopenharmony_ci EXIF_SUPPORT_LEVEL_NOT_RECORDED) { 295b8bc0d8aSopenharmony_ci exif_log (c->priv->log, EXIF_LOG_CODE_DEBUG, "exif-content", 296b8bc0d8aSopenharmony_ci "Tag 0x%04x is not recorded in IFD '%s' and has therefore been " 297b8bc0d8aSopenharmony_ci "removed.", t, exif_ifd_get_name (ifd)); 298b8bc0d8aSopenharmony_ci exif_content_remove_entry (c, e); 299b8bc0d8aSopenharmony_ci } 300b8bc0d8aSopenharmony_ci 301b8bc0d8aSopenharmony_ci} 302b8bc0d8aSopenharmony_ci 303b8bc0d8aSopenharmony_civoid 304b8bc0d8aSopenharmony_ciexif_content_fix (ExifContent *c) 305b8bc0d8aSopenharmony_ci{ 306b8bc0d8aSopenharmony_ci ExifIfd ifd = exif_content_get_ifd (c); 307b8bc0d8aSopenharmony_ci ExifDataType dt; 308b8bc0d8aSopenharmony_ci ExifEntry *e; 309b8bc0d8aSopenharmony_ci unsigned int i, num; 310b8bc0d8aSopenharmony_ci 311b8bc0d8aSopenharmony_ci if (!c) 312b8bc0d8aSopenharmony_ci return; 313b8bc0d8aSopenharmony_ci 314b8bc0d8aSopenharmony_ci dt = exif_data_get_data_type (c->parent); 315b8bc0d8aSopenharmony_ci 316b8bc0d8aSopenharmony_ci /* 317b8bc0d8aSopenharmony_ci * First of all, fix all existing entries. 318b8bc0d8aSopenharmony_ci */ 319b8bc0d8aSopenharmony_ci exif_content_foreach_entry (c, fix_func, NULL); 320b8bc0d8aSopenharmony_ci 321b8bc0d8aSopenharmony_ci /* 322b8bc0d8aSopenharmony_ci * Go through each tag and if it's not recorded, remove it. If one 323b8bc0d8aSopenharmony_ci * is removed, exif_content_foreach_entry() will skip the next entry, 324b8bc0d8aSopenharmony_ci * so if this happens do the loop again from the beginning to ensure 325b8bc0d8aSopenharmony_ci * they're all checked. This could be avoided if we stop relying on 326b8bc0d8aSopenharmony_ci * exif_content_foreach_entry but loop intelligently here. 327b8bc0d8aSopenharmony_ci */ 328b8bc0d8aSopenharmony_ci do { 329b8bc0d8aSopenharmony_ci num = c->count; 330b8bc0d8aSopenharmony_ci exif_content_foreach_entry (c, remove_not_recorded, NULL); 331b8bc0d8aSopenharmony_ci } while (num != c->count); 332b8bc0d8aSopenharmony_ci 333b8bc0d8aSopenharmony_ci /* 334b8bc0d8aSopenharmony_ci * Then check for non-existing mandatory tags and create them if needed 335b8bc0d8aSopenharmony_ci */ 336b8bc0d8aSopenharmony_ci num = exif_tag_table_count(); 337b8bc0d8aSopenharmony_ci for (i = 0; i < num; ++i) { 338b8bc0d8aSopenharmony_ci const ExifTag t = exif_tag_table_get_tag (i); 339b8bc0d8aSopenharmony_ci if (exif_tag_get_support_level_in_ifd (t, ifd, dt) == 340b8bc0d8aSopenharmony_ci EXIF_SUPPORT_LEVEL_MANDATORY) { 341b8bc0d8aSopenharmony_ci if (exif_content_get_entry (c, t)) 342b8bc0d8aSopenharmony_ci /* This tag already exists */ 343b8bc0d8aSopenharmony_ci continue; 344b8bc0d8aSopenharmony_ci exif_log (c->priv->log, EXIF_LOG_CODE_DEBUG, "exif-content", 345b8bc0d8aSopenharmony_ci "Tag '%s' is mandatory in IFD '%s' and has therefore been added.", 346b8bc0d8aSopenharmony_ci exif_tag_get_name_in_ifd (t, ifd), exif_ifd_get_name (ifd)); 347b8bc0d8aSopenharmony_ci e = exif_entry_new (); 348b8bc0d8aSopenharmony_ci exif_content_add_entry (c, e); 349b8bc0d8aSopenharmony_ci exif_entry_initialize (e, t); 350b8bc0d8aSopenharmony_ci exif_entry_unref (e); 351b8bc0d8aSopenharmony_ci } 352b8bc0d8aSopenharmony_ci } 353b8bc0d8aSopenharmony_ci} 354