Changeset 18336 for trunk/ippTools/src/camtool.c
- Timestamp:
- Jun 26, 2008, 3:39:54 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/ippTools/src/camtool.c (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTools/src/camtool.c
r18093 r18336 97 97 PS_ASSERT_PTR_NON_NULL(config, NULL); 98 98 99 PXOPT_LOOKUP_STR(chip_id, config->args, "-chip_id", false, false);100 PXOPT_LOOKUP_STR(exp_id, config->args, "-exp_id", false, false);101 102 99 psMetadata *where = psMetadataAlloc(); 103 // convert chip_id into a psS64 104 if (chip_id) { 105 if (!psMetadataAddS64(where, PS_LIST_TAIL, "chip_id", 0, "==", (psS64)atoll(chip_id))) { 106 psError(PS_ERR_UNKNOWN, false, "failed to add item chip_id"); 107 psFree(where); 108 return false; 109 } 110 } 111 112 // convert exp_id into a psS64 113 if (exp_id) { 114 if (!psMetadataAddS64(where, PS_LIST_TAIL, "exp_id", 0, "==", (psS64)atoll(exp_id))) { 115 psError(PS_ERR_UNKNOWN, false, "failed to add item exp_id"); 116 psFree(where); 117 return false; 118 } 119 } 120 100 PXOPT_COPY_S64(config->args, where, "-chip_id", "chip_id", "=="); 101 PXOPT_COPY_S64(config->args, where, "-exp_id", "exp_id", "=="); 121 102 PXOPT_COPY_STR(config->args, where, "-exp_name", "exp_name", "=="); 122 103 PXOPT_COPY_STR(config->args, where, "-inst", "camera", "=="); … … 268 249 PS_ASSERT_PTR_NON_NULL(config, false); 269 250 270 PXOPT_LOOKUP_STR(cam_id, config->args, "-cam_id", false, false);271 PXOPT_LOOKUP_STR(chip_id, config->args, "-chip_id", false, false);272 PXOPT_LOOKUP_STR(exp_id, config->args, "-exp_id", false, false);273 274 251 psMetadata *where = psMetadataAlloc(); 275 // convert cam_id into a psS64 276 if (cam_id) { 277 if (!psMetadataAddS64(where, PS_LIST_TAIL, "cam_id", 0, "==", (psS64)atoll(cam_id))) { 278 psError(PS_ERR_UNKNOWN, false, "failed to add item cam_id"); 279 psFree(where); 280 return false; 281 } 282 } 283 284 // convert chip_id into a psS64 285 if (chip_id) { 286 if (!psMetadataAddS64(where, PS_LIST_TAIL, "chip_id", 0, "==", (psS64)atoll(chip_id))) { 287 psError(PS_ERR_UNKNOWN, false, "failed to add item chip_id"); 288 psFree(where); 289 return false; 290 } 291 } 292 293 // convert exp_id into a psS64 294 if (exp_id) { 295 if (!psMetadataAddS64(where, PS_LIST_TAIL, "exp_id", 0, "==", (psS64)atoll(exp_id))) { 296 psError(PS_ERR_UNKNOWN, false, "failed to add item exp_id"); 297 psFree(where); 298 return false; 299 } 300 } 301 252 PXOPT_COPY_S64(config->args, where, "-cam_id", "cam_id", "=="); 253 PXOPT_COPY_S64(config->args, where, "-chip_id", "chip_id", "=="); 254 PXOPT_COPY_S64(config->args, where, "-exp_id", "exp_id", "=="); 302 255 PXOPT_COPY_STR(config->args, where, "-exp_name", "exp_name", "=="); 303 256 PXOPT_COPY_STR(config->args, where, "-inst", "camera", "=="); … … 421 374 } 422 375 423 if (!convertIdToStr(output)) {424 psError(PS_ERR_UNKNOWN, false, "failed to convert id fields into a strings");425 psFree(output);426 return false;427 }428 429 376 // negate simple so the default is true 430 377 if (!ippdbPrintMetadatas(stdout, output, "camPendingExp", !simple)) { … … 475 422 } 476 423 477 if (!convertIdToStr(output)) {478 psError(PS_ERR_UNKNOWN, false, "failed to convert id fields into a strings");479 psFree(output);480 return false;481 }482 483 424 // negate simple so the default is true 484 425 if (!ippdbPrintMetadatas(stdout, output, "chipProcessedImfile", !simple)) { … … 498 439 499 440 // required 500 PXOPT_LOOKUP_S TR(cam_id, config->args, "-cam_id", true, false);441 PXOPT_LOOKUP_S64(cam_id, config->args, "-cam_id", true, false); 501 442 PXOPT_LOOKUP_STR(uri, config->args, "-uri", true, false); 502 443 … … 554 495 psMetadata *where = psMetadataAlloc(); 555 496 if (cam_id) { 556 if (!psMetadataAddS64(where, PS_LIST_TAIL, "cam_id", 0, "==", (psS64)atoll(cam_id))) {497 if (!psMetadataAddS64(where, PS_LIST_TAIL, "cam_id", 0, "==", cam_id)) { 557 498 psError(PS_ERR_UNKNOWN, false, "failed to add item cam_id"); 558 499 psFree(where); … … 746 687 } 747 688 748 if (!convertIdToStr(output)) {749 psError(PS_ERR_UNKNOWN, false, "failed to convert id fields into a strings");750 psFree(output);751 return false;752 }753 754 689 // negate simple so the default is true 755 690 if (!ippdbPrintMetadatas(stdout, output, "camProcessedExp", !simple)) { … … 769 704 PS_ASSERT_PTR_NON_NULL(config, false); 770 705 771 PXOPT_LOOKUP_STR(cam_id, config->args, "-cam_id", false, false);772 PXOPT_LOOKUP_STR(chip_id, config->args, "-chip_id", false, false);773 PXOPT_LOOKUP_STR(exp_id, config->args, "-exp_id", false, false);774 775 706 psMetadata *where = psMetadataAlloc(); 776 // convert cam_id into a psS64 777 if (cam_id) { 778 if (!psMetadataAddS64(where, PS_LIST_TAIL, "cam_id", 0, "==", (psS64)atoll(cam_id))) { 779 psError(PS_ERR_UNKNOWN, false, "failed to add item cam_id"); 780 psFree(where); 781 return false; 782 } 783 } 784 785 // convert chip_id into a psS64 786 if (chip_id) { 787 if (!psMetadataAddS64(where, PS_LIST_TAIL, "chip_id", 0, "==", (psS64)atoll(chip_id))) { 788 psError(PS_ERR_UNKNOWN, false, "failed to add item chip_id"); 789 psFree(where); 790 return false; 791 } 792 } 793 794 // convert exp_id into a psS64 795 if (exp_id) { 796 if (!psMetadataAddS64(where, PS_LIST_TAIL, "exp_id", 0, "==", (psS64)atoll(exp_id))) { 797 psError(PS_ERR_UNKNOWN, false, "failed to add item exp_id"); 798 psFree(where); 799 return false; 800 } 801 } 802 707 PXOPT_COPY_S64(config->args, where, "-cam_id", "cam_id", "=="); 708 PXOPT_COPY_S64(config->args, where, "-chip_id", "chip_id", "=="); 709 PXOPT_COPY_S64(config->args, where, "-exp_id", "exp_id", "=="); 803 710 PXOPT_COPY_STR(config->args, where, "-exp_name", "exp_name", "=="); 804 711 PXOPT_COPY_STR(config->args, where, "-inst", "camera", "=="); … … 977 884 } 978 885 979 if (!convertIdToStr(output)) {980 psError(PS_ERR_UNKNOWN, false, "failed to convert id fields into a strings");981 psFree(output);982 return false;983 }984 985 886 // negative simple so the default is true 986 887 if (!ippdbPrintMetadatas(stdout, output, "camMask", !simple)) {
Note:
See TracChangeset
for help on using the changeset viewer.
