8000 [REQ] Optionally prevent send buffer overflow · Issue #221 · sccn/liblsl · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
[REQ] Optionally prevent send buffer overflow #221
Open
@cboulay

Description

@cboulay

Context:

I am playing back an XDF file through LSL to test my online pipelines. I would like to push data through the LSL Outlet(s) as fast as possible but not faster than my inlet(s) can handle. Instead of manually tuning my playback rate for every different scenario, I thought it would be cool if the playback could self-regulate.
I think I can use the stream's buffer duration (from 6 minutes to ~5 seconds) and the inlet's pull_chunk size as my arguments to control buffer size and chunk size. What I don't have currently is the ability to prevent overflowing the send buffer.

Brainstorm:

  • Create a new outlet method that returns fill fraction of each buffer; on each send check all buffers and only send when all are < 90% full.
  • Finally finish off that synchronous push branch and have the push function block until the send buffer has room.

Any other ideas?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0