Changeset 6156
- Timestamp:
- Jan 21, 2006, 7:07:56 PM (20 years ago)
- Location:
- trunk/ippTools/src
- Files:
-
- 3 edited
-
p2pendingToDone.c (modified) (1 diff)
-
p2searchPendingFrames.c (modified) (3 diffs)
-
pxtools.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTools/src/p2pendingToDone.c
r6152 r6156 61 61 62 62 // XXX the filename layout is defined by this code 63 psArray *p2pendingToDoneImfile(psArray *pendingImfiles) 64 { 65 PS_ASSERT_PTR_NON_NULL(pendingImfiles, NULL); 66 67 psArray *doneImfiles = psArrayAlloc(pendingImfiles->n); 68 doneImfiles->n = 0; 69 70 for (int i = 0; i < pendingImfiles->n; i++) { 71 p2PendingImfileRow *pendingImfile = pendingImfiles->data[i]; 72 73 p2DoneImfileRow *doneImfile = p2DoneImfileRowAlloc( 74 pendingImfile->exp_id, 75 pendingImfile->exptype, 76 pendingImfile->class, 77 pendingImfile->class_id, 78 pendingImfile->p1_version, 79 pendingImfile->p2_version, 80 "", // recipe 81 "", // stats 82 pendingImfile->url 83 ); 84 85 psArrayAdd(doneImfiles, 100, doneImfile); 86 } 87 88 return doneImfiles; 89 } -
trunk/ippTools/src/p2searchPendingFrames.c
r6133 r6156 18 18 } 19 19 /* 20 if (config->exp_id != NULL) { 21 psMetadataAddStr(where, PS_LIST_TAIL, "exp_id", 0, "==", 22 config->exp_id); 23 } 24 if (config->class != NULL) { 25 psMetadataAddStr(where, PS_LIST_TAIL, "class", 0, "==", 26 config->class); 27 } 28 if (config->class_id != NULL) { 29 psMetadataAddStr(where, PS_LIST_TAIL, "class_id", 0, "==", 30 config->class_id); 31 } 32 */ 33 /* 20 34 if (!psTimeIsZero(config->start) && !psTimeIsZero(config->stop)) { 21 35 psMetadataAddTime(where, PS_LIST_TAIL, "TIME_START", 0, "<", config->stop); … … 26 40 psArray *exposures = p2PendingExpSelectRowObjects(config->database, where, MAX_ROWS); 27 41 psFree(where); 42 if (!exposures) { 43 psError(PS_ERR_UNKNOWN, false, "no p2PendingExp rows found"); 44 return NULL; 45 } 46 28 47 29 48 // output array of rawSet … … 52 71 // which have the appropriate state. that would limit the ability to filter 53 72 // the selection. test to see how well/poorly this performs 73 74 psArray *p2searchPendingImfiles(p2Config *config) 75 { 76 PS_ASSERT_PTR_NON_NULL(config, NULL); 77 78 psMetadata *where = psMetadataAlloc(); 79 if (config->camera_name != NULL) { 80 if (!psMetadataAddStr(where, PS_LIST_TAIL, "camera", 0, "==", 81 config->camera_name)) { 82 psError(PS_ERR_UNKNOWN, false, "failed to add item camera"); 83 psFree(where); 84 return NULL; 85 } 86 } 87 if (config->filter != NULL) { 88 psMetadataAddStr(where, PS_LIST_TAIL, "filter", 0, "==", 89 config->filter); 90 } 91 if (config->exp_id != NULL) { 92 psMetadataAddStr(where, PS_LIST_TAIL, "exp_id", 0, "==", 93 config->exp_id); 94 } 95 if (config->class != NULL) { 96 psMetadataAddStr(where, PS_LIST_TAIL, "class", 0, "==", 97 config->class); 98 } 99 if (config->class_id != NULL) { 100 psMetadataAddStr(where, PS_LIST_TAIL, "class_id", 0, "==", 101 config->class_id); 102 } 103 104 psArray *imfiles = p2PendingImfileSelectRowObjects(config->database, where, 105 MAX_ROWS); 106 psFree(where); 107 108 return imfiles; 109 } -
trunk/ippTools/src/pxtools.h
r6150 r6156 91 91 bool p2writePendingFrames (p2Config *config, psArray *frames); 92 92 psArray *p2searchDoneFrames(p2Config *config); 93 psArray *p2searchPendingImfiles(p2Config *config); 94 psArray *p2pendingToDoneImfile(psArray *pendingImfiles);
Note:
See TracChangeset
for help on using the changeset viewer.
