This PR takes care of 4 of the 5 bugfixes I was mentioning:
Inconsistency in numpy dtype of level_UUID
in create_uh_dtype is "V" (raw data (void))
in create_segment_dtype, create_channel_dtype and create_session_dtype is "i1" (signed integer)
The specifications and meflib.h code show UUID as ui1. Therefore "i1" is off, sticking to raw data makes most sense (bytearray in python is unsigned), so changed to 'V' like in create_uh_dtype
deviant field names in mapping video index
the VIDEO_INDEX struct in meflib.h shows fields protected_region and discretionary_region
the create_vi_dtype function in pymef3_file.c states RED_block_protected_region and RED_block_discretionary_region
meflib is leading. So corrected create_vi_dtype field names
incorrect mapping of RED_block_flags in time-series indices
create_ti_dtype tries to map RED_block_flags as a raw data without specifying length ("RED_block_flags", "V",)
actually it's not a byte array, but instead just "ui1 RED_block_flags;" (which matches as it is passed around elsewhere)
changing this to "RED_block_flags", "u1",, fixes this
To avoid confusion, removed #define RED_BLOCK_FLAGS_BYTES 1 from meflib.h. Since this is done for struct fields of simply the u1 type
incorrect/asynchronous mapping of segment specific metadata due missing field in python definition
in meflib.h the SEGMENT structure defines si1 session_name[MEF_BASE_FILE_NAME_BYTES];
in create_segment_dtype this field is missing
added session_name field to create_segment_dtype definition
@cimbi I still have some enhancements left to push. Again thanks for merging so quickly!
Hi Jan,
This PR takes care of 4 of the 5 bugfixes I was mentioning:
Inconsistency in numpy dtype of
level_UUID
create_uh_dtype
is "V" (raw data (void))create_segment_dtype
,create_channel_dtype
andcreate_session_dtype
is "i1" (signed integer)meflib.h
code showUUID
as ui1. Therefore "i1" is off, sticking to raw data makes most sense (bytearray in python is unsigned), so changed to 'V' like increate_uh_dtype
deviant field names in mapping video index
VIDEO_INDEX
struct inmeflib.h
shows fieldsprotected_region
anddiscretionary_region
create_vi_dtype
function inpymef3_file.c
statesRED_block_protected_region
andRED_block_discretionary_region
create_vi_dtype
field namesincorrect mapping of
RED_block_flags
in time-series indicescreate_ti_dtype
tries to mapRED_block_flags
as a raw data without specifying length("RED_block_flags", "V",)
"ui1 RED_block_flags;"
(which matches as it is passed around elsewhere)"RED_block_flags", "u1",
, fixes this#define RED_BLOCK_FLAGS_BYTES 1
frommeflib.h
. Since this is done for struct fields of simply the u1 typeincorrect/asynchronous mapping of segment specific metadata due missing field in python definition
si1 session_name[MEF_BASE_FILE_NAME_BYTES];
create_segment_dtype
this field is missingcreate_segment_dtype
definition@cimbi I still have some enhancements left to push. Again thanks for merging so quickly!