Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
BC
public
msandroidcamera2
Commits
f70e9f77
Commit
f70e9f77
authored
Oct 04, 2019
by
Sylvain Berfini
🎩
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Log camera hardware level
parent
eaf1ff2f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
1 deletion
+19
-1
android-camera2-capture.cpp
android-camera2-capture.cpp
+19
-1
No files found.
android-camera2-capture.cpp
View file @
f70e9f77
...
...
@@ -800,6 +800,24 @@ void android_camera2_capture_detect(MSWebCamManager *obj) {
int32_t
angle
=
orientation
.
data
.
i32
[
0
];
device
->
orientation
=
angle
;
ACameraMetadata_const_entry
hardwareLevel
;
ACameraMetadata_getConstEntry
(
cameraMetadata
,
ACAMERA_INFO_SUPPORTED_HARDWARE_LEVEL
,
&
hardwareLevel
);
std
::
string
supportedHardwareLevel
=
"unknown"
;
switch
(
hardwareLevel
.
data
.
u8
[
0
])
{
case
ACAMERA_INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED
:
supportedHardwareLevel
=
"limited"
;
break
;
case
ACAMERA_INFO_SUPPORTED_HARDWARE_LEVEL_FULL
:
supportedHardwareLevel
=
"full"
;
break
;
case
ACAMERA_INFO_SUPPORTED_HARDWARE_LEVEL_LEGACY
:
supportedHardwareLevel
=
"legacy"
;
break
;
case
ACAMERA_INFO_SUPPORTED_HARDWARE_LEVEL_3
:
supportedHardwareLevel
=
"3"
;
break
;
}
ACameraMetadata_const_entry
face
;
ACameraMetadata_getConstEntry
(
cameraMetadata
,
ACAMERA_LENS_FACING
,
&
face
);
bool
back_facing
=
face
.
data
.
u8
[
0
]
==
ACAMERA_LENS_FACING_BACK
;
...
...
@@ -807,7 +825,7 @@ void android_camera2_capture_detect(MSWebCamManager *obj) {
if
(
!
back_facing
)
{
facing
=
"front"
;
}
ms_message
(
"[Camera2 Capture] Camera %s is facing %s with angle %d"
,
camId
,
facing
,
angle
);
ms_message
(
"[Camera2 Capture] Camera %s is facing %s with angle %d
, hardware level is %s
"
,
camId
,
facing
,
angle
,
supportedHardwareLevel
.
c_str
()
);
device
->
back_facing
=
back_facing
;
MSWebCam
*
cam
=
ms_web_cam_new
(
&
ms_android_camera2_capture_webcam_desc
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment