[][src]Function ffav_sys::swr_alloc_set_opts

pub unsafe extern "C" fn swr_alloc_set_opts(
    s: *mut SwrContext,
    out_ch_layout: i64,
    out_sample_fmt: AVSampleFormat,
    out_sample_rate: c_int,
    in_ch_layout: i64,
    in_sample_fmt: AVSampleFormat,
    in_sample_rate: c_int,
    log_offset: c_int,
    log_ctx: *mut c_void
) -> *mut SwrContext

Allocate SwrContext if needed and set/reset common parameters.

This function does not require s to be allocated with swr_alloc(). On the other hand, swr_alloc() can use swr_alloc_set_opts() to set the parameters on the allocated context.

@param s existing Swr context if available, or NULL if not @param out_ch_layout output channel layout (AV_CH_LAYOUT_) @param out_sample_fmt output sample format (AV_SAMPLE_FMT_). @param out_sample_rate output sample rate (frequency in Hz) @param in_ch_layout input channel layout (AV_CH_LAYOUT_) @param in_sample_fmt input sample format (AV_SAMPLE_FMT_). @param in_sample_rate input sample rate (frequency in Hz) @param log_offset logging level offset @param log_ctx parent logging context, can be NULL

@see swr_init(), swr_free() @return NULL on error, allocated context otherwise