跳到主要内容

avfilter_graph_segment_apply

搜索

函数 avfilter_graph_segment_apply 

源代码
pub unsafe extern "C" fn avfilter_graph_segment_apply(
    seg: *mut AVFilterGraphSegment,
    flags: c_int,
    inputs: *mut *mut AVFilterInOut,
    outputs: *mut *mut AVFilterInOut,
) -> c_int
展开描述

Apply all filter/link descriptions from a graph segment to the associated filtergraph.

This functions is currently equivalent to calling the following in sequence:

  • avfilter_graph_segment_create_filters();
  • avfilter_graph_segment_apply_opts();
  • avfilter_graph_segment_init();
  • avfilter_graph_segment_link(); failing if any of them fails. This list may be extended in the future.

Since the above functions are idempotent, the caller may call some of them manually, then do some custom processing on the filtergraph, then call this function to do the rest.

@param seg the filtergraph segment to process @param flags reserved for future use, caller must set to 0 for now @param[out] inputs passed to avfilter_graph_segment_link() @param[out] outputs passed to avfilter_graph_segment_link()

@retval “non-negative number” success @retval “negative error code” failure

@note Calling this function multiple times is safe, as it is idempotent.