diff options
author | Thomas White <taw@physics.org> | 2022-05-03 15:28:46 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2022-06-02 12:15:38 +0200 |
commit | 992e25b007f8a418fd7860cc34a441932cdf023c (patch) | |
tree | b949c905232ece7bbce237eacde6b4834d4a08e4 /src/im-sandbox.c | |
parent | 7cae8ed0e420173b17aec11329411d4284de32cd (diff) |
indexamajig: Track metadata (e.g. for ASAP::O)
Diffstat (limited to 'src/im-sandbox.c')
-rw-r--r-- | src/im-sandbox.c | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/src/im-sandbox.c b/src/im-sandbox.c index 6e4b7fcd..8137db9e 100644 --- a/src/im-sandbox.c +++ b/src/im-sandbox.c @@ -456,6 +456,13 @@ static int run_work(const struct index_args *iargs, Stream *st, free(line); ok = 0; + /* Default values */ + pargs.zmq_data = NULL; + pargs.zmq_data_size = 0; + pargs.asapo_data = NULL; + pargs.asapo_data_size = 0; + pargs.asapo_meta = NULL; + if ( sb->zmq ) { do { @@ -474,15 +481,14 @@ static int run_work(const struct index_args *iargs, Stream *st, char *filename; char *event; - /* Temporary (?) abuse of "zmq_data", even though - * data comes via ASAP::O */ profile_start("asapo-fetch"); - pargs.zmq_data = im_asapo_fetch(asapostuff, - &pargs.zmq_data_size, - &filename, - &event); + pargs.asapo_data = im_asapo_fetch(asapostuff, + &pargs.asapo_data_size, + &pargs.asapo_meta, + &filename, + &event); profile_end("asapo-fetch"); - if ( pargs.zmq_data != NULL ) { + if ( pargs.asapo_data != NULL ) { ok = 1; /* ASAP::O provides a meaningful filename, which @@ -494,8 +500,6 @@ static int run_work(const struct index_args *iargs, Stream *st, } } else { - pargs.zmq_data = NULL; - pargs.zmq_data_size = 0; ok = 1; } @@ -507,9 +511,10 @@ static int run_work(const struct index_args *iargs, Stream *st, profile_end("process-image"); } - /* pargs.zmq_data will be copied into the image structure, so - * that it can be queried for "header" values etc. It will - * eventually be freed by image_free() under process_image() */ + /* NB pargs.zmq_data, pargs.asapo_data and pargs.asapo_meta + * will be copied into the image structure, so + * that it can be queried for "header" values etc. They will + * eventually be freed by image_free() under process_image(). */ if ( sb->profile ) { profile_print_and_reset(); |