upipe/upipe_helper_urefcount.h header reference

Upipe helper functions for refcount structures More

Header inclusion  

Members  

Macro  

Description  

Upipe helper functions for refcount structures

Members detail  

#define UPIPE_HELPER_UREFCOUNT(STRUCTURE, UREFCOUNT, DEAD)  

This macro is declared in upipe/upipe_helper_urefcount.h source file, line 79.

This macro declares three functions dealing with public and private parts of the allocated pipe structure.

You must add the urefcount structure to your private pipe structure:

struct urefcount urefcount;

You must also declare UPIPE_HELPER_UPIPE prior to using this macro, and have a function to free the structure when the refcount goes down to 0:

void upipe_foo_free(struct upipe *upipe)

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

  • void upipe_foo_dead_urefcount(struct urefcount *urefcount)

    Internal wrapper for upipe_foo_free.

  • void upipe_foo_init_urefcount(struct upipe *upipe)

    Typically called in your upipe_foo_alloc() function.

  • void upipe_foo_clean_urefcount(struct upipe *upipe)

    Typically called from your upipe_foo_free() function.

Parameter list:

  • STRUCTURE: name of your private upipe structure
  • UREFCOUNT: name of the struct urefcount field of your private upipe structure
  • DEAD: name of the function to free the structure

#define _UPIPE_UPIPE_HELPER_UREFCOUNT_H_  

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

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