v1.3.t2 Update
Added a -v command line option to display the application's current version. The application version is now defined in a single a const value called APP_VER so bumping the version number now means updating this single value in common.h. Versioning scheme will now be major.minor.[test_rev]. test_rev will be t1, 2, 3, etc... as updates are pushed to the test branch. all code pushes to master shall bump major or minor and then remove test_rev. Removed the detect loop's motion latching affect so it ONLY calls wrOut if the video clip contains motion. Fixed a bug in the recording loop that fail to create the needed sub-dir before calling FFMPEG.
This commit is contained in:
parent
bf3de932d1
commit
56bd855dbb
|
@ -22,7 +22,7 @@ The config file is a simple text file that contain parameters that dictate the
|
|||
behavior of the application. Below is an example of a config file with all
|
||||
parameters supported and descriptions of each parameter.
|
||||
```
|
||||
# Motion Watch config file v1.3
|
||||
# Motion Watch config file
|
||||
#
|
||||
# note all lines in this config file that starts with a '#' are ignored.
|
||||
# also note to avoid using empty lines. if you're going to need an empty
|
||||
|
|
|
@ -33,7 +33,8 @@ using namespace cv;
|
|||
using namespace std;
|
||||
using namespace std::filesystem;
|
||||
|
||||
#define BUF_SZ 10
|
||||
#define BUF_SZ 10
|
||||
#define APP_VER "1.3.t2"
|
||||
|
||||
struct shared_t
|
||||
{
|
||||
|
@ -57,7 +58,6 @@ struct shared_t
|
|||
int blockY;
|
||||
int maxDays;
|
||||
int retCode;
|
||||
|
||||
};
|
||||
|
||||
string genTmpFile(const string &dirOut, const string &ext, shared_t *share);
|
||||
|
|
15
src/main.cpp
15
src/main.cpp
|
@ -26,11 +26,7 @@ void detectLoop(shared_t *share)
|
|||
Rect blockArea;
|
||||
Mat blockImg;
|
||||
|
||||
if (share->skipCmd)
|
||||
{
|
||||
wrOut(bufFiles[0], share);
|
||||
}
|
||||
else if (moDetect(bufFiles[0], &blockArea, &blockImg, share))
|
||||
if (moDetect(bufFiles[0], &blockArea, &blockImg, share))
|
||||
{
|
||||
if (objectInImage(blockImg, blockArea))
|
||||
{
|
||||
|
@ -59,6 +55,8 @@ void recLoop(shared_t *share)
|
|||
{
|
||||
while (rdConf(share))
|
||||
{
|
||||
createDirTree(share->buffDir);
|
||||
|
||||
auto bufPath = cleanDir(share->buffDir) + "/%03d." + share->vidExt;
|
||||
auto secs = to_string(share->secs);
|
||||
auto limSecs = to_string(share->secs + 3);
|
||||
|
@ -87,10 +85,15 @@ int main(int argc, char** argv)
|
|||
|
||||
if (parseForParam("-h", argc, argv, true) == "true")
|
||||
{
|
||||
cout << "Motion Watch v1.3" << endl << endl;
|
||||
cout << "Motion Watch " << APP_VER << endl << endl;
|
||||
cout << "Usage: mow <argument>" << endl << endl;
|
||||
cout << "-h : display usage information about this application." << endl;
|
||||
cout << "-c : path to the config file." << endl;
|
||||
cout << "-v : display the current version." << endl;
|
||||
}
|
||||
if (parseForParam("-v", argc, argv, true) == "true")
|
||||
{
|
||||
cout << APP_VER << endl;
|
||||
}
|
||||
else if (sharedRes.conf.empty())
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue
Block a user