Loading camera/ndk/include/camera/NdkCameraMetadataTags.h +5 −2 Original line number Diff line number Diff line Loading @@ -2197,8 +2197,11 @@ typedef enum acamera_metadata_tag { * flashlight brightness level via * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraManager.html#turnOnTorchWithStrengthLevel">CameraManager#turnOnTorchWithStrengthLevel</a>. * If this value is equal to 1, flashlight brightness control is not supported. * The value for this key will be null for devices with no flash unit. * This level must be set to a safe value to prevent any burn out issues.</p> * The value for this key will be null for devices with no flash unit.</p> * <p>The maximum value is guaranteed to be safe to use for an indefinite duration in * terms of device flashlight lifespan, but may be too bright for comfort for many * use cases. Use the default torch brightness value to avoid problems with an * over-bright flashlight.</p> */ ACAMERA_FLASH_INFO_STRENGTH_MAXIMUM_LEVEL = // int32 ACAMERA_FLASH_INFO_START + 2, Loading media/ndk/NdkMediaCodec.cpp +16 −7 Original line number Diff line number Diff line Loading @@ -529,22 +529,31 @@ media_status_t AMediaCodec_setAsyncNotifyCallback( AMediaCodecOnAsyncNotifyCallback callback, void *userdata) { { Mutex::Autolock _l(mData->mAsyncCallbackLock); if (mData->mAsyncNotify == NULL) { mData->mAsyncNotify = new AMessage(kWhatAsyncNotify, mData->mHandler); } // we set this ahead so that we can be ready // to receive callbacks as soon as the next call is a // success. mData->mAsyncCallback = callback; mData->mAsyncCallbackUserData = userdata; } // always call, codec may have been reset/re-configured since last call. status_t err = mData->mCodec->setCallback(mData->mAsyncNotify); if (err != OK) { { //The setup gone wrong. clean up the pointers. Mutex::Autolock _l(mData->mAsyncCallbackLock); mData->mAsyncCallback = {}; mData->mAsyncCallbackUserData = nullptr; } ALOGE("setAsyncNotifyCallback: err(%d), failed to set async callback", err); return translate_error(err); } mData->mAsyncCallback = callback; mData->mAsyncCallbackUserData = userdata; return AMEDIA_OK; } Loading Loading
camera/ndk/include/camera/NdkCameraMetadataTags.h +5 −2 Original line number Diff line number Diff line Loading @@ -2197,8 +2197,11 @@ typedef enum acamera_metadata_tag { * flashlight brightness level via * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraManager.html#turnOnTorchWithStrengthLevel">CameraManager#turnOnTorchWithStrengthLevel</a>. * If this value is equal to 1, flashlight brightness control is not supported. * The value for this key will be null for devices with no flash unit. * This level must be set to a safe value to prevent any burn out issues.</p> * The value for this key will be null for devices with no flash unit.</p> * <p>The maximum value is guaranteed to be safe to use for an indefinite duration in * terms of device flashlight lifespan, but may be too bright for comfort for many * use cases. Use the default torch brightness value to avoid problems with an * over-bright flashlight.</p> */ ACAMERA_FLASH_INFO_STRENGTH_MAXIMUM_LEVEL = // int32 ACAMERA_FLASH_INFO_START + 2, Loading
media/ndk/NdkMediaCodec.cpp +16 −7 Original line number Diff line number Diff line Loading @@ -529,22 +529,31 @@ media_status_t AMediaCodec_setAsyncNotifyCallback( AMediaCodecOnAsyncNotifyCallback callback, void *userdata) { { Mutex::Autolock _l(mData->mAsyncCallbackLock); if (mData->mAsyncNotify == NULL) { mData->mAsyncNotify = new AMessage(kWhatAsyncNotify, mData->mHandler); } // we set this ahead so that we can be ready // to receive callbacks as soon as the next call is a // success. mData->mAsyncCallback = callback; mData->mAsyncCallbackUserData = userdata; } // always call, codec may have been reset/re-configured since last call. status_t err = mData->mCodec->setCallback(mData->mAsyncNotify); if (err != OK) { { //The setup gone wrong. clean up the pointers. Mutex::Autolock _l(mData->mAsyncCallbackLock); mData->mAsyncCallback = {}; mData->mAsyncCallbackUserData = nullptr; } ALOGE("setAsyncNotifyCallback: err(%d), failed to set async callback", err); return translate_error(err); } mData->mAsyncCallback = callback; mData->mAsyncCallbackUserData = userdata; return AMEDIA_OK; } Loading