Function avformat_stream_group_create

Source
pub unsafe extern "C" fn avformat_stream_group_create(
    s: *mut AVFormatContext,
    type_: u32,
    options: *mut *mut AVDictionary,
) -> *mut AVStreamGroup
Expand description

Add a new empty stream group to a media file.

When demuxing, it may be called by the demuxer in read_header(). If the flag AVFMTCTX_NOHEADER is set in s.ctx_flags, then it may also be called in read_packet().

When muxing, may be called by the user before avformat_write_header().

User is required to call avformat_free_context() to clean up the allocation by avformat_stream_group_create().

New streams can be added to the group with avformat_stream_group_add_stream().

@param s media file handle

@return newly created group or NULL on error. @see avformat_new_stream, avformat_stream_group_add_stream.