Blame

958267 Matt Hughes 2026-10-11 19:28:04
1
# Streaming
2
3
Pointcaster streams point clouds over the network to other applications in real time. Streams are received by Pointreceiver, a native library that the [[Integrations/Unity]] and [[Integrations/TouchDesigner]] plugins are built on.
4
5
Point clouds are sent by the **Point Streamer**, and scalar and vector data is sent separately by the [[Message Streamer|Publishers/Message Streamer]].
6
7
## Stream Channels
2317f3 Matt Hughes 2026-10-11 08:30:48
8
Every session, device and device group in the workspace is available as a stream channel. Channels are listed in the Streaming window (_Window → Streaming_), where they can be toggled on or off.
958267 Matt Hughes 2026-10-11 19:28:04
9
10
The dot beside each channel shows its status:
11
- **Grey**: disabled.
12
- **Blue**: live, but no clients are subscribed.
13
- **Green**: at least one client is subscribed.
14
15
## Point Streamer Properties
16
- **Address / Port**: the interface and TCP port to listen on. Defaults to all interfaces on port `9992`.
17
- **Publish Hz**: the maximum number of frames sent per second.
18
- **Publish Every Frame**: re-send every channel on every tick. Otherwise a channel only sends when its cloud has changed, or when a new client subscribes.
19
- **Max Queued Frames**: when enabled, limits how many frames can queue for a slow client before new frames are dropped.
20
- **Codec**: how point clouds are compressed before sending.
21
- **None**: send raw points.
22
- **Meshopt**: fast compression, with a **Level** from 0 (fastest) to 3 (smallest). This is the default.
23
- **Draco**: higher compression at a greater CPU cost. **Encode Speed** and **Decode Speed** trade compression for speed, and **Attribute Quantization** sets the bits kept per point attribute.
24
25
## Pointreceiver
26
Pointreceiver is a C library for receiving Pointcaster streams in your own software. It manages connections on background threads and queues incoming data. Clients pull the latest frame per channel when they're ready for it.
27
28
A typical client:
29
1. Creates a context with `pointreceiver_create_context`.
30
2. Starts the point receiver with the streamer's address, e.g. `pointreceiver_start_point_receiver(ctx, "tcp://127.0.0.1:9992")`.
31
3. Subscribes to a channel with `pointreceiver_subscribe_to_point_cloud`. An empty address subscribes to every channel.
32
4. Polls `pointreceiver_dequeue_point_cloud` for frames. Each frame has positions (16-bit integer millimetres), colours and any point attributes such as point scale.
33
34
Messages from the Message Streamer are received the same way using `pointreceiver_start_message_receiver`, `pointreceiver_subscribe_to_message` and `pointreceiver_dequeue_message`.
35
36
> [!WARNING]
37
> Frame buffers are borrowed from the context and are only valid until the next dequeue, so copy anything you need to keep.
38
39
Pointreceiver builds for Windows, Linux and Android (`armeabi-v7a` and `arm64-v8a`) using the `pointreceiver-*` CMake presets. See [[Development/Building Pointcaster]].
40
41
---
42
43
::: buttonlink
44
[View Pointreceiver header](https://github.com/matth-av/pointcaster/blob/qt/include/pointreceiver.h)
45
:::