Skip to content

Commit

Permalink
CMake: fix BUILD_PERFORMANCE
Browse files Browse the repository at this point in the history
  • Loading branch information
KangLin committed Aug 15, 2023
1 parent 19dded4 commit a31fa0e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion Src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ set(SOURCE_FILES
database/Database.cpp
database/DataRegister.cpp
database/TableRegister.cpp
Performance.cpp
)

set(INSTALLHEADER_FILES
Expand Down Expand Up @@ -97,7 +98,7 @@ ADD_TARGET(NAME ${PROJECT_NAME}
PRIVATE_DEFINITIONS
FaceRecognizer_VERSION="${FaceRecognizer_VERSION}"
FaceRecognizer_REVISION="${FaceRecognizer_REVISION}"
DEFINITIONS RABBITCOMMON ${LIBS_DEFINES}
DEFINITIONS RABBITCOMMON ${LIBS_DEFINES} BUILD_PERFORMANCE
SOURCE_FILES ${SOURCE_FILES} ${HEADER_FILES} ${RCC_FILES}
INSTALL_HEADER_FILES "${INSTALLHEADER_FILES}"
OPTIONS ${FACERECOGNIZER_OPTIONS}
Expand Down
2 changes: 1 addition & 1 deletion Src/Performance.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#define RETURN(value)
#else
#define PERFORMANCE(name) \
CPerformance object##name (#name);
CPerformance object##name(#name);
#define PERFORMANCE_START(name) object##name.StartTime();
#define PERFORMANCE_ADD_TIME(name, message) \
object##name.AddTime(__FILE__, __LINE__, __FUNCTION__, message);
Expand Down
4 changes: 3 additions & 1 deletion Src/Plugins/FFmpge/ConverFormatFFmpeg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ int CConverFormatFFmpeg::SetFFmpegLog()
return 0;
}

// See: https://blog.csdn.net/u014260892/article/details/51883723
AVPixelFormat CConverFormatFFmpeg::QVideoFrameFormatToFFMpegPixFormat(
const QVideoFrame::PixelFormat format)
{
Expand Down Expand Up @@ -77,7 +78,8 @@ QImage CConverFormatFFmpeg::onConverFormatToRGB888(const QVideoFrame &frame)
QImage::Format_RGB888);
#if LIBAVUTIL_VERSION_MAJOR >= 55
nRet = av_image_fill_arrays(outPic->data, outPic->linesize,
img.bits(), AV_PIX_FMT_RGB24, img.width(), img.height(), 1);
img.bits(), AV_PIX_FMT_RGB24,
img.width(), img.height(), 1);
#else
nRet = avpicture_fill((AVPicture *)outPic, videoFrame.bits(),
QVideoFrameFormatToFFMpegPixFormat(videoFrame.pixelFormat()),
Expand Down

0 comments on commit a31fa0e

Please sign in to comment.