Lines Matching refs:count
68 int Metadata::addUInt8(uint32_t tag, int count, const uint8_t *data) in addUInt8() argument
70 if (!validate(tag, TYPE_BYTE, count)) return -EINVAL; in addUInt8()
71 return add(tag, count, data); in addUInt8()
79 int Metadata::addInt32(uint32_t tag, int count, const int32_t *data) in addInt32() argument
81 if (!validate(tag, TYPE_INT32, count)) return -EINVAL; in addInt32()
82 return add(tag, count, data); in addInt32()
85 int Metadata::addFloat(uint32_t tag, int count, const float *data) in addFloat() argument
87 if (!validate(tag, TYPE_FLOAT, count)) return -EINVAL; in addFloat()
88 return add(tag, count, data); in addFloat()
91 int Metadata::addInt64(uint32_t tag, int count, const int64_t *data) in addInt64() argument
93 if (!validate(tag, TYPE_INT64, count)) return -EINVAL; in addInt64()
94 return add(tag, count, data); in addInt64()
97 int Metadata::addDouble(uint32_t tag, int count, const double *data) in addDouble() argument
99 if (!validate(tag, TYPE_DOUBLE, count)) return -EINVAL; in addDouble()
100 return add(tag, count, data); in addDouble()
103 int Metadata::addRational(uint32_t tag, int count, in addRational() argument
106 if (!validate(tag, TYPE_RATIONAL, count)) return -EINVAL; in addRational()
107 return add(tag, count, data); in addRational()
110 bool Metadata::validate(uint32_t tag, int tag_type, int count) in validate() argument
125 if (count < 1) { in validate()
126 ALOGE("%s: Invalid metadata entry count: %d", __func__, count); in validate()
132 int Metadata::add(uint32_t tag, int count, const void *tag_data) in add() argument
139 size_t size = calculate_camera_metadata_entry_data_size(tag_type, count); in add()
150 if (mData && !add_camera_metadata_entry(mData, tag, tag_data, count)) in add()
169 res = add_camera_metadata_entry(tmp, tag, tag_data, count); in add()
172 __func__, tag, tag_data, count, tmp); in add()