Function avfilter_graph_segment_link
pub unsafe extern "C" fn avfilter_graph_segment_link(
seg: *mut AVFilterGraphSegment,
flags: i32,
inputs: *mut *mut AVFilterInOut,
outputs: *mut *mut AVFilterInOut,
) -> i32
Expand description
Link filters in a graph segment.
Walk through all filter instances in the graph segment and try to link all unlinked input and output pads. Any creation-pending filters (see avfilter_graph_segment_create_filters()) present in the segment will cause this function to fail. Disabled filters and already linked pads are skipped.
Every filter output pad that has a corresponding AVFilterPadParams with a non-NULL label is
- linked to the input with the matching label, if one exists;
- exported in the outputs linked list otherwise, with the label preserved. Unlabeled outputs are
- linked to the first unlinked unlabeled input in the next non-disabled filter in the chain, if one exists
- exported in the ouputs linked list otherwise, with NULL label
Similarly, unlinked input pads are exported in the inputs linked list.
@param seg the filtergraph segment to process @param flags reserved for future use, caller must set to 0 for now @param[out] inputs a linked list of all free (unlinked) inputs of the filters in this graph segment will be returned here. It is to be freed by the caller using avfilter_inout_free(). @param[out] outputs a linked list of all free (unlinked) outputs of the filters in this graph segment will be returned here. It is to be freed by the caller using avfilter_inout_free().
@retval “non-negative number” success @retval “negative error code” failure
@note Calling this function multiple times is safe, as it is idempotent.