upipe/upipe_helper_urefcount_real.h header reference

Members  

Macro  

Members detail  

#define UPIPE_HELPER_UREFCOUNT_REAL(STRUCTURE, UREFCOUNT, DEAD)  

This macro is declared in upipe/upipe_helper_urefcount_real.h source file, line 72.

This macro declares 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_real;

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 and the name of the urefcount is urefcount_real, it declares:

  • void upipe_foo_dead_urefcount_real(struct urefcount *urefcount)

    Internal wrapper.

  • void upipe_foo_release_urefcount_real(struct urefcount *urefcount)

    Typically called in the main urefcount callback.

  • void upipe_foo_init_urefcount_real(struct upipe *upipe)

    Typically called in your upipe_foo_alloc() function.

  • void upipe_foo_clean_urefcount_real(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_REAL_H_  

This macro is declared in upipe/upipe_helper_urefcount_real.h source file, line 24.

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