Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Camera Debug Patch #1607

Open
wants to merge 1 commit into
base: celadon/r/mr0/stable
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
From a4f5fccd001b8880937065dc74f732de89bbf4ea Mon Sep 17 00:00:00 2001
From: pillaive <[email protected]>
Date: Thu, 15 Sep 2022 16:27:48 +0530
Subject: [PATCH] Camera Debug Patch

Change-Id: I8fac670c6ef6810975fc048fcbf33d889df1d3ae
---
camera/device/3.4/default/ExternalCameraDevice.cpp | 3 ++-
.../provider/2.4/default/ExternalCameraProviderImpl_2_4.cpp | 5 +++++
2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/camera/device/3.4/default/ExternalCameraDevice.cpp b/camera/device/3.4/default/ExternalCameraDevice.cpp
index 44b908b28..abd4f286f 100644
--- a/camera/device/3.4/default/ExternalCameraDevice.cpp
+++ b/camera/device/3.4/default/ExternalCameraDevice.cpp
@@ -15,7 +15,7 @@
*/

#define LOG_TAG "[email protected]"
-//#define LOG_NDEBUG 0
+#define LOG_NDEBUG 0
#include <log/log.h>

#include <algorithm>
@@ -57,6 +57,7 @@ ExternalCameraDevice::ExternalCameraDevice(
std::smatch sm;
if (std::regex_match(mDevicePath, sm, kDevicePathRE)) {
mCameraId = std::to_string(mCfg.cameraIdOffset + std::stoi(sm[1]));
+ ALOGE("VP Debug: %s mCameraId: %d mCfg.cameraIfOffset: %d \n", __FUNCTION__, mCfg.cameraIdOffset + std::stoi(sm[1]) ,mCfg.cameraIdOffset);
} else {
ALOGE("%s: device path match failed for %s", __FUNCTION__, mDevicePath.c_str());
}
diff --git a/camera/provider/2.4/default/ExternalCameraProviderImpl_2_4.cpp b/camera/provider/2.4/default/ExternalCameraProviderImpl_2_4.cpp
index 75c2e8e19..20c503076 100644
--- a/camera/provider/2.4/default/ExternalCameraProviderImpl_2_4.cpp
+++ b/camera/provider/2.4/default/ExternalCameraProviderImpl_2_4.cpp
@@ -17,6 +17,7 @@
#define LOG_TAG "[email protected]"
//#define LOG_NDEBUG 0
#include <log/log.h>
+#include <android/log.h>

#include <regex>
#include <sys/inotify.h>
@@ -52,7 +53,9 @@ bool matchDeviceName(int cameraIdOffset,
std::string* cameraDevicePath) {
std::string deviceNameStd(deviceName.c_str());
std::smatch sm;
+
if (std::regex_match(deviceNameStd, sm, kDeviceNameRE)) {
+ ALOGE("VP DEBUG: %s : Camera ID matched\n",__FUNCTION__);
if (deviceVersion != nullptr) {
*deviceVersion = sm[1];
}
@@ -61,6 +64,8 @@ bool matchDeviceName(int cameraIdOffset,
}
return true;
}
+ ALOGE("VP DEBUG: %s : Camera ID not matched\n",__FUNCTION__);
+
return false;
}

--
2.17.1

Loading