/** @This frees a upipe manager. * * @param urefcount pointer to urefcount structure */ static void upipe_fdec_mgr_free(struct urefcount *urefcount) { struct upipe_fdec_mgr *fdec_mgr = upipe_fdec_mgr_from_urefcount(urefcount); upipe_mgr_release(fdec_mgr->avcdec_mgr); urefcount_clean(urefcount); free(fdec_mgr); }
/** @This frees a uclock. * * @param urefcount pointer to urefcount */ static void uclock_std_free(struct urefcount *urefcount) { struct uclock_std *uclock_std = uclock_std_from_urefcount(urefcount); #ifdef __MACH__ mach_port_deallocate(mach_task_self(), uclock_std->cclock); #endif urefcount_clean(urefcount); free(uclock_std); }
/** @This frees a uref manager. * * @param urefcount pointer to a urefcount */ static void uref_std_mgr_free(struct urefcount *urefcount) { struct uref_std_mgr *std_mgr = uref_std_mgr_from_urefcount(urefcount); struct uref_mgr *mgr = uref_std_mgr_to_uref_mgr(std_mgr); upool_clean(&std_mgr->uref_pool); udict_mgr_release(mgr->udict_mgr); urefcount_clean(urefcount); free(std_mgr); }
/** @This frees a upipe manager. * * @param urefcount pointer to urefcount structure */ static void upipe_wsrc_mgr_free(struct urefcount *urefcount) { struct upipe_wsrc_mgr *wsrc_mgr = upipe_wsrc_mgr_from_urefcount(urefcount); upipe_mgr_release(wsrc_mgr->qsrc_mgr); upipe_mgr_release(wsrc_mgr->qsink_mgr); upipe_mgr_release(wsrc_mgr->xfer_mgr); urefcount_clean(urefcount); free(wsrc_mgr); }
/** @This frees a upipe. * * @param urefcount_real pointer to urefcount_real structure */ static void upipe_wsrc_free(struct urefcount *urefcount_real) { struct upipe_wsrc *upipe_wsrc = upipe_wsrc_from_urefcount_real(urefcount_real); struct upipe *upipe = upipe_wsrc_to_upipe(upipe_wsrc); upipe_throw_dead(upipe); uprobe_clean(&upipe_wsrc->proxy_probe); upipe_wsrc_clean_last_inner_probe(upipe); urefcount_clean(urefcount_real); upipe_wsrc_clean_urefcount(upipe); upipe_clean(upipe); free(upipe_wsrc); }
/** @This frees a upipe. * * @param urefcount_real pointer to urefcount_real structure */ static void upipe_wsink_free(struct urefcount *urefcount_real) { struct upipe_wsink *upipe_wsink = upipe_wsink_from_urefcount_real(urefcount_real); struct upipe *upipe = upipe_wsink_to_upipe(upipe_wsink); upipe_throw_dead(upipe); uprobe_clean(&upipe_wsink->proxy_probe); uprobe_clean(&upipe_wsink->in_qsrc_probe); urefcount_clean(urefcount_real); upipe_wsink_clean_urefcount(upipe); upipe_clean(upipe); free(upipe_wsink); }
/** @This frees a upipe. * * @param urefcount_real pointer to urefcount_real structure */ static void upipe_fdec_free(struct urefcount *urefcount_real) { struct upipe_fdec *upipe_fdec = upipe_fdec_from_urefcount_real(urefcount_real); struct upipe *upipe = upipe_fdec_to_upipe(upipe_fdec); upipe_throw_dead(upipe); uref_free(upipe_fdec->options); upipe_fdec_clean_last_inner_probe(upipe); upipe_fdec_clean_uref_mgr(upipe); urefcount_clean(urefcount_real); upipe_fdec_clean_urefcount(upipe); upipe_fdec_free_void(upipe); }
/** @internal @This frees a burst pipe. * * @param urefcount pointer to real urefcount structure */ static void upipe_burst_free(struct urefcount *urefcount) { struct upipe_burst *upipe_burst = upipe_burst_from_urefcount_real(urefcount); struct upipe *upipe = upipe_burst_to_upipe(upipe_burst); upipe_throw_dead(upipe); struct uchain *uchain; while ((uchain = ulist_pop(&upipe_burst->urefs))) uref_free(uref_from_uchain(uchain)); urefcount_clean(&upipe_burst->urefcount_real); ueventfd_clean(&upipe_burst->ueventfd); upipe_burst_clean_upump(upipe); upipe_burst_clean_upump_mgr(upipe); upipe_burst_clean_output(upipe); upipe_burst_clean_urefcount(upipe); upipe_burst_free_void(upipe); }
/** @This frees a umem manager. * * @param mgr pointer to umem manager */ static void umem_alloc_mgr_free(struct umem_mgr *mgr) { struct umem_alloc_mgr *alloc_mgr = umem_alloc_mgr_from_umem_mgr(mgr); urefcount_clean(&alloc_mgr->mgr.refcount); free(alloc_mgr); }