Index: trunk/core/raw.c===================================================================--- trunk/core/raw.c (Revision 524)+++ trunk/core/raw.c (Arbeitskopie)@@ -9,6 +9,7 @@ #define RAW_TARGET_DIRECTORY "A/DCIM/%03dCANON" //#define RAW_TMP_FILENAME "HDK_RAW.TMP" #define RAW_TARGET_FILENAME "%s%04d%s"+#define RAW_BRACKETING_FILENAME "%s%04d_%02d%s" //------------------------------------------------------------------- static char fn[64];@@ -26,6 +27,7 @@ int raw_savefile() { int fd, m=(mode_get()&MODE_SHOOTING_MASK); static struct utimbuf t;+ static int br_counter; if (state_kbd_script_run && shot_histogram_enabled) build_shot_histogram(); @@ -46,6 +48,15 @@ shooting_bracketing(); + if(conf.tv_bracket_value || conf.av_bracket_value || conf.iso_bracket_value || conf.subj_dist_bracket_value) {+ if(state_shooting_progress != SHOOTING_PROGRESS_PROCESSING)+ br_counter = 1;+ else+ br_counter++;+ }+ else+ br_counter=0;+ // got here second time in a row. Skip second RAW saving. if (conf.raw_save_first_only && state_shooting_progress == SHOOTING_PROGRESS_PROCESSING) { return 0;@@ -65,7 +76,10 @@ mkdir(dir); sprintf(fn, "%s/", dir);- sprintf(fn+strlen(fn), RAW_TARGET_FILENAME, img_prefixes[conf.raw_prefix], get_target_file_num(), img_exts[conf.raw_ext]);+ if(br_counter)+ sprintf(fn+strlen(fn), RAW_BRACKETING_FILENAME, img_prefixes[conf.raw_prefix], get_target_file_num(), br_counter, img_exts[conf.raw_ext]);+ else+ sprintf(fn+strlen(fn), RAW_TARGET_FILENAME, img_prefixes[conf.raw_prefix], get_target_file_num(), img_exts[conf.raw_ext]); fd = open(fn, O_WRONLY|O_CREAT, 0777); if (fd>=0) {
ISTR that dryos also has issues with long filenames, but I might be mistaken there.
well if you keep the ST[A-Z] scheme, people can download the raws without having to use a cardreader.
If the information about sequence number is not present in EXIF, you can add it there.Paul
This is what I tried first, but I don't know, if it is possible to write to an exif tag.I searced for a related function in CHDK, but didn't find one.This would even match only JPG files. CHDK raw files don't contain any exif data...Randolf
Index: trunk//core/raw.c===================================================================--- trunk//core/raw.c (Revision 530)+++ trunk//core/raw.c (Arbeitskopie)@@ -9,6 +9,7 @@ #define RAW_TARGET_DIRECTORY "A/DCIM/%03dCANON" //#define RAW_TMP_FILENAME "HDK_RAW.TMP" #define RAW_TARGET_FILENAME "%s%04d%s"+#define RAW_SEQUENCE_PREFIX "ST#_" //------------------------------------------------------------------- static char fn[64];@@ -26,6 +27,7 @@ int raw_savefile() { int fd, m=(mode_get()&MODE_SHOOTING_MASK); static struct utimbuf t;+ static int bracket_count; if (state_kbd_script_run && shot_histogram_enabled) build_shot_histogram(); @@ -46,6 +48,16 @@ shooting_bracketing(); + // count sequence if in bracketing mode+ if (conf.tv_bracket_value || conf.av_bracket_value || conf.iso_bracket_value || conf.subj_dist_bracket_value) {+ if (state_shooting_progress != SHOOTING_PROGRESS_PROCESSING)+ bracket_count = 1;+ else+ bracket_count++;+ }+ else+ bracket_count=0;+ // got here second time in a row. Skip second RAW saving. if (conf.raw_save_first_only && state_shooting_progress == SHOOTING_PROGRESS_PROCESSING) { return 0;@@ -65,7 +77,13 @@ mkdir(dir); sprintf(fn, "%s/", dir);- sprintf(fn+strlen(fn), RAW_TARGET_FILENAME, img_prefixes[conf.raw_prefix], get_target_file_num(), img_exts[conf.raw_ext]);+ if (bracket_count) {+ char* prefix = RAW_SEQUENCE_PREFIX;+ *(prefix+2) = (char)('@'+(bracket_count<26?bracket_count:26)); + sprintf(fn+strlen(fn), RAW_TARGET_FILENAME, prefix, get_target_file_num(), img_exts[conf.raw_ext]);+ }+ else+ sprintf(fn+strlen(fn), RAW_TARGET_FILENAME, img_prefixes[conf.raw_prefix], get_target_file_num(), img_exts[conf.raw_ext]); fd = open(fn, O_WRONLY|O_CREAT, 0777); if (fd>=0) {
Index: trunk/core/raw.c===================================================================--- trunk/core/raw.c (Revision 530)+++ trunk/core/raw.c (Arbeitskopie)@@ -9,6 +9,7 @@ #define RAW_TARGET_DIRECTORY "A/DCIM/%03dCANON" //#define RAW_TMP_FILENAME "HDK_RAW.TMP" #define RAW_TARGET_FILENAME "%s%04d%s"+#define RAW_SEQUENCE_PREFIX "ST#_" //------------------------------------------------------------------- static char fn[64];@@ -26,6 +27,7 @@ int raw_savefile() { int fd, m=(mode_get()&MODE_SHOOTING_MASK); static struct utimbuf t;+ static int bracket_count; if (state_kbd_script_run && shot_histogram_enabled) build_shot_histogram(); @@ -46,6 +48,16 @@ shooting_bracketing(); + // count sequence if in bracketing mode+ if (conf.tv_bracket_value || conf.av_bracket_value || conf.iso_bracket_value || conf.subj_dist_bracket_value || (mode_get()&MODE_SHOOTING_MASK)==MODE_STITCH) {+ if (state_shooting_progress != SHOOTING_PROGRESS_PROCESSING)+ bracket_count = 1;+ else+ bracket_count++;+ }+ else+ bracket_count=0;+ // got here second time in a row. Skip second RAW saving. if (conf.raw_save_first_only && state_shooting_progress == SHOOTING_PROGRESS_PROCESSING) { return 0;@@ -65,7 +77,13 @@ mkdir(dir); sprintf(fn, "%s/", dir);- sprintf(fn+strlen(fn), RAW_TARGET_FILENAME, img_prefixes[conf.raw_prefix], get_target_file_num(), img_exts[conf.raw_ext]);+ if (bracket_count) {+ char* prefix = RAW_SEQUENCE_PREFIX;+ *(prefix+2) = (char)('@'+(bracket_count<26?bracket_count:26)); + sprintf(fn+strlen(fn), RAW_TARGET_FILENAME, prefix, get_target_file_num(), img_exts[conf.raw_ext]);+ }+ else+ sprintf(fn+strlen(fn), RAW_TARGET_FILENAME, img_prefixes[conf.raw_prefix], get_target_file_num(), img_exts[conf.raw_ext]); fd = open(fn, O_WRONLY|O_CREAT, 0777); if (fd>=0) {[/codr]
It works!Accessing raw images named ST#... via USB cabel is working as well.