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

Linux: Delete unreasonable log processing flow #140

Merged
merged 1 commit into from
Dec 18, 2024
Merged
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
27 changes: 8 additions & 19 deletions src/core/CameraBuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,28 +54,17 @@ CameraBuffer::CameraBuffer(int cameraId, int usage, int memory, uint32_t size, i
mU->flags = BUFFER_FLAG_INTERNAL;
mU->sequence = -1;

switch (usage) {
case BUFFER_USAGE_PSYS_INPUT:
// follow through
case BUFFER_USAGE_PSYS_INTERNAL:
case BUFFER_USAGE_GENERAL:
if (PlatformData::isIsysEnabled(cameraId) &&
PlatformData::isCSIFrontEndCapture(cameraId)) {
num_plane = CameraUtils::getNumOfPlanes(format);
}
break;
case BUFFER_USAGE_MIPI_CAPTURE:
case BUFFER_USAGE_METADATA:
num_plane = CameraUtils::getNumOfPlanes(format);
break;
default:
LOGE("Not supported Usage");
break;
}

CLEAR(mMmapAddrs);
CLEAR(mDmaFd);

if ((usage == BUFFER_USAGE_PSYS_INPUT || usage == BUFFER_USAGE_PSYS_INTERNAL ||
usage == BUFFER_USAGE_GENERAL) &&
(PlatformData::isIsysEnabled(cameraId) && PlatformData::isCSIFrontEndCapture(cameraId))) {
num_plane = CameraUtils::getNumOfPlanes(format);
} else if (usage == BUFFER_USAGE_MIPI_CAPTURE || usage == BUFFER_USAGE_METADATA) {
num_plane = CameraUtils::getNumOfPlanes(format);
}

initBuffer(memory, v4l2BufType, size, index, num_plane);
}

Expand Down
Loading