Changeset 32553 for trunk/psvideophot/src/psvideoLoop.c
- Timestamp:
- Oct 14, 2011, 1:17:03 PM (15 years ago)
- File:
-
- 1 edited
-
trunk/psvideophot/src/psvideoLoop.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psvideophot/src/psvideoLoop.c
r31813 r32553 44 44 } 45 45 46 psString class_id = psMetadataLookupStr(&status, config->arguments, "CLASS_ID"); 47 psString cell_id = psMetadataLookupStr(&status, config->arguments, "CELL_ID"); 48 46 49 47 50 pmConfigCamerasCull(config, NULL); … … 59 62 while ((chip = pmFPAviewNextChip(view, input->fpa, 1)) != NULL) { 60 63 psLogMsg ("psvideophotLoop", 4, "Chip %d: %x %x\n", view->chip, chip->file_exists, chip->process); 64 psString chipName = psMetadataLookupStr(&status, chip->concepts, "CHIP.NAME"); 65 if (strcmp(chipName, class_id)) { 66 continue; 67 } 61 68 if (!chip->process || !chip->file_exists) { 62 continue;69 ESCAPE("target chip has no data"); 63 70 } 64 71 if (!pmFPAfileIOChecks(config, view, PM_FPA_BEFORE)) { 65 72 ESCAPE("load failure for Chip"); 66 73 } 74 (void) class_id; 67 75 68 76 double threshold = THRESHOLD; … … 72 80 while ((cell = pmFPAviewNextCell(view, input->fpa, 1)) != NULL) { 73 81 psLogMsg ("psvideophotLoop", 5, "Cell %d: %x %x\n", view->cell, cell->file_exists, cell->process); 82 psString cellName = psMetadataLookupStr(&status, cell->concepts, "CELL.NAME"); 83 if (strcmp(cellName, cell_id)) { 84 continue; 85 } 74 86 if (!cell->process || !cell->file_exists) { 75 continue;87 ESCAPE("target cell has no data"); 76 88 } 77 89 if (!pmFPAfileIOChecks(config, view, PM_FPA_BEFORE)) { 78 90 ESCAPE("load failure for Cell"); 79 91 } 92 93 psLogMsg("psvideophotLoop", 1, "Found target cell %s %d. %ld readouts\n", cellName, view->cell, cell->readouts->n); 80 94 81 95 // Put version information into the header … … 87 101 88 102 if (cell->readouts->n <2) { 89 continue; 103 psLogMsg("psvideophotLoop", 1, "cell %s has only %ld readouts\n", cellName, cell->readouts->n); 104 ESCAPE("invalid video Cell"); 90 105 } 91 92 psString cellName = psMetadataLookupStr(&status, cell->concepts, "CELL.NAME");93 psLogMsg("psvideophotLoop", 1, "Found video cell %s %d\n", cellName, view->cell);94 106 95 107 // get the position of this cell on the chip … … 114 126 115 127 // go find the video extension data 116 psString video_extension_name = NULL; 117 psStringAppend(&video_extension_name, "video_table_%s", cellName); 128 psString video_extension_name = psMetadataLookupStr(&status, config->arguments, "VIDEOEXTNAME"); 129 if (!video_extension_name) { 130 psStringAppend(&video_extension_name, "video_table_%s", cellName); 131 } 118 132 psArray *video_table = readVideoTable(input, video_extension_name); 119 133 if (!video_table) { … … 121 135 ESCAPE("invalid image file"); 122 136 } 137 psFree(video_extension_name); 123 138 psMetadataAddArray(cell->analysis, PS_LIST_TAIL, "VIDEO_DATA", 0, "", video_table); 124 139
Note:
See TracChangeset
for help on using the changeset viewer.
