Skip to content

Conversation

gilbert-sci
Copy link
Contributor

@gilbert-sci gilbert-sci commented Mar 5, 2025

Summary

In preparation for switching to UDP unicast, we have updated the StreamOut configuration to support udp unicast

Changes

  • Updates synapse api
  • Modularizes packet loss/bitrate calculation in streaming
  • Updates stream out to use Udp unicast

Migration

StreamOut configurations can just be defined like this (with an empty configuration for stream_out)

    {
      "type": "kStreamOut",
      "id": 1,
      "stream_out": {
      }
    },

The client will automatically fill with the clients IP and a default streaming port. You can also set a different port yourself, like this:

    {
      "type": "kStreamOut",
      "id": 1,
      "stream_out": {
        "udp_unicast": {
          "destination_port": 12345
        }
      }
    },

Specific IP addresses will not work, unless it is your own. In most cases, just let the client figure out the correct IP/Port to use.

Testing

  • Tested streaming from a device with the updated server
  • Tested running the example on a device with an updated server
  • Tested with starting/reading from synapse-sim
    • e.g. synapse-sim --rpc-port 50098

@gilbert-sci gilbert-sci self-assigned this Mar 5, 2025
@polymerizedsage
Copy link
Contributor

I have been doing some testing with this branch and the SciFi UDP unicast branch. A pain point I noticed is the inclusion of a destination IP in the config means that configs are not host-agnostic. If I change wireless networks or want to share the config to someone else, the destination IP needs to be updated. Perhaps the CLI can handle setting this field to the local IP address?

Ill wait till you are ready for review for any other comments.

@gilbert-sci gilbert-sci force-pushed the gilbert/udp-unicast branch from 35caa8b to 449d7ac Compare March 10, 2025 17:55
@gilbert-sci gilbert-sci changed the title draft: feature: upgrade to use udp unicast feature: upgrade to use udp unicast Mar 10, 2025
Copy link
Contributor

@polymerizedsage polymerizedsage left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This overall looks like its working properly. I have a few comments:

Copy link
Contributor

@polymerizedsage polymerizedsage left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice!

@gilbert-sci gilbert-sci force-pushed the gilbert/udp-unicast branch 2 times, most recently from 1996bf1 to d091845 Compare March 17, 2025 19:21
@gilbert-sci gilbert-sci force-pushed the gilbert/udp-unicast branch from 12297dd to 5cc822c Compare March 17, 2025 22:27
@gilbert-sci gilbert-sci merged commit fdfb8f0 into main Mar 17, 2025
2 checks passed
@gilbert-sci gilbert-sci deleted the gilbert/udp-unicast branch March 17, 2025 22:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants