Skip to main content

moq_origin_publish

Function moq_origin_publish 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn moq_origin_publish( origin: u32, path: *const c_char, path_len: usize, ) -> i32
Expand description

Create a broadcast at path on an origin, for publishing media tracks.

The broadcast starts live: the origin announces the path so consumers can discover it, becoming visible shortly after this returns. Fill it with the moq_publish_* functions. Toggle discoverability with moq_publish_set_announce; moq_publish_finish unpublishes immediately.

Returns a non-zero broadcast handle on success, or a negative code on failure.

ยงSafety

  • The caller must ensure that path is a valid pointer to path_len bytes of data.