Skip to content

Commit

Permalink
Merge branch 'ApraNVR_CommonBuild' of https://github.com/Apra-Labs/Ap…
Browse files Browse the repository at this point in the history
…raPipes into ApraNVR_CommonBuild
  • Loading branch information
Ankush Jain committed Jun 28, 2024
2 parents 1f713f9 + a2d9cb7 commit 0971182
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
8 changes: 6 additions & 2 deletions base/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,13 @@ IF(ENABLE_LINUX)
pkg_check_modules(GLFW REQUIRED glfw3)
ENDIF()

IF(ENABLE_LINUX AND NOT ENABLE_ARM64)
pkg_check_modules(GTK3 REQUIRED gtk+-3.0)
IF(ENABLE_ARM64)
set(ENV{PKG_CONFIG_PATH} "/usr/lib/aarch64-linux-gnu/pkgconfig:/usr/share/pkgconfig")
ENDIF(ENABLE_ARM64)

IF(ENABLE_LINUX)
pkg_check_modules(GDK3 REQUIRED gdk-3.0)
pkg_check_modules(GTK3 REQUIRED gtk+-3.0)
ENDIF()

IF(ENABLE_CUDA)
Expand Down
7 changes: 7 additions & 0 deletions base/src/H264EncoderV4L2Helper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ H264EncoderV4L2Helper::enableMotionVectorReporting()
control.value = 1;

setExtControlsMV(ctrls);
return 1;
}

void H264EncoderV4L2Helper::initEncoderParams(uint32_t bitrate, uint32_t fps)
Expand Down Expand Up @@ -265,6 +266,8 @@ H264EncoderV4L2Helper::getMotionVectors(uint32_t buffer_index,
control.string = (char *)&metadata;

getExtControls(ctrls);

return 1;
}

void H264EncoderV4L2Helper::serializeMotionVectors(v4l2_ctrl_videoenc_outputbuf_metadata_MV enc_mv_metadata, frame_container &frames)
Expand Down Expand Up @@ -347,6 +350,8 @@ bool H264EncoderV4L2Helper::process(frame_sp& frame)

mConverter->process(frame, buffer);
mOutputPlane->qBuffer(buffer->getIndex());

return true;
}

bool H264EncoderV4L2Helper::processEOS()
Expand All @@ -361,4 +366,6 @@ bool H264EncoderV4L2Helper::processEOS()
mOutputPlane->qBuffer(buffer->getIndex());

mCapturePlane->waitForDQThread(2000); // blocking call - waits for 2 secs for thread to exit

return true;
}

0 comments on commit 0971182

Please sign in to comment.