pipeio module

pipeio.array_from_audio_sample(sample)[source]
pipeio.audio_buffer_from_array(arr, timestamp, offset, rate)[source]
pipeio.caps_from_array(arr, rate=None)[source]
pipeio.format_property(prop)[source]

Formats a property suitable for use in a GStreamer element. Used to convert 2-dimensional data structures to an appropriate type as needed, since the mechanics of how they are treated differ between versions of pygobject. Acts as a no-op depending on the property type and version of pygobject.

pipeio.format_string_from_numpy_dtype(dtype, formats_dict={dtype('int8'): 'S8', dtype('uint8'): 'U8', dtype('int16'): 'S16LE', dtype('uint16'): 'U16LE', dtype('float32'): 'F32LE', dtype('int32'): 'S32LE', dtype('uint32'): 'U32LE', dtype('float64'): 'F64LE', dtype('complex64'): 'Z64LE', dtype('complex128'): 'Z128LE'})[source]
pipeio.get_unit_size(caps)[source]
pipeio.is_listlike(obj)[source]

Check if object is a list-like object.

pipeio.is_nested_listlike(obj)[source]

Check if object is a nested list-like object.

pipeio.numpy_dtype_from_caps(caps)[source]
pipeio.parse_framesrc_tags(taglist)[source]
pipeio.parse_spectrum_message(message)[source]

Parse a “spectrum” message from the lal_whiten element, return a LAL REAL8FrequencySeries containing the strain spectral density.

pipeio.repack_complex_array_to_real(arr)[source]

Repack a complex-valued array into a real-valued array with twice as many columns. Used to set complex arrays as values on elements that expose them as real-valued array properties (gobject doesn’t understand complex numbers). The return value is a view into the input array.

pipeio.repack_real_array_to_complex(arr)[source]

Repack a real-valued array into a complex-valued array with half as many columns. Used to retrieve complex arrays from elements that expose them as real-valued array properties (gobject doesn’t understand complex numbers). The return value is a view into the input array.

pipeio.to_gvalue_array(arr)[source]

Converts a list-like object to a GValueArray.