#pragma once #include #include class VideoBuffer; namespace format { template std::string NumberToString(T number) { std::stringstream ss; ss << number; return ss.str(); } template T StringToNumber(const std::string & text) { std::stringstream ss(text); T number; return (ss >> number)?number:0; } std::string UnixtimeToDate(time_t unixtime, std::string dateFomat = "%d %b %Y"); std::string UnixtimeToDateMini(time_t unixtime); std::vector VideoBufferToPNG(const VideoBuffer & vidBuf); unsigned long CalculateCRC(unsigned char * data, int length); }