def get_stream_names(streams, type=None):
    """
        extract stream name from xdf stream
    :param streams: list of dictionnaries
        xdf streams to parse
    :param type: string
        type of stream, eg. 'Signal' or 'Markers'
    :return: list
        list of stream name contained in streams
    """
    if type is None:
        return [stream["info"]["name"][0] for stream in streams]
    else:
        return [
            stream["info"]["name"][0]
            for stream in streams
            if stream["info"]["type"][0] == type
        ]