upipe/upipe_helper_subpipe.h header reference

Upipe helper functions for upipe subpipes More

Header inclusion  

Members  

Macro  

Description  

Upipe helper functions for upipe subpipes

Members detail  

#define UPIPE_HELPER_SUBPIPE(STRUCTURE, STRUCTURE_SUB, SUB, MGR, ULIST, UCHAIN)  

This macro is declared in upipe/upipe_helper_subpipe.h source file, line 191.

This macro declares functions dealing with subpipes of split and join pipes.

You must add two members to your private pipe structure:

struct uchain subpipes;
struct upipe_mgr subpipe_mgr;

Youe must add one member to your private subpipe structure:

struct uchain uchain;

You must also declare UPIPE_HELPER_UPIPE on both the pipe and the subpipe.

Supposing the name of your pipe structure is upipe_foo, and subpipe structure is upipe_foo_output, it declares:

  • struct upipe *upipe_foo_to_output_mgr(struct upipe_foo *s)

    Returns a pointer to the public subpipe manager.

  • struct upipe_foo *upipe_foo_from_output_mgr(struct upipe_mgr *mgr)

    Returns a pointer to the private upipe_foo structure from the subpipe manager.

  • struct upipe_foo_output *upipe_foo_output_from_uchain(struct uchain *uchain)

    Returns a pointer to the private upipe_foo structure from the chaining structure.

  • struct uchain *upipe_foo_output_to_uchain(struct upipe_foo_output *s)

    Returns a pointer to the chaining structure of the subpipe.

  • void upipe_foo_output_init_sub(struct upipe *upipe)

    Initializes the private members of upipe_foo_output for this helper and adds the output to the list in upipe_foo.

  • int upipe_foo_output_get_super(struct upipe *upipe, struct upipe **p)

    Typically called from your upipe_foo_output_control() handler, such as:

    case UPIPE_SUB_GET_SUPER: {
    struct upipe **p = va_arg(args, struct upipe **);
    return upipe_foo_output_get_super(upipe, p);
    }
  • int upipe_foo_output_control_super(struct upipe *upipe,
    int command, va_list args)

    This function handles the helper control commands (upipe_foo_output_get_super) of the sub pipe in one call. Typically called from your upipe_foo_output_control() handler, such as:

    int upipe_foo_output_control(struct upipe *upipe,
    int command, va_list args)
    {
    ...
    UBASE_HANDLED_RETURN(
    upipe_foo_output_control_super(upipe, command, args));
    ...
    }
  • void upipe_foo_output_clean_sub(struct upipe *upipe)

    Cleans up the private members of upipe_foo_output for this helper and removes the output from the list in upipe_foo.

  • void upipe_foo_init_sub_outputs(struct upipe *upipe)

    Initializes the list in upipe_foo.

  • int upipe_foo_get_sub_mgr(struct upipe *upipe, struct upipe_mgr **p)

    Typically called from your upipe_foo_control() handler, such as:

    case UPIPE_GET_SUB_MGR: {
    struct upipe_mgr **p = va_arg(args, struct upipe_mgr **);
    return upipe_foo_get_sub_mgr(upipe, p);
    }
  • int upipe_foo_iterate_sub(struct upipe *upipe, struct upipe **p)

    Typically called from your upipe_foo_control() handler, such as:

    case UPIPE_ITERATE_SUB: {
    struct upipe **p = va_arg(args, struct upipe **);
    return upipe_foo_iterate_sub(upipe, p);
    }
  • int upipe_foo_control_subs(struct upipe *upipe, int command, va_list args)

    This function handles the helper control commands (upipe_foo_get_sub_mgr, upipe_foo_iterate_sub, ...) in one call. Typically called from your upipe_foo_control() handler, such as:

    int upipe_foo_control(struct upipe *upipe, int command, va_list args)
    {
    ...
    UBASE_HANDLED_RETURN(upipe_foo_control_subs(upipe, command, args));
    ...
    }
  • void upipe_foo_throw_sub_outputs(struct upipe *upipe,
    int event, ...)

    Throws the given event from all subpipes.

  • void upipe_foo_clean_sub_outputs(struct upipe *upipe)

    Cleans up the list in upipe_foo.

Parameter list:

  • STRUCTURE: name of your private upipe structure
  • STRUCTURE_SUB: name of your private subpipe structure
  • SUB: suffix to use in upipe_foo_init_sub_XXX and upipe_foo_clean_sub_XXX
  • MGR: name of the struct upipe_mgr member of your private upipe structure
  • ULIST: name of the struct uchain member of your private upipe structure
  • UCHAIN: name of the struct uchain member of your private subpipe structure
  • UPIPE: name of the struct upipe field of your private upipe structure

#define _UPIPE_UPIPE_HELPER_SUBPIPE_H_  

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

Valid XHTML 1.0 StrictGenerated by cmassiot on Fri Feb 2 23:57:19 2018 using MkDoc