空图片的保护处理

streaming
Matthew 4 months ago
parent 7fbffb2930
commit 52e2b5f064

@ -2254,6 +2254,12 @@ bool CPhoneDevice::onOneCapture(std::shared_ptr<ACameraMetadata> characteristics
closeThread.detach();
}
if (rgb.empty())
{
TakePhotoCb(0, photoInfo, "", takingTime);
return true;
}
CPhoneDevice* pThis = this;
std::thread th([pThis, characteristics, result, photoInfo, osds, path, rgb, facing, sensorOrientation, ldr, duration, takingTime]()
{
@ -2697,11 +2703,20 @@ bool CPhoneDevice::onBurstCapture(std::shared_ptr<ACameraMetadata> characteristi
}
cv::cvtColor(rgb, rgb, cv::COLOR_RGB2BGR);
#endif // USING_EXEC_HDRP
bool res = pThis->PostProcessPhoto(photoInfo, osds, path, cameraInfo, rgb);
if (res)
if (rgb.empty())
{
// TakePhotoCb(2, photoInfo, path, takingTime);
pThis->TakePhotoCb(0, photoInfo, path, takingTime);
}
else
{
bool res = pThis->PostProcessPhoto(photoInfo, osds, path, cameraInfo, rgb);
if (res)
{
// TakePhotoCb(2, photoInfo, path, takingTime);
}
}
});
th.detach();
@ -3011,11 +3026,19 @@ bool CPhoneDevice::onBurstCapture(std::shared_ptr<ACameraMetadata> characteristi
cv::cvtColor(rgb, rgb, cv::COLOR_RGB2BGR);
}
bool res = pThis->PostProcessPhoto(photoInfo, osds, path, cameraInfo, rgb);
if (res)
if (rgb.empty())
{
pThis->TakePhotoCb(0, photoInfo, path, takingTime);
}
else
{
// TakePhotoCb(2, photoInfo, path, takingTime);
bool res = pThis->PostProcessPhoto(photoInfo, osds, path, cameraInfo, rgb);
if (res)
{
// TakePhotoCb(2, photoInfo, path, takingTime);
}
}
});
th.detach();

Loading…
Cancel
Save