Skip to content

Commit

Permalink
clean up CMakelists.txt and resolve unknown exception in H264Encoder
Browse files Browse the repository at this point in the history
  • Loading branch information
kushaljain-apra committed May 30, 2024
1 parent a37234b commit 7877803
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 42 deletions.
39 changes: 2 additions & 37 deletions base/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -554,16 +554,7 @@ SET(UT_FILES
test/test_utils.h
test/filewritermodule_tests.cpp
test/logger_tests.cpp
test/filewritermodule_tests.cpp
test/logger_tests.cpp
# test/logger_stress_tests.cpp #todo this test needs to be improved and added
test/quepushstrategy_tests.cpp
test/framesmuxer_tests.cpp
test/filereadermodule_tests.cpp
test/merge_tests.cpp
test/split_tests.cpp
test/imagemetadata_tests.cpp
test/bmpconverter_tests.cpp
# test/logger_stress_tests.cpp #todo this test needs to be improved and added
test/quepushstrategy_tests.cpp
test/framesmuxer_tests.cpp
test/filereadermodule_tests.cpp
Expand All @@ -590,38 +581,12 @@ SET(UT_FILES
test/textoverlayxform_tests.cpp
test/mp4writersink_tests.cpp
test/pipeline_tests.cpp
test/findexstrategy_tests.cpp
test/jpegdecodercv_tests.cpp
test/Imageresizecv_tests.cpp
test/faciallandmarkscv_tests.cpp
test/imageviewermodule_tests.cpp
test/ImageEncodeCV_tests.cpp
test/rotatecv_tests.cpp
test/affinetransform_tests.cpp
test/brightness_contrast_tests.cpp
test/virtualptz_tests.cpp
test/webcam_source_tests.cpp
test/facedetectorXform_tests.cpp
test/sound_record_tests.cpp
test/pullstratergy_tests.cpp
test/QRReader_tests.cpp
test/textoverlayxform_tests.cpp
test/mp4writersink_tests.cpp
test/pipeline_tests.cpp
# test/multiple_pipeline_tests.cpp #todo this test needs to be improved and added
test/valveModule_tests.cpp
test/color_conversion_tests.cpp
test/archivespacemanager_tests.cpp
test/multimediaqueuexform_tests.cpp
test/mp4readersource_tests.cpp
test/rtsp_client_tests.cpp
test/valveModule_tests.cpp
test/color_conversion_tests.cpp
test/archivespacemanager_tests.cpp
test/multimediaqueuexform_tests.cpp
test/mp4readersource_tests.cpp
test/rtsp_client_tests.cpp
test/rtsp_client_tests.cpp
test/mp4readersource_tests.cpp
test/rtsp_client_tests.cpp
test/motionvector_extractor_and_overlay_tests.cpp
test/mp4_reverse_play_tests.cpp
Expand Down
10 changes: 5 additions & 5 deletions base/src/H264Decoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ void H264Decoder::bufferBackwardEncodedFrames(frame_sp& frame, short naluType)
}
// insert frames into the latest gop until I frame comes.
latestBackwardGop.emplace_back(frame);
H264Utils::H264_NAL_TYPE nalTypeAfterSpsPps;
H264Utils::H264_NAL_TYPE nalTypeAfterSpsPps = (H264Utils::H264_NAL_TYPE)1;
if(naluType == H264Utils::H264_NAL_TYPE_SEQ_PARAM)
{
nalTypeAfterSpsPps = H264Utils::getNalTypeAfterSpsPps(frame->data(), frame->size());
Expand Down Expand Up @@ -244,7 +244,7 @@ void H264Decoder::bufferAndDecodeForwardEncodedFrames(frame_sp& frame, short nal
if (!latestForwardGop.empty())
{
short naluTypeOfForwardGopFirstFrame = H264Utils::getNALUType((char*)latestForwardGop.front()->data());
H264Utils::H264_NAL_TYPE nalTypeAfterSpsPpsOfForwardGopFirstFrame;
H264Utils::H264_NAL_TYPE nalTypeAfterSpsPpsOfForwardGopFirstFrame = (H264Utils::H264_NAL_TYPE)1;
if(naluTypeOfForwardGopFirstFrame == H264Utils::H264_NAL_TYPE_SEQ_PARAM)
{
nalTypeAfterSpsPpsOfForwardGopFirstFrame = H264Utils::getNalTypeAfterSpsPps(latestForwardGop.front()->data(), latestForwardGop.front()->size());
Expand Down Expand Up @@ -295,7 +295,7 @@ void H264Decoder::bufferAndDecodeForwardEncodedFrames(frame_sp& frame, short nal

/* buffer fwd GOP and send the current frame */
// new GOP starts
H264Utils::H264_NAL_TYPE nalTypeAfterSpsPpsOfCurrentFrame;
H264Utils::H264_NAL_TYPE nalTypeAfterSpsPpsOfCurrentFrame = (H264Utils::H264_NAL_TYPE)1;
if(naluType == H264Utils::H264_NAL_TYPE_SEQ_PARAM)
{
nalTypeAfterSpsPpsOfCurrentFrame = H264Utils::getNalTypeAfterSpsPps(frame->data(), frame->size());
Expand All @@ -313,7 +313,7 @@ void H264Decoder::bufferAndDecodeForwardEncodedFrames(frame_sp& frame, short nal
// If direction changed to forward in the middle of GOP (Even the latest gop of backward was half and not decoded) , Then we drop the P frames until next I frame.
// We also remove the entries of P frames from the incomingFramesTSQ.
short latestForwardGopFirstFrameNaluType = H264Utils::getNALUType((char*)latestForwardGop.begin()->get()->data());
H264Utils::H264_NAL_TYPE naluTypeAfterSpsPpsOfLatestForwardGopFirstFrame;
H264Utils::H264_NAL_TYPE naluTypeAfterSpsPpsOfLatestForwardGopFirstFrame = (H264Utils::H264_NAL_TYPE)1;
if(latestForwardGopFirstFrameNaluType == H264Utils::H264_NAL_TYPE_SEQ_PARAM)
{
naluTypeAfterSpsPpsOfLatestForwardGopFirstFrame = H264Utils::getNalTypeAfterSpsPps(latestForwardGop.front()->data(), latestForwardGop.front()->size());
Expand Down Expand Up @@ -478,7 +478,7 @@ bool H264Decoder::process(frame_container& frames)
return true;
}

H264Utils::H264_NAL_TYPE nalTypeAfterSpsPpsCurrentFrame;
H264Utils::H264_NAL_TYPE nalTypeAfterSpsPpsCurrentFrame = (H264Utils::H264_NAL_TYPE)1;
if(naluType == H264Utils::H264_NAL_TYPE_SEQ_PARAM)
{
nalTypeAfterSpsPpsCurrentFrame = H264Utils::getNalTypeAfterSpsPps(frame->data(), frame->size());
Expand Down

0 comments on commit 7877803

Please sign in to comment.