#[unsafe(no_mangle)]pub unsafe extern "C" fn moq_encode_video(
broadcast: u32,
input: *const moq_video_encoder_input,
output: *const moq_video_encoder_output,
bandwidth: u32,
) -> i32Expand description
Open a video track on a broadcast, encoding the raw frames you publish to it.
The encoder is opened here, so an unsupported codec, resolution, or backend
fails now rather than on the first frame. The track is named after the codec
(.avc3 / .hev1) and its catalog rendition is published immediately, read
out of the encoder rather than guessed, so a subscriber can find the track
before a frame is written to it.
Returns a non-zero handle on success or a negative error code.
ยงSafety
input/outputmust point to fully populated structs.output->encodermust point tooutput->encoder_lenbytes of UTF-8 whenoutput->kindisMOQ_VIDEO_ENCODER_KIND_NAMED.bandwidthis a handle fromcrate::moq_session_bandwidth, or 0 to hold the configured bitrate regardless of congestion.