Crate moq

Crate moq 

Source
Expand description

C FFI bindings for MoQ (Media over QUIC).

This library provides a C-compatible API for working with MoQ broadcasts, enabling real-time media delivery with low latency at scale.

The API is organized around several key concepts:

  • Sessions: Network connections to MoQ servers
  • Origins: Collections of broadcasts that can be published or consumed
  • Broadcasts: Container for media tracks
  • Tracks: Individual audio or video streams
  • Frames: Individual media samples with timestamps

All functions return negative error codes on failure, or non-negative values on success. Most resources are managed through opaque integer handles that must be explicitly closed.

Structs§

Id
Opaque resource identifier returned to C code.
moq_announced
Information about a broadcast announced by an origin.
moq_audio_config
Information about an audio rendition in the catalog.
moq_frame
Information about a frame of media.
moq_video_config
Information about a video rendition in the catalog.

Enums§

Error
Error types that can occur in the FFI layer.

Functions§

moq_consume_audio_close
Close an audio track consumer and clean up its resources.
moq_consume_audio_config
Query information about an audio track in a catalog.
moq_consume_audio_ordered
Consume an audio track from a broadcast, emitting the frames in order.
moq_consume_catalog
Create a catalog consumer for a broadcast.
moq_consume_catalog_close
Close a catalog consumer and clean up its resources.
moq_consume_close
Close a broadcast consumer and clean up its resources.
moq_consume_frame_chunk
Get a chunk of a frame’s payload.
moq_consume_frame_close
Close a frame and clean up its resources.
moq_consume_video_close
Close a video track consumer and clean up its resources.
moq_consume_video_config
Query information about a video track in a catalog.
moq_consume_video_ordered
Consume a video track from a broadcast, delivering frames in order.
moq_log_level
Initialize the library with a log level.
moq_origin_announced
Learn about all broadcasts published to an origin.
moq_origin_announced_close
Stop receiving announcements for broadcasts published to an origin.
moq_origin_announced_info
Query information about a broadcast discovered by moq_origin_announced.
moq_origin_close
Close an origin and clean up its resources.
moq_origin_consume
Consume a broadcast from an origin by path.
moq_origin_create
Create an origin for publishing broadcasts.
moq_origin_publish
Publish a broadcast to an origin.
moq_publish_close
Close a broadcast and clean up its resources.
moq_publish_create
Create a new broadcast for publishing media tracks.
moq_publish_media_close
Remove a track from a broadcast.
moq_publish_media_frame
Write data to a track.
moq_publish_media_ordered
Create a new media track for a broadcast
moq_session_close
Close a connection to a MoQ server.
moq_session_connect
Start establishing a connection to a MoQ server.

Type Aliases§

Status
Status code returned by FFI functions.