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
462562b3
Commit
462562b3
authored
Jan 20, 2020
by
Sylvain Berfini
🎩
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improved error log when capture can't start
parent
c2449f6c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
android-camera2-capture.cpp
android-camera2-capture.cpp
+10
-2
No files found.
android-camera2-capture.cpp
View file @
462562b3
...
...
@@ -351,8 +351,16 @@ static void android_camera2_capture_start(AndroidCamera2Context *d) {
ms_message
(
"[Camera2 Capture] Starting capture"
);
camera_status_t
camera_status
=
ACAMERA_OK
;
if
(
d
->
captureSize
.
width
==
0
||
d
->
captureSize
.
height
==
0
||
d
->
surface
==
nullptr
)
{
ms_warning
(
"[Camera2 Capture] Filter hasn't been fully configured yet, don't start"
);
if
(
d
->
nativeWindowId
==
0
)
{
ms_error
(
"[Camera2 Capture] TextureView wasn't set (was core.setNativePreviewWindowId() called?), can't start capture!"
);
return
;
}
if
(
d
->
surface
==
nullptr
)
{
ms_error
(
"[Camera2 Capture] Failed to get a valid object to display camera preview from native window id [%p]"
,
d
->
nativeWindowId
);
return
;
}
if
(
d
->
captureSize
.
width
==
0
||
d
->
captureSize
.
height
==
0
)
{
ms_error
(
"[Camera2 Capture] Capture size hasn't been configured yet, don't start"
);
return
;
}
if
(
d
->
capturing
)
{
...
...
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