Skip to content

Commit

Permalink
removed not required libs and file formatting.
Browse files Browse the repository at this point in the history
  • Loading branch information
AdityaKBhadragond14 committed Jun 18, 2024
1 parent 06f679e commit 133d93b
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 34 deletions.
14 changes: 1 addition & 13 deletions base/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -621,27 +621,15 @@ test

target_link_libraries(aprapipessampleut
aprapipes
${JPEG_LIBRARIES}
${LIBMP4_LIB}
${OPENH264_LIB}
${Boost_LIBRARIES}
${FFMPEG_LIBRARIES}
${OpenCV_LIBRARIES}
${JETSON_LIBS}
${NVCUDAToolkit_LIBS}
${NVCODEC_LIB}
${NVJPEGLIB_L4T}
${CURSES_LIBRARIES}
ZXing::Core
ZXing::ZXing
BZip2::BZip2
ZLIB::ZLIB
liblzma::liblzma
bigint::bigint
sfml-audio
whisper::whisper
)

target_link_libraries(aprapipesut
aprapipes
${JPEG_LIBRARIES}
Expand Down
2 changes: 0 additions & 2 deletions samples/timelapse-sample/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ target_link_libraries(
${Boost_LIBRARIES}
${FFMPEG_LIBRARIES}
${OpenCV_LIBRARIES}
${JETSON_LIBS}
${NVCUDAToolkit_LIBS}
${NVCODEC_LIB}
${NVJPEGLIB_L4T}
)
40 changes: 21 additions & 19 deletions samples/timelapse-sample/timelapse_summary.cpp
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
#include "Mp4ReaderSource.h"
#include "MotionVectorExtractor.h"
#include "Mp4WriterSink.h"
#include "H264Metadata.h"
#include "PipeLine.h"
#include "OverlayModule.h"
#include "ImageViewerModule.h"
#include "Mp4VideoMetadata.h"
#include "H264EncoderNVCodec.h"
#include "timelapse_summary.h"
#include "ColorConversionXForm.h"
#include "CudaMemCopy.h"
#include "CudaStreamSynchronize.h"
#include "ColorConversionXForm.h"
#include "ExternalSinkModule.h"
#include "FileWriterModule.h"
#include "timelapse_summary.h"
#include "H264EncoderNVCodec.h"
#include "H264Metadata.h"
#include "ImageViewerModule.h"
#include "MotionVectorExtractor.h"
#include "Mp4ReaderSource.h"
#include "Mp4VideoMetadata.h"
#include "Mp4WriterSink.h"
#include "OverlayModule.h"
#include "PipeLine.h"
#include <boost/test/unit_test.hpp>
#include "ExternalSinkModule.h"

TimelapsePipeline::TimelapsePipeline()
: timelapseSamplePipeline("test"), mCudaStream_(new ApraCudaStream()),
Expand All @@ -34,29 +34,31 @@ bool TimelapsePipeline::setupPipeline(const std::string &videoPath,
Mp4ReaderSourceProps(videoPath, false, 0, true, false, false);
mp4ReaderProps.parseFS = true;
mp4ReaderProps.readLoop = false;
//mp4Reader module is being used here to read the .mp4 videos
// mp4Reader module is being used here to read the .mp4 videos
mMp4Reader =
boost::shared_ptr<Mp4ReaderSource>(new Mp4ReaderSource(mp4ReaderProps));
auto motionExtractorProps = MotionVectorExtractorProps(
MotionVectorExtractorProps::MVExtractMethod::OPENH264, sendDecodedFrames,
2);
//motionVectorExtractor module is being used to get the frames for the defined thershold
// motionVectorExtractor module is being used to get the frames for the
// defined thershold
mMotionExtractor = boost::shared_ptr<MotionVectorExtractor>(
new MotionVectorExtractor(motionExtractorProps));
//convert frames from BGR to RGB
// convert frames from BGR to RGB
mColorchange1 = boost::shared_ptr<ColorConversion>(new ColorConversion(
ColorConversionProps(ColorConversionProps::BGR_TO_RGB)));
//convert frames from RGB to YUV420PLANAR
//the two step color change is done because H264Encoder takes YUV data and we don't have direct BGR to YUV.
// convert frames from RGB to YUV420PLANAR
// the two step color change is done because H264Encoder takes YUV data
mColorchange2 = boost::shared_ptr<ColorConversion>(new ColorConversion(
ColorConversionProps(ColorConversionProps::RGB_TO_YUV420PLANAR)));
mSync = boost::shared_ptr<Module>(
new CudaStreamSynchronize(CudaStreamSynchronizeProps(mCudaStream_)));
mEncoder = boost::shared_ptr<Module>(new H264EncoderNVCodec(
H264EncoderNVCodecProps(bitRateKbps, mCuContext, gopLength, frameRate,
profile, enableBFrames)));
//write the output video
auto mp4WriterSinkProps = Mp4WriterSinkProps(UINT32_MAX, 10, 24, outFolderPath, true);
// write the output video
auto mp4WriterSinkProps =
Mp4WriterSinkProps(UINT32_MAX, 10, 24, outFolderPath, true);
mp4WriterSinkProps.recordedTSBasedDTS = false;
mMp4WriterSink =
boost::shared_ptr<Module>(new Mp4WriterSink(mp4WriterSinkProps));
Expand Down

0 comments on commit 133d93b

Please sign in to comment.