upipe/upipe_helper_bin.h header reference

Upipe helper functions for bin More

Header inclusion  

Members  

Macro  

Description  

Upipe helper functions for bin

Members detail  

#define UPIPE_HELPER_BIN(STRUCTURE, LAST_INNER_PROBE, LAST_INNER, OUTPUT)  

This macro is declared in upipe/upipe_helper_bin.h source file, line 97.

This macro declares five functions dealing with specials pipes called "bins", which internally implement an inner pipeline to handle a given task. It also acts as a proxy to the last element of the inner pipeline.

You must add three members to your private upipe structure, for instance:

struct uprobe last_inner_probe;
struct upipe *last_inner;
struct upipe *output;

You must also declare UPIPE_HELPER_UPIPE prior to using this macro.

Supposing the name of your structure is upipe_foo, it declares:

  • int upipe_foo_probe_bin(struct uprobe *uprobe, struct upipe *inner,
    int event, va_list args)
    @end @code
    Probe to set on the last inner pipe. It attaches all events (proxy) to the
    bin pipe. The @tt {struct uprobe} member is set to point to this probe during
    init.

    @item @code
    void upipe_foo_init_bin(struct upipe *upipe, struct urefcount *refcount)

    Typically called in your upipe_foo_alloc() function.

  • void upipe_foo_store_last_inner(struct upipe *upipe, struct upipe *inner)

    Called whenever you change the last inner pipe of this bin.

  • int upipe_foo_control_bin(struct upipe *upipe, enum upipe_command command,
    va_list args)

    Typically called from your upipe_foo_control() handler. It handles the set_output commands internally, and then acts as a proxy for other commands.

  • void upipe_foo_clean_bin(struct upipe *upipe)

    Typically called from your upipe_foo_free() function.

Parameters list:

  • STRUCTURE: name of your private upipe structure
  • LAST_INNER_PROBE: name of the struct uprobe field of your private upipe structure
  • LAST_INNER: name of the struct upipe * field of your private upipe structure, pointing to the last inner pipe of the bin
  • OUTPUT: name of the struct upipe * field of your private upipe structure, pointing to the output of the bin

#define _UPIPE_UPIPE_HELPER_BIN_H_  

This macro is declared in upipe/upipe_helper_bin.h source file, line 31.

Valid XHTML 1.0 StrictGenerated by cmassiot on Thu Nov 6 12:15:37 2014 using MkDoc