Skip to main content

Module media

Module media 

Source
Expand description

Playing media: playback sessions and range reads (ARCHITECTURE §34, P1-08).

StartPlayback (an RPC) plans the item and returns a PlaybackHandle. The client then reads the file in ranges, each on its own crate::streams::bi::RESOURCE stream, wrapped with the playback revision in crate::resource::ResourceRequest. These media structs describe the request and SDK result; the resource header announces the raw body length. Several reads may be in flight at once. End of file is offset + sent == size; a read at or past the end has sent = 0.

Structs§

MediaRead
MediaReadReply
What follows on the stream. Every field is required (PX-15).
PlaybackHandle
A playback session on the server: one planned file, bound to the session and endpoint that started it. Opaque to the client.

Enums§

MediaReadResponse

Constants§

MAX_READ
The largest range one read returns. A reply shorter than asked is normal: the client asks again from where it stopped.