mirror of
https://github.com/kerberos-io/openalpr-base.git
synced 2025-10-06 12:06:51 +08:00
Added config parameter to control whether data is uploaded via POST
This commit is contained in:
@@ -13,5 +13,6 @@ store_plates = 0
|
|||||||
store_plates_location = /var/www/html/plates/
|
store_plates_location = /var/www/html/plates/
|
||||||
|
|
||||||
; upload address is the destination to POST to
|
; upload address is the destination to POST to
|
||||||
|
upload_data = 0
|
||||||
upload_address = http://localhost:9000/alpr/push/
|
upload_address = http://localhost:9000/alpr/push/
|
||||||
|
|
||||||
|
@@ -161,6 +161,7 @@ int main( int argc, const char** argv )
|
|||||||
|
|
||||||
bool storePlates = ini.GetBoolValue("daemon", "store_plates", false);
|
bool storePlates = ini.GetBoolValue("daemon", "store_plates", false);
|
||||||
std::string imageFolder = ini.GetValue("daemon", "store_plates_location", "/tmp/");
|
std::string imageFolder = ini.GetValue("daemon", "store_plates_location", "/tmp/");
|
||||||
|
bool uploadData = ini.GetBoolValue("daemon", "upload_data", false);
|
||||||
std::string upload_url = ini.GetValue("daemon", "upload_address", "");
|
std::string upload_url = ini.GetValue("daemon", "upload_address", "");
|
||||||
std::string site_id = ini.GetValue("daemon", "site_id", "");
|
std::string site_id = ini.GetValue("daemon", "site_id", "");
|
||||||
|
|
||||||
@@ -186,10 +187,13 @@ int main( int argc, const char** argv )
|
|||||||
|
|
||||||
tthread::thread* thread_recognize = new tthread::thread(streamRecognitionThread, (void*) tdata);
|
tthread::thread* thread_recognize = new tthread::thread(streamRecognitionThread, (void*) tdata);
|
||||||
|
|
||||||
// Kick off the data upload thread
|
if (uploadData)
|
||||||
UploadThreadData* udata = new UploadThreadData();
|
{
|
||||||
udata->upload_url = upload_url;
|
// Kick off the data upload thread
|
||||||
tthread::thread* thread_upload = new tthread::thread(dataUploadThread, (void*) udata );
|
UploadThreadData* udata = new UploadThreadData();
|
||||||
|
udata->upload_url = upload_url;
|
||||||
|
tthread::thread* thread_upload = new tthread::thread(dataUploadThread, (void*) udata );
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user