read_dora_input_data

Function read_dora_input_data 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn read_dora_input_data( event: *const (), out_ptr: *mut *const u8, out_len: *mut usize, )
Expand description

Reads out the data of the given input event.

Writes the out_ptr and out_len with the start pointer and length of the input’s data array. The data array is a raw byte array, whose format depends on the source operator/node.

Writes a null pointer and length 0 if the given event is not an input event or when an input event has no associated data.

§Safety

The event argument must be a dora event received through dora_next_event. The event must be still valid, i.e., not freed yet. The returned out_ptr must not be used after freeing the event, since it points directly into the event’s memory.