Creates an export using the given system.
30 cout <<
"\nEnter data source index [1-"<<dataSources.
collectionSize<<
"]: ";
31 int camNum = Utility::ReadInt();
39 cout <<
"\n" <<
"DataSource selected for export is : " << dataSource->
name <<
"\n";
45 int fileFormatOption = 1;
49 cout <<
"\n" <<
"Input start time for export clip(yyyy-mm-dd hh:mm:ss): ";
50 struct tm startTime = Utility::GetDateAndTimeFromUser();
51 string startTimeInUTC = Utility::ConvertLocalTimetoUTC(startTime);
54 cout <<
"\n" <<
"Input end time for export clip(yyyy-mm-dd hh:mm:ss): ";
55 struct tm endTime = Utility::GetDateAndTimeFromUser();
56 string endTimeInUTC = Utility::ConvertLocalTimetoUTC(endTime);
59 cout <<
"\n" <<
"Enter name for your export: ";
60 exportName = Utility::ReadString();
64 newExport->
format = VxExportFormat::kMkvZip;
65 Utilities::StrCopySafe(newExport->
name, exportName.c_str());
69 Utilities::StrCopySafe(exportClip->dataSourceId, dataSource->
id);
70 Utilities::StrCopySafe(exportClip->startTime, startTimeInUTC.c_str());
71 Utilities::StrCopySafe(exportClip->endTime, endTimeInUTC.c_str());
74 newExport->
clips[0] = *exportClip;
79 delete[] newExport->
clips;
81 if (exportItem !=
nullptr) {
88 if (newExp->
status == VxExportStatus::kExporting) {
89 Utility::ShowProgress(
"Exporting", static_cast<int>(newExp->
percentComplete), 100, 50);
91 else if (newExp->
status == VxExportStatus::kPending) {
92 Utility::ShowProgress(
"Pending", static_cast<int>(newExp->
percentComplete), 100, 50);
94 else if (newExp->
status == VxExportStatus::kFailed) {
95 cout <<
"\nExport failed!!\n";
98 else if (newExp->
status == VxExportStatus::kSuccessful) {
99 Utility::ShowProgress(
"Exporting", 100, 100, 50);
100 cout <<
"\nExport successfully created..\n";
106 this_thread::sleep_for(chrono::seconds(1));
112 cout <<
"\nFailed to export!!.\n";
118 cout <<
"No clips available for selected camera!!\n";
VxSdk::IVxExport * GetExport(VxSdk::IVxSystem *vxSystem, const char *expName, const char *id) const
Get an export from the VideoExpert system with given name and ID.
VxExportStatus::Value status
virtual VxResult::Value CreateExport(VxNewExport &newExport, IVxExport *&exportItem) const =0
static VxSdk::VxCollection< VxSdk::IVxClip ** > GetClips(VxSdk::IVxDataSource *dataSource)
Get a collection of clips from the given VideoExpert system.
VxExportFormat::Value format