Loading services/camera/libcameraservice/common/CameraModule.cpp +57 −13 Original line number Original line Diff line number Diff line Loading @@ -28,9 +28,9 @@ void CameraModule::deriveCameraCharacteristicsKeys( uint32_t deviceVersion, CameraMetadata &chars) { uint32_t deviceVersion, CameraMetadata &chars) { ATRACE_CALL(); ATRACE_CALL(); Vector<int32_t> derivedCharKeys; // Keys added in HAL3.3 // Keys added in HAL3.3 if (deviceVersion < CAMERA_DEVICE_API_VERSION_3_3) { if (deviceVersion < CAMERA_DEVICE_API_VERSION_3_3) { const size_t NUM_DERIVED_KEYS_HAL3_3 = 5; Vector<uint8_t> controlModes; Vector<uint8_t> controlModes; uint8_t data = ANDROID_CONTROL_AE_LOCK_AVAILABLE_TRUE; uint8_t data = ANDROID_CONTROL_AE_LOCK_AVAILABLE_TRUE; chars.update(ANDROID_CONTROL_AE_LOCK_AVAILABLE, &data, /*count*/1); chars.update(ANDROID_CONTROL_AE_LOCK_AVAILABLE, &data, /*count*/1); Loading Loading @@ -102,18 +102,11 @@ void CameraModule::deriveCameraCharacteristicsKeys( chars.update(ANDROID_SHADING_AVAILABLE_MODES, lscModes); chars.update(ANDROID_SHADING_AVAILABLE_MODES, lscModes); chars.update(ANDROID_STATISTICS_INFO_AVAILABLE_LENS_SHADING_MAP_MODES, lscMapModes); chars.update(ANDROID_STATISTICS_INFO_AVAILABLE_LENS_SHADING_MAP_MODES, lscMapModes); entry = chars.find(ANDROID_REQUEST_AVAILABLE_CHARACTERISTICS_KEYS); derivedCharKeys.push(ANDROID_CONTROL_AE_LOCK_AVAILABLE); Vector<int32_t> availableCharsKeys; derivedCharKeys.push(ANDROID_CONTROL_AWB_LOCK_AVAILABLE); availableCharsKeys.setCapacity(entry.count + NUM_DERIVED_KEYS_HAL3_3); derivedCharKeys.push(ANDROID_CONTROL_AVAILABLE_MODES); for (size_t i = 0; i < entry.count; i++) { derivedCharKeys.push(ANDROID_SHADING_AVAILABLE_MODES); availableCharsKeys.push(entry.data.i32[i]); derivedCharKeys.push(ANDROID_STATISTICS_INFO_AVAILABLE_LENS_SHADING_MAP_MODES); } availableCharsKeys.push(ANDROID_CONTROL_AE_LOCK_AVAILABLE); availableCharsKeys.push(ANDROID_CONTROL_AWB_LOCK_AVAILABLE); availableCharsKeys.push(ANDROID_CONTROL_AVAILABLE_MODES); availableCharsKeys.push(ANDROID_SHADING_AVAILABLE_MODES); availableCharsKeys.push(ANDROID_STATISTICS_INFO_AVAILABLE_LENS_SHADING_MAP_MODES); chars.update(ANDROID_REQUEST_AVAILABLE_CHARACTERISTICS_KEYS, availableCharsKeys); // Need update android.control.availableHighSpeedVideoConfigurations since HAL3.3 // Need update android.control.availableHighSpeedVideoConfigurations since HAL3.3 // adds batch size to this array. // adds batch size to this array. Loading @@ -132,6 +125,44 @@ void CameraModule::deriveCameraCharacteristicsKeys( } } } } // Keys added in HAL3.4 if (deviceVersion < CAMERA_DEVICE_API_VERSION_3_4) { // Check if HAL supports RAW_OPAQUE output camera_metadata_entry entry = chars.find(ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS); bool supportRawOpaque = false; const int STREAM_CONFIGURATION_SIZE = 4; const int STREAM_FORMAT_OFFSET = 0; const int STREAM_WIDTH_OFFSET = 1; const int STREAM_HEIGHT_OFFSET = 2; const int STREAM_IS_INPUT_OFFSET = 3; Vector<int32_t> rawOpaqueSizes; for (size_t i=0; i < entry.count; i += STREAM_CONFIGURATION_SIZE) { int32_t format = entry.data.i32[i + STREAM_FORMAT_OFFSET]; int32_t width = entry.data.i32[i + STREAM_WIDTH_OFFSET]; int32_t height = entry.data.i32[i + STREAM_HEIGHT_OFFSET]; int32_t isInput = entry.data.i32[i + STREAM_IS_INPUT_OFFSET]; if (isInput == ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS_OUTPUT && format == HAL_PIXEL_FORMAT_RAW_OPAQUE) { supportRawOpaque = true; rawOpaqueSizes.push(width); rawOpaqueSizes.push(height); // 2 bytes per pixel. This rough estimation is only used when // HAL does not fill in the opaque raw size rawOpaqueSizes.push(width * height *2); } } if (supportRawOpaque) { entry = chars.find(ANDROID_SENSOR_OPAQUE_RAW_SIZE); if (entry.count == 0) { // Fill in estimated value if HAL does not list it chars.update(ANDROID_SENSOR_OPAQUE_RAW_SIZE, rawOpaqueSizes); derivedCharKeys.push(ANDROID_SENSOR_OPAQUE_RAW_SIZE); } } } // Always add a default for the pre-correction active array if the vendor chooses to omit this // Always add a default for the pre-correction active array if the vendor chooses to omit this camera_metadata_entry entry = chars.find(ANDROID_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE); camera_metadata_entry entry = chars.find(ANDROID_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE); if (entry.count == 0) { if (entry.count == 0) { Loading @@ -139,8 +170,21 @@ void CameraModule::deriveCameraCharacteristicsKeys( entry = chars.find(ANDROID_SENSOR_INFO_ACTIVE_ARRAY_SIZE); entry = chars.find(ANDROID_SENSOR_INFO_ACTIVE_ARRAY_SIZE); preCorrectionArray.appendArray(entry.data.i32, entry.count); preCorrectionArray.appendArray(entry.data.i32, entry.count); chars.update(ANDROID_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE, preCorrectionArray); chars.update(ANDROID_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE, preCorrectionArray); derivedCharKeys.push(ANDROID_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE); } } // Add those newly added keys to AVAILABLE_CHARACTERISTICS_KEYS // This has to be done at this end of this function. entry = chars.find(ANDROID_REQUEST_AVAILABLE_CHARACTERISTICS_KEYS); Vector<int32_t> availableCharsKeys; availableCharsKeys.setCapacity(entry.count + derivedCharKeys.size()); for (size_t i = 0; i < entry.count; i++) { availableCharsKeys.push(entry.data.i32[i]); } for (size_t i = 0; i < derivedCharKeys.size(); i++) { availableCharsKeys.push(derivedCharKeys[i]); } chars.update(ANDROID_REQUEST_AVAILABLE_CHARACTERISTICS_KEYS, availableCharsKeys); return; return; } } Loading services/camera/libcameraservice/device3/Camera3Device.cpp +32 −0 Original line number Original line Diff line number Diff line Loading @@ -422,7 +422,31 @@ ssize_t Camera3Device::getPointCloudBufferSize() const { return maxBytesForPointCloud; return maxBytesForPointCloud; } } ssize_t Camera3Device::getRawOpaqueBufferSize(uint32_t width, uint32_t height) const { const int PER_CONFIGURATION_SIZE = 3; const int WIDTH_OFFSET = 0; const int HEIGHT_OFFSET = 1; const int SIZE_OFFSET = 2; camera_metadata_ro_entry rawOpaqueSizes = mDeviceInfo.find(ANDROID_SENSOR_OPAQUE_RAW_SIZE); int count = rawOpaqueSizes.count; if (count == 0 || (count % PER_CONFIGURATION_SIZE)) { ALOGE("%s: Camera %d: bad opaque RAW size static metadata length(%d)!", __FUNCTION__, mId, count); return BAD_VALUE; } for (size_t i = 0; i < count; i += PER_CONFIGURATION_SIZE) { if (width == rawOpaqueSizes.data.i32[i + WIDTH_OFFSET] && height == rawOpaqueSizes.data.i32[i + HEIGHT_OFFSET]) { return rawOpaqueSizes.data.i32[i + SIZE_OFFSET]; } } ALOGE("%s: Camera %d: cannot find size for %dx%d opaque RAW image!", __FUNCTION__, mId, width, height); return BAD_VALUE; } status_t Camera3Device::dump(int fd, const Vector<String16> &args) { status_t Camera3Device::dump(int fd, const Vector<String16> &args) { ATRACE_CALL(); ATRACE_CALL(); Loading Loading @@ -956,6 +980,14 @@ status_t Camera3Device::createStream(sp<Surface> consumer, } } newStream = new Camera3OutputStream(mNextStreamId, consumer, newStream = new Camera3OutputStream(mNextStreamId, consumer, width, height, blobBufferSize, format, dataSpace, rotation); width, height, blobBufferSize, format, dataSpace, rotation); } else if (format == HAL_PIXEL_FORMAT_RAW_OPAQUE) { ssize_t rawOpaqueBufferSize = getRawOpaqueBufferSize(width, height); if (rawOpaqueBufferSize <= 0) { SET_ERR_L("Invalid RAW opaque buffer size %zd", rawOpaqueBufferSize); return BAD_VALUE; } newStream = new Camera3OutputStream(mNextStreamId, consumer, width, height, rawOpaqueBufferSize, format, dataSpace, rotation); } else { } else { newStream = new Camera3OutputStream(mNextStreamId, consumer, newStream = new Camera3OutputStream(mNextStreamId, consumer, width, height, format, dataSpace, rotation); width, height, format, dataSpace, rotation); Loading services/camera/libcameraservice/device3/Camera3Device.h +1 −0 Original line number Original line Diff line number Diff line Loading @@ -150,6 +150,7 @@ class Camera3Device : virtual ssize_t getJpegBufferSize(uint32_t width, uint32_t height) const; virtual ssize_t getJpegBufferSize(uint32_t width, uint32_t height) const; ssize_t getPointCloudBufferSize() const; ssize_t getPointCloudBufferSize() const; ssize_t getRawOpaqueBufferSize(uint32_t width, uint32_t height) const; // Methods called by subclasses // Methods called by subclasses void notifyStatus(bool idle); // updates from StatusTracker void notifyStatus(bool idle); // updates from StatusTracker Loading services/camera/libcameraservice/device3/Camera3IOStreamBase.cpp +2 −1 Original line number Original line Diff line number Diff line Loading @@ -42,7 +42,8 @@ Camera3IOStreamBase::Camera3IOStreamBase(int id, camera3_stream_type_t type, mCombinedFence = new Fence(); mCombinedFence = new Fence(); if (maxSize > 0 && format != HAL_PIXEL_FORMAT_BLOB) { if (maxSize > 0 && (format != HAL_PIXEL_FORMAT_BLOB && format != HAL_PIXEL_FORMAT_RAW_OPAQUE)) { ALOGE("%s: Bad format for size-only stream: %d", __FUNCTION__, ALOGE("%s: Bad format for size-only stream: %d", __FUNCTION__, format); format); mState = STATE_ERROR; mState = STATE_ERROR; Loading services/camera/libcameraservice/device3/Camera3OutputStream.cpp +1 −1 Original line number Original line Diff line number Diff line Loading @@ -57,7 +57,7 @@ Camera3OutputStream::Camera3OutputStream(int id, mTransform(0), mTransform(0), mTraceFirstBuffer(true) { mTraceFirstBuffer(true) { if (format != HAL_PIXEL_FORMAT_BLOB) { if (format != HAL_PIXEL_FORMAT_BLOB && format != HAL_PIXEL_FORMAT_RAW_OPAQUE) { ALOGE("%s: Bad format for size-only stream: %d", __FUNCTION__, ALOGE("%s: Bad format for size-only stream: %d", __FUNCTION__, format); format); mState = STATE_ERROR; mState = STATE_ERROR; Loading Loading
services/camera/libcameraservice/common/CameraModule.cpp +57 −13 Original line number Original line Diff line number Diff line Loading @@ -28,9 +28,9 @@ void CameraModule::deriveCameraCharacteristicsKeys( uint32_t deviceVersion, CameraMetadata &chars) { uint32_t deviceVersion, CameraMetadata &chars) { ATRACE_CALL(); ATRACE_CALL(); Vector<int32_t> derivedCharKeys; // Keys added in HAL3.3 // Keys added in HAL3.3 if (deviceVersion < CAMERA_DEVICE_API_VERSION_3_3) { if (deviceVersion < CAMERA_DEVICE_API_VERSION_3_3) { const size_t NUM_DERIVED_KEYS_HAL3_3 = 5; Vector<uint8_t> controlModes; Vector<uint8_t> controlModes; uint8_t data = ANDROID_CONTROL_AE_LOCK_AVAILABLE_TRUE; uint8_t data = ANDROID_CONTROL_AE_LOCK_AVAILABLE_TRUE; chars.update(ANDROID_CONTROL_AE_LOCK_AVAILABLE, &data, /*count*/1); chars.update(ANDROID_CONTROL_AE_LOCK_AVAILABLE, &data, /*count*/1); Loading Loading @@ -102,18 +102,11 @@ void CameraModule::deriveCameraCharacteristicsKeys( chars.update(ANDROID_SHADING_AVAILABLE_MODES, lscModes); chars.update(ANDROID_SHADING_AVAILABLE_MODES, lscModes); chars.update(ANDROID_STATISTICS_INFO_AVAILABLE_LENS_SHADING_MAP_MODES, lscMapModes); chars.update(ANDROID_STATISTICS_INFO_AVAILABLE_LENS_SHADING_MAP_MODES, lscMapModes); entry = chars.find(ANDROID_REQUEST_AVAILABLE_CHARACTERISTICS_KEYS); derivedCharKeys.push(ANDROID_CONTROL_AE_LOCK_AVAILABLE); Vector<int32_t> availableCharsKeys; derivedCharKeys.push(ANDROID_CONTROL_AWB_LOCK_AVAILABLE); availableCharsKeys.setCapacity(entry.count + NUM_DERIVED_KEYS_HAL3_3); derivedCharKeys.push(ANDROID_CONTROL_AVAILABLE_MODES); for (size_t i = 0; i < entry.count; i++) { derivedCharKeys.push(ANDROID_SHADING_AVAILABLE_MODES); availableCharsKeys.push(entry.data.i32[i]); derivedCharKeys.push(ANDROID_STATISTICS_INFO_AVAILABLE_LENS_SHADING_MAP_MODES); } availableCharsKeys.push(ANDROID_CONTROL_AE_LOCK_AVAILABLE); availableCharsKeys.push(ANDROID_CONTROL_AWB_LOCK_AVAILABLE); availableCharsKeys.push(ANDROID_CONTROL_AVAILABLE_MODES); availableCharsKeys.push(ANDROID_SHADING_AVAILABLE_MODES); availableCharsKeys.push(ANDROID_STATISTICS_INFO_AVAILABLE_LENS_SHADING_MAP_MODES); chars.update(ANDROID_REQUEST_AVAILABLE_CHARACTERISTICS_KEYS, availableCharsKeys); // Need update android.control.availableHighSpeedVideoConfigurations since HAL3.3 // Need update android.control.availableHighSpeedVideoConfigurations since HAL3.3 // adds batch size to this array. // adds batch size to this array. Loading @@ -132,6 +125,44 @@ void CameraModule::deriveCameraCharacteristicsKeys( } } } } // Keys added in HAL3.4 if (deviceVersion < CAMERA_DEVICE_API_VERSION_3_4) { // Check if HAL supports RAW_OPAQUE output camera_metadata_entry entry = chars.find(ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS); bool supportRawOpaque = false; const int STREAM_CONFIGURATION_SIZE = 4; const int STREAM_FORMAT_OFFSET = 0; const int STREAM_WIDTH_OFFSET = 1; const int STREAM_HEIGHT_OFFSET = 2; const int STREAM_IS_INPUT_OFFSET = 3; Vector<int32_t> rawOpaqueSizes; for (size_t i=0; i < entry.count; i += STREAM_CONFIGURATION_SIZE) { int32_t format = entry.data.i32[i + STREAM_FORMAT_OFFSET]; int32_t width = entry.data.i32[i + STREAM_WIDTH_OFFSET]; int32_t height = entry.data.i32[i + STREAM_HEIGHT_OFFSET]; int32_t isInput = entry.data.i32[i + STREAM_IS_INPUT_OFFSET]; if (isInput == ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS_OUTPUT && format == HAL_PIXEL_FORMAT_RAW_OPAQUE) { supportRawOpaque = true; rawOpaqueSizes.push(width); rawOpaqueSizes.push(height); // 2 bytes per pixel. This rough estimation is only used when // HAL does not fill in the opaque raw size rawOpaqueSizes.push(width * height *2); } } if (supportRawOpaque) { entry = chars.find(ANDROID_SENSOR_OPAQUE_RAW_SIZE); if (entry.count == 0) { // Fill in estimated value if HAL does not list it chars.update(ANDROID_SENSOR_OPAQUE_RAW_SIZE, rawOpaqueSizes); derivedCharKeys.push(ANDROID_SENSOR_OPAQUE_RAW_SIZE); } } } // Always add a default for the pre-correction active array if the vendor chooses to omit this // Always add a default for the pre-correction active array if the vendor chooses to omit this camera_metadata_entry entry = chars.find(ANDROID_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE); camera_metadata_entry entry = chars.find(ANDROID_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE); if (entry.count == 0) { if (entry.count == 0) { Loading @@ -139,8 +170,21 @@ void CameraModule::deriveCameraCharacteristicsKeys( entry = chars.find(ANDROID_SENSOR_INFO_ACTIVE_ARRAY_SIZE); entry = chars.find(ANDROID_SENSOR_INFO_ACTIVE_ARRAY_SIZE); preCorrectionArray.appendArray(entry.data.i32, entry.count); preCorrectionArray.appendArray(entry.data.i32, entry.count); chars.update(ANDROID_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE, preCorrectionArray); chars.update(ANDROID_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE, preCorrectionArray); derivedCharKeys.push(ANDROID_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE); } } // Add those newly added keys to AVAILABLE_CHARACTERISTICS_KEYS // This has to be done at this end of this function. entry = chars.find(ANDROID_REQUEST_AVAILABLE_CHARACTERISTICS_KEYS); Vector<int32_t> availableCharsKeys; availableCharsKeys.setCapacity(entry.count + derivedCharKeys.size()); for (size_t i = 0; i < entry.count; i++) { availableCharsKeys.push(entry.data.i32[i]); } for (size_t i = 0; i < derivedCharKeys.size(); i++) { availableCharsKeys.push(derivedCharKeys[i]); } chars.update(ANDROID_REQUEST_AVAILABLE_CHARACTERISTICS_KEYS, availableCharsKeys); return; return; } } Loading
services/camera/libcameraservice/device3/Camera3Device.cpp +32 −0 Original line number Original line Diff line number Diff line Loading @@ -422,7 +422,31 @@ ssize_t Camera3Device::getPointCloudBufferSize() const { return maxBytesForPointCloud; return maxBytesForPointCloud; } } ssize_t Camera3Device::getRawOpaqueBufferSize(uint32_t width, uint32_t height) const { const int PER_CONFIGURATION_SIZE = 3; const int WIDTH_OFFSET = 0; const int HEIGHT_OFFSET = 1; const int SIZE_OFFSET = 2; camera_metadata_ro_entry rawOpaqueSizes = mDeviceInfo.find(ANDROID_SENSOR_OPAQUE_RAW_SIZE); int count = rawOpaqueSizes.count; if (count == 0 || (count % PER_CONFIGURATION_SIZE)) { ALOGE("%s: Camera %d: bad opaque RAW size static metadata length(%d)!", __FUNCTION__, mId, count); return BAD_VALUE; } for (size_t i = 0; i < count; i += PER_CONFIGURATION_SIZE) { if (width == rawOpaqueSizes.data.i32[i + WIDTH_OFFSET] && height == rawOpaqueSizes.data.i32[i + HEIGHT_OFFSET]) { return rawOpaqueSizes.data.i32[i + SIZE_OFFSET]; } } ALOGE("%s: Camera %d: cannot find size for %dx%d opaque RAW image!", __FUNCTION__, mId, width, height); return BAD_VALUE; } status_t Camera3Device::dump(int fd, const Vector<String16> &args) { status_t Camera3Device::dump(int fd, const Vector<String16> &args) { ATRACE_CALL(); ATRACE_CALL(); Loading Loading @@ -956,6 +980,14 @@ status_t Camera3Device::createStream(sp<Surface> consumer, } } newStream = new Camera3OutputStream(mNextStreamId, consumer, newStream = new Camera3OutputStream(mNextStreamId, consumer, width, height, blobBufferSize, format, dataSpace, rotation); width, height, blobBufferSize, format, dataSpace, rotation); } else if (format == HAL_PIXEL_FORMAT_RAW_OPAQUE) { ssize_t rawOpaqueBufferSize = getRawOpaqueBufferSize(width, height); if (rawOpaqueBufferSize <= 0) { SET_ERR_L("Invalid RAW opaque buffer size %zd", rawOpaqueBufferSize); return BAD_VALUE; } newStream = new Camera3OutputStream(mNextStreamId, consumer, width, height, rawOpaqueBufferSize, format, dataSpace, rotation); } else { } else { newStream = new Camera3OutputStream(mNextStreamId, consumer, newStream = new Camera3OutputStream(mNextStreamId, consumer, width, height, format, dataSpace, rotation); width, height, format, dataSpace, rotation); Loading
services/camera/libcameraservice/device3/Camera3Device.h +1 −0 Original line number Original line Diff line number Diff line Loading @@ -150,6 +150,7 @@ class Camera3Device : virtual ssize_t getJpegBufferSize(uint32_t width, uint32_t height) const; virtual ssize_t getJpegBufferSize(uint32_t width, uint32_t height) const; ssize_t getPointCloudBufferSize() const; ssize_t getPointCloudBufferSize() const; ssize_t getRawOpaqueBufferSize(uint32_t width, uint32_t height) const; // Methods called by subclasses // Methods called by subclasses void notifyStatus(bool idle); // updates from StatusTracker void notifyStatus(bool idle); // updates from StatusTracker Loading
services/camera/libcameraservice/device3/Camera3IOStreamBase.cpp +2 −1 Original line number Original line Diff line number Diff line Loading @@ -42,7 +42,8 @@ Camera3IOStreamBase::Camera3IOStreamBase(int id, camera3_stream_type_t type, mCombinedFence = new Fence(); mCombinedFence = new Fence(); if (maxSize > 0 && format != HAL_PIXEL_FORMAT_BLOB) { if (maxSize > 0 && (format != HAL_PIXEL_FORMAT_BLOB && format != HAL_PIXEL_FORMAT_RAW_OPAQUE)) { ALOGE("%s: Bad format for size-only stream: %d", __FUNCTION__, ALOGE("%s: Bad format for size-only stream: %d", __FUNCTION__, format); format); mState = STATE_ERROR; mState = STATE_ERROR; Loading
services/camera/libcameraservice/device3/Camera3OutputStream.cpp +1 −1 Original line number Original line Diff line number Diff line Loading @@ -57,7 +57,7 @@ Camera3OutputStream::Camera3OutputStream(int id, mTransform(0), mTransform(0), mTraceFirstBuffer(true) { mTraceFirstBuffer(true) { if (format != HAL_PIXEL_FORMAT_BLOB) { if (format != HAL_PIXEL_FORMAT_BLOB && format != HAL_PIXEL_FORMAT_RAW_OPAQUE) { ALOGE("%s: Bad format for size-only stream: %d", __FUNCTION__, ALOGE("%s: Bad format for size-only stream: %d", __FUNCTION__, format); format); mState = STATE_ERROR; mState = STATE_ERROR; Loading