upipe/upipe_helper_uref_stream.h header reference

Upipe helper functions to work on input as an uref stream More

Header inclusion  

Members  

Macro  

Description  

Upipe helper functions to work on input as an uref stream

Members detail  

#define UPIPE_HELPER_UREF_STREAM(STRUCTURE, NEXT_UREF, NEXT_UREF_SIZE, UREFS, APPEND_CB)  

This macro is declared in upipe/upipe_helper_uref_stream.h source file, line 95.

This macro declares four functions allowing to process input urefs as an uref stream.

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

struct uref *next_uref;
size_t next_uref_size;
struct uchain urefs;

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_uref_stream(struct upipe_foo *s)

    Initializes the fields.

  • void upipe_foo_append_uref_stream(struct upipe_foo *s, struct uref *uref)

    Appends the given uref to the uref stream.

  • void upipe_foo_consume_uref_stream(struct upipe_foo *s, size_t consumed)

    Consumes the given number of urefs from the uref stream.

  • void upipe_foo_clean_uref_stream(struct upipe_foo *s)

    Releases all buffers.

Please take note that this function internally uses uref_attr_set_priv and uref_attr_get_priv.

Parameter list:

  • STRUCTURE: name of your private upipe structure
  • NEXT_UREF: name of the struct uref field of your private upipe structure
  • NEXT_UREF_SIZE: name of the size_t field of your private upipe structure
  • UREFS: name of the struct uchain field of your private upipe structure
  • APPEND_CB: function (struct upipe *) that will be called when a new uref starts being consumed (may be NULL)

#define _UPIPE_UPIPE_HELPER_UREF_STREAM_H_  

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

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