Lines Matching refs:sizeRequired
138 int32_t sizeRequired = mapper->v5.getStandardMetadata(bufferHandle, static_cast<int64_t>(T), in getStandardMetadata() local
140 if (sizeRequired < 0) { in getStandardMetadata()
141 ALOGW_IF(-AIMAPPER_ERROR_UNSUPPORTED != sizeRequired, in getStandardMetadata()
142 "Unexpected error %d from valid getStandardMetadata call", -sizeRequired); in getStandardMetadata()
145 if ((size_t)sizeRequired > buffer.size()) { in getStandardMetadata()
146 buffer.resize(sizeRequired); in getStandardMetadata()
147 sizeRequired = mapper->v5.getStandardMetadata(bufferHandle, static_cast<int64_t>(T), in getStandardMetadata()
150 if (sizeRequired < 0 || (size_t)sizeRequired > buffer.size()) { in getStandardMetadata()
151 ALOGW("getStandardMetadata failed, received %d with buffer size %zd", sizeRequired, in getStandardMetadata()
156 return Value::decode(buffer.data(), sizeRequired); in getStandardMetadata()
163 int32_t sizeRequired = Value::encode(value, nullptr, 0); in setStandardMetadata() local
164 if (sizeRequired < 0) { in setStandardMetadata()
166 return static_cast<AIMapper_Error>(-sizeRequired); in setStandardMetadata()
169 buffer.resize(sizeRequired); in setStandardMetadata()
170 sizeRequired = Value::encode(value, buffer.data(), buffer.size()); in setStandardMetadata()
171 if (sizeRequired < 0 || (size_t)sizeRequired > buffer.size()) { in setStandardMetadata()
172 ALOGW("Failed to encode with calculated size %d; buffer size %zd", sizeRequired, in setStandardMetadata()
174 return static_cast<AIMapper_Error>(-sizeRequired); in setStandardMetadata()
177 sizeRequired); in setStandardMetadata()