Logo
ApraPipes 1.0
Loading...
Searching...
No Matches
Mp4WriterSinkUtils.h
1#include <ctime>
2#include <chrono>
3#include <string>
4#include <boost/filesystem.hpp>
5
7{
8public:
10 void getFilenameForNextFrame(std::string& nextFrameFileName ,uint64_t &timestamp, std::string &basefolder,
11 uint32_t chunkTimeInMinutes, uint32_t syncTimeInSeconds, bool &syncFlag,short& frameType, short naluType);
12 void parseTSJpeg(uint64_t &tm, uint32_t &chunkTimeInMinutes, uint32_t & syncTimeInSeconds,
13 boost::filesystem::path &relPath, std::string &mp4FileName, bool &syncFlag, std::string baseFolder, std::string& nextFrameFileName);
14 void parseTSH264(uint64_t& tm, uint32_t& chunkTimeInMinutes, uint32_t& syncTimeInSeconds,boost::filesystem::path& relPath,
15 std::string& mp4FileName, bool& syncFlag,short frameType, short naluType, std::string baseFolder, std::string& nextFrameFileName);
16 bool customNamedFileDirCheck(std::string baseFolder, uint32_t chunkTimeInMinutes, boost::filesystem::path relPath, std::string& nextFrameFileName);
17 std::string format_hrs(int &hr);
18 std::string format_2(int &min);
19 std::string filePath(boost::filesystem::path relPath, std::string mp4FileName, std::string baseFolder, uint64_t chunkTimeInMins);
21private:
23 std::time_t lastVideoTS;
24 std::string lastVideoName;
25 std::time_t lastSyncTS;
26 std::string currentFolder;
27 boost::filesystem::path lastVideoFolderPath;
29};
Definition Mp4WriterSinkUtils.h:7
std::string filePath(boost::filesystem::path relPath, std::string mp4FileName, std::string baseFolder, uint64_t chunkTimeInMins)
Definition Mp4WriterSinkUtils.cpp:39
Mp4WriterSinkUtils()
Definition Mp4WriterSinkUtils.cpp:9
void getFilenameForNextFrame(std::string &nextFrameFileName, uint64_t &timestamp, std::string &basefolder, uint32_t chunkTimeInMinutes, uint32_t syncTimeInSeconds, bool &syncFlag, short &frameType, short naluType)
Definition Mp4WriterSinkUtils.cpp:233
std::string format_2(int &min)
Definition Mp4WriterSinkUtils.cpp:27
std::time_t lastVideoTS
Definition Mp4WriterSinkUtils.h:23
std::string currentFolder
Definition Mp4WriterSinkUtils.h:26
std::string tempNextFrameFileName
Definition Mp4WriterSinkUtils.h:28
bool customNamedFileDirCheck(std::string baseFolder, uint32_t chunkTimeInMinutes, boost::filesystem::path relPath, std::string &nextFrameFileName)
Definition Mp4WriterSinkUtils.cpp:68
void parseTSJpeg(uint64_t &tm, uint32_t &chunkTimeInMinutes, uint32_t &syncTimeInSeconds, boost::filesystem::path &relPath, std::string &mp4FileName, bool &syncFlag, std::string baseFolder, std::string &nextFrameFileName)
Definition Mp4WriterSinkUtils.cpp:106
~Mp4WriterSinkUtils()
Definition Mp4WriterSinkUtils.cpp:251
boost::filesystem::path lastVideoFolderPath
Definition Mp4WriterSinkUtils.h:27
int lastVideoMinute
Definition Mp4WriterSinkUtils.h:22
void parseTSH264(uint64_t &tm, uint32_t &chunkTimeInMinutes, uint32_t &syncTimeInSeconds, boost::filesystem::path &relPath, std::string &mp4FileName, bool &syncFlag, short frameType, short naluType, std::string baseFolder, std::string &nextFrameFileName)
Definition Mp4WriterSinkUtils.cpp:155
std::time_t lastSyncTS
Definition Mp4WriterSinkUtils.h:25
std::string lastVideoName
Definition Mp4WriterSinkUtils.h:24
std::string format_hrs(int &hr)
Definition Mp4WriterSinkUtils.cpp:15