summaryrefslogtreecommitdiff
path: root/src/android
diff options
context:
space:
mode:
Diffstat (limited to 'src/android')
-rw-r--r--src/android/camera_device.cpp19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp
index 3be2dac2..d3a53c94 100644
--- a/src/android/camera_device.cpp
+++ b/src/android/camera_device.cpp
@@ -369,12 +369,19 @@ int CameraDevice::initializeStreamConfigurations()
const std::vector<PixelFormat> &libcameraFormats =
camera3Format.libcameraFormats;
+ LOG(HAL, Debug) << "Trying to map Android format "
+ << camera3Format.name;
+
/*
* JPEG is always supported, either produced directly by the
* camera, or encoded in the HAL.
*/
if (androidFormat == HAL_PIXEL_FORMAT_BLOB) {
formatsMap_[androidFormat] = formats::MJPEG;
+ LOG(HAL, Debug) << "Mapped Android format "
+ << camera3Format.name << " to "
+ << formats::MJPEG.toString()
+ << " (fixed mapping)";
continue;
}
@@ -385,6 +392,8 @@ int CameraDevice::initializeStreamConfigurations()
PixelFormat mappedFormat;
for (const PixelFormat &pixelFormat : libcameraFormats) {
+ LOG(HAL, Debug) << "Testing " << pixelFormat.toString();
+
/*
* The stream configuration size can be adjusted,
* not the pixel format.
@@ -420,14 +429,22 @@ int CameraDevice::initializeStreamConfigurations()
* stream configurations map, by testing the image resolutions.
*/
formatsMap_[androidFormat] = mappedFormat;
+ LOG(HAL, Debug) << "Mapped Android format "
+ << camera3Format.name << " to "
+ << mappedFormat.toString();
for (const Size &res : cameraResolutions) {
cfg.pixelFormat = mappedFormat;
cfg.size = res;
CameraConfiguration::Status status = cameraConfig->validate();
- if (status != CameraConfiguration::Valid)
+ if (status != CameraConfiguration::Valid) {
+ LOG(HAL, Debug) << cfg.toString()
+ << " not supported";
continue;
+ }
+
+ LOG(HAL, Debug) << cfg.toString() << " supported";
streamConfigurations_.push_back({ res, androidFormat });
ng into account Affirmer's express Statement of Purpose. In addition, to the extent the Waiver is so judged Affirmer hereby grants to each affected person a royalty-free, non transferable, non sublicensable, non exclusive, irrevocable and unconditional license to exercise Affirmer's Copyright and Related Rights in the Work (i) in all territories worldwide, (ii) for the maximum duration provided by applicable law or treaty (including future time extensions), (iii) in any current or future medium and for any number of copies, and (iv) for any purpose whatsoever, including without limitation commercial, advertising or promotional purposes (the "License"). The License shall be deemed effective as of the date CC0 was applied by Affirmer to the Work. Should any part of the License for any reason be judged legally invalid or ineffective under applicable law, such partial invalidity or ineffectiveness shall not invalidate the remainder of the License, and in such case Affirmer hereby affirms that he or she will not (i) exercise any of his or her remaining Copyright and Related Rights in the Work or (ii) assert any associated claims and causes of action with respect to the Work, in either case contrary to Affirmer's express Statement of Purpose. 4. Limitations and Disclaimers. a. No trademark or patent rights held by Affirmer are waived, abandoned, surrendered, licensed or otherwise affected by this document. b. Affirmer offers the Work as-is and makes no representations or warranties of any kind concerning the Work, express, implied, statutory or otherwise, including without limitation warranties of title, merchantability, fitness for a particular purpose, non infringement, or the absence of latent or other defects, accuracy, or the present or absence of errors, whether or not discoverable, all to the greatest extent permissible under applicable law. c. Affirmer disclaims responsibility for clearing rights of other persons that may apply to the Work or any use thereof, including without limitation any person's Copyright and Related Rights in the Work. Further, Affirmer disclaims responsibility for obtaining any necessary consents, permissions or other rights required for any use of the Work. d. Affirmer understands and acknowledges that Creative Commons is not a party to this document and has no duty or obligation with respect to this CC0 or use of the Work.