void CameraClient::notifyCallback(int32_t msgType, int32_t ext1, int32_t ext2, void* user) { LOG2("notifyCallback(%d)", msgType); // Ignore CAF_RESTART callbacks from Samsung's camera driver if (msgType == CAMERA_MSG_FOCUS && ext1 == 4) { LOG2("Ignore CAF_RESTART callback"); return; } Mutex* lock = getClientLockFromCookie(user); if (lock == NULL) return; Mutex::Autolock alock(*lock); CameraClient* client = static_cast<CameraClient*>(getClientFromCookie(user)); if (client == NULL) return; if (!client->lockIfMessageWanted(msgType)) return; switch (msgType) { case CAMERA_MSG_SHUTTER: // ext1 is the dimension of the yuv picture. client->handleShutter(); break; default: client->handleGenericNotify(msgType, ext1, ext2); break; } }
void CameraClient::notifyCallback(int32_t msgType, int32_t ext1, int32_t ext2, void* user) { LOG2("notifyCallback(%d)", msgType); Mutex* lock = getClientLockFromCookie(user); if (lock == NULL) return; Mutex::Autolock alock(*lock); CameraClient* client = static_cast<CameraClient*>(getClientFromCookie(user)); if (client == NULL) return; if (!client->lockIfMessageWanted(msgType)) return; switch (msgType) { //!++ #if 1 case MTK_CAMERA_MSG_EXT_NOTIFY: client->handleMtkExtNotify(ext1, ext2); break; #endif //!-- case CAMERA_MSG_SHUTTER: // ext1 is the dimension of the yuv picture. client->handleShutter(); break; default: client->handleGenericNotify(msgType, ext1, ext2); break; } }
void CameraClient::notifyCallback(int32_t msgType, int32_t ext1, int32_t ext2, void* user) { LOG2("notifyCallback(%d)", msgType); // Ignore CAF_RESTART callbacks from Samsung's camera driver if (msgType == CAMERA_MSG_FOCUS && ext1 == 4) { LOG2("Ignore CAF_RESTART callback"); return; } #ifdef MTK_HARDWARE if (msgType == 0x40000000) { //MTK_CAMERA_MSG_EXT_NOTIFY if (ext1 == 0x11) { //MTK_CAMERA_MSG_EXT_NOTIFY_SHUTTER msgType = CAMERA_MSG_SHUTTER; } if (ext1 == 0x10) { //MTK_CAMERA_MSG_EXT_CAPTURE_DONE return; } LOG2("MtknotifyCallback(0x%x, 0x%x)", ext1, ext2); } #endif Mutex* lock = getClientLockFromCookie(user); if (lock == NULL) return; Mutex::Autolock alock(*lock); CameraClient* client = static_cast<CameraClient*>(getClientFromCookie(user)); if (client == NULL) return; if (!client->lockIfMessageWanted(msgType)) return; switch (msgType) { case CAMERA_MSG_SHUTTER: // ext1 is the dimension of the yuv picture. client->handleShutter(); break; default: client->handleGenericNotify(msgType, ext1, ext2); break; } }