upipe/upipe_helper_output.h header reference

Upipe helper functions for output More

Header inclusion  

Members  

Macro  

Description  

Upipe helper functions for output

Members detail  

#define UPIPE_HELPER_OUTPUT(STRUCTURE, OUTPUT, FLOW_DEF, FLOW_DEF_SENT)  

This macro is declared in upipe/upipe_helper_output.h source file, line 122.

This macro declares seven functions dealing with the output of a pipe, and an associated uref which is the flow definition on the output.

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

struct upipe *output;
struct uref *flow_def;
bool flow_def_sent;

You must also declare UPIPE_HELPER_UPIPE prior to using this macro.

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

  • void upipe_foo_init_output(struct upipe *upipe)

    Typically called in your upipe_foo_alloc() function.

  • void upipe_foo_output(struct upipe *upipe, struct uref *uref,
    struct upump **upump_p)

    Called whenever you need to send a packet to your output. It takes care of sending the flow definition if necessary.

  • void upipe_foo_store_flow_def(struct upipe *upipe, struct uref *flow_def)

    Called whenever you change the flow definition on this output.

  • int upipe_foo_get_flow_def(struct upipe *upipe, struct uref **p)

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

    case UPIPE_GET_FLOW_DEF: {
    struct uref **p = va_arg(args, struct uref **);
    return upipe_foo_get_flow_def(upipe, p);
    }
  • int upipe_foo_get_output(struct upipe *upipe, struct upipe **p)

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

    case UPIPE_GET_OUTPUT: {
    struct upipe **p = va_arg(args, struct upipe **);
    return upipe_foo_get_output(upipe, p);
    }
  • int upipe_foo_set_output(struct upipe *upipe, struct upipe *output)

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

    case UPIPE_SET_OUTPUT: {
    struct upipe *output = va_arg(args, struct upipe *);
    return upipe_foo_set_output(upipe, output);
    }
  • void upipe_foo_clean_output(struct upipe *upipe)

    Typically called from your upipe_foo_free() function.

Parameters list:

  • STRUCTURE: name of your private upipe structure
  • OUTPUT: name of the struct upipe * field of your private upipe structure
  • FLOW_DEF: name of the struct uref * field of your private upipe structure
  • FLOW_DEF_SENT: name of the bool field of your private upipe structure

#define _UPIPE_UPIPE_HELPER_OUTPUT_H_  

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

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