Skip to main content

moq_publish_json

Function moq_publish_json 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn moq_publish_json( broadcast: u32, name: *const c_char, name_len: usize, config: *const moq_json_config, ) -> i32
Expand description

Create a JSON snapshot track (lossy latest-value) on a broadcast.

Values published via moq_publish_json_update reach subscribers as a single latest state; a late joiner only sees the newest. Advertise the track in the catalog with moq_publish_catalog_section if consumers should discover it.

Returns a non-zero handle to the JSON producer on success, or a negative code on failure.

ยงSafety

  • The caller must ensure name is a valid pointer to name_len bytes and config a valid pointer.