diff --git a/base/src/H264Decoder.cpp b/base/src/H264Decoder.cpp index 8ba38b2f4..6c1dbe5b8 100644 --- a/base/src/H264Decoder.cpp +++ b/base/src/H264Decoder.cpp @@ -57,6 +57,13 @@ class H264Decoder::Detail { helper->process(frame); } + +#ifdef ARM64 + void closeAllThreads(frame_sp eosFrame) + { + helper->closeAllThreads(eosFrame); + } +#endif public: int mWidth; int mHeight; @@ -138,8 +145,12 @@ bool H264Decoder::init() bool H264Decoder::term() { - mDetail.reset(); +#ifdef ARM64 + auto eosFrame = frame_sp(new EoSFrame()); + mDetail->closeAllThreads(eosFrame); +#endif + mDetail.reset(); return Module::term(); } diff --git a/base/src/H264DecoderV4L2Helper.cpp b/base/src/H264DecoderV4L2Helper.cpp index afd6f565b..af9c65335 100644 --- a/base/src/H264DecoderV4L2Helper.cpp +++ b/base/src/H264DecoderV4L2Helper.cpp @@ -1385,8 +1385,9 @@ int h264DecoderV4L2Helper::process(frame_sp inputFrame) } return true; } -h264DecoderV4L2Helper::~h264DecoderV4L2Helper() +void h264DecoderV4L2Helper::closeAllThreads(frame_sp eosFrame) { + process(eosFrame); if (ctx.fd != -1) { if (ctx.dec_capture_thread) diff --git a/base/src/H264DecoderV4L2Helper.h b/base/src/H264DecoderV4L2Helper.h index 7686d30ce..eb8e9193e 100644 --- a/base/src/H264DecoderV4L2Helper.h +++ b/base/src/H264DecoderV4L2Helper.h @@ -147,7 +147,7 @@ class h264DecoderV4L2Helper * Refer to [V4L2 Video Decoder](group__V4L2Dec.html) for more information on the decoder. */ h264DecoderV4L2Helper() {} - ~h264DecoderV4L2Helper(); // + ~h264DecoderV4L2Helper() {}; typedef struct { uint32_t decode_pixfmt; @@ -385,6 +385,7 @@ class h264DecoderV4L2Helper bool init(std::function send, std::function makeFrame); + void closeAllThreads(frame_sp eosFrame); protected: boost::shared_ptr mBuffer; context_t ctx; diff --git a/base/test/jpegdecoderl4tm_tests.cpp b/base/test/jpegdecoderl4tm_tests.cpp index 09a3be852..1d9b8c7e3 100755 --- a/base/test/jpegdecoderl4tm_tests.cpp +++ b/base/test/jpegdecoderl4tm_tests.cpp @@ -66,7 +66,7 @@ BOOST_AUTO_TEST_CASE(jpegdecoderl4tm_basic, * boost::unit_test::disabled()) delete[] pReadData; } -BOOST_AUTO_TEST_CASE(jpegdecoderl4tm_rgb) +BOOST_AUTO_TEST_CASE(jpegdecoderl4tm_rgb, * boost::unit_test::disabled()) { const uint8_t* pReadData = nullptr; unsigned int readDataSize = 0U; @@ -109,7 +109,7 @@ BOOST_AUTO_TEST_CASE(jpegdecoderl4tm_rgb) delete[] pReadData; } -BOOST_AUTO_TEST_CASE(jpegdecoderl4tm_mono) +BOOST_AUTO_TEST_CASE(jpegdecoderl4tm_mono, * boost::unit_test::disabled()) { const uint8_t* pReadData = nullptr; unsigned int readDataSize = 0U; diff --git a/base/test/jpegencoderl4tm_tests.cpp b/base/test/jpegencoderl4tm_tests.cpp index ba688ec3b..d62d66e72 100755 --- a/base/test/jpegencoderl4tm_tests.cpp +++ b/base/test/jpegencoderl4tm_tests.cpp @@ -18,7 +18,7 @@ BOOST_AUTO_TEST_SUITE(jpegencoderl4tm_tests) -BOOST_AUTO_TEST_CASE(jpegencoderl4tm_basic) +BOOST_AUTO_TEST_CASE(jpegencoderl4tm_basic, * boost::unit_test::disabled()) { // metadata is known auto width = 3840; @@ -63,7 +63,7 @@ BOOST_AUTO_TEST_CASE(jpegencoderl4tm_basic) Test_Utils::saveOrCompare("./data/testOutput/frame_test_l4tm.jpg", (const uint8_t *)encodedImageFrame->data(), encodedImageFrame->size(), 0); } -BOOST_AUTO_TEST_CASE(jpegencoderl4tm_rgb) +BOOST_AUTO_TEST_CASE(jpegencoderl4tm_rgb, * boost::unit_test::disabled()) { // metadata is known auto width = 1280; @@ -109,7 +109,7 @@ BOOST_AUTO_TEST_CASE(jpegencoderl4tm_rgb) Test_Utils::saveOrCompare("./data/testOutput/jpegencoderl4tm_frame_1280x720_rgb.jpg", (const uint8_t *)encodedImageFrame->data(), encodedImageFrame->size(), 0); } -BOOST_AUTO_TEST_CASE(jpegencoderl4tm_basic_scale) +BOOST_AUTO_TEST_CASE(jpegencoderl4tm_basic_scale, * boost::unit_test::disabled()) { // metadata is known auto width = 3840; diff --git a/base/test/l4tm_dec_enc_1_tests.cpp b/base/test/l4tm_dec_enc_1_tests.cpp index 3f6cd6b69..dda0dd15c 100755 --- a/base/test/l4tm_dec_enc_1_tests.cpp +++ b/base/test/l4tm_dec_enc_1_tests.cpp @@ -20,7 +20,7 @@ int startIndex = 0; int endIndex = -1; bool sw = false; -BOOST_AUTO_TEST_CASE(sample) +BOOST_AUTO_TEST_CASE(sample, * boost::unit_test::disabled()) { LoggerProps loggerProps; loggerProps.logLevel = boost::log::trivial::severity_level::info;