Example #1
0
/** @This frees a upipe.
 *
 * @param upipe description structure of the pipe
 */
static void upipe_avcdec_free(struct upipe *upipe)
{
    struct upipe_avcdec *upipe_avcdec = upipe_avcdec_from_upipe(upipe);
    if (upipe_avcdec->context) {
        _upipe_avcdec_set_codec(upipe, NULL, NULL, 0);
        return; /* _set_codec() calls _use()/_release() */
    }

    upipe_throw_dead(upipe);

    if (upipe_avcdec->frame) {
        av_free(upipe_avcdec->frame);
    }

    if (upipe_avcdec->saved_uref) {
        uref_free(upipe_avcdec->saved_uref);
    }
    if (upipe_avcdec->saved_upump_mgr) {
        upump_mgr_sink_unblock(upipe_avcdec->saved_upump_mgr);
        upump_mgr_release(upipe_avcdec->saved_upump_mgr);
    }

    upipe_avcdec_abort_av_deal(upipe);
    upipe_avcdec_clean_output(upipe);
    upipe_avcdec_clean_ubuf_mgr(upipe);
    upipe_avcdec_clean_uref_mgr(upipe);
    upipe_avcdec_clean_upump_mgr(upipe);

    upipe_clean(upipe);
    free(upipe_avcdec);
}
Example #2
0
/** helper phony pipe */
static void test_free(struct upipe *upipe)
{
    struct x264_test *x264_test = x264_test_from_upipe(upipe);
    upipe_throw_dead(upipe);
    upipe_clean(upipe);
    free(x264_test);
}
Example #3
0
/** @internal @This frees all resources allocated.
 *
 * @param upipe description structure of the pipe
 */
static void upipe_multicat_probe_free(struct upipe *upipe)
{
    struct upipe_multicat_probe *upipe_multicat_probe = upipe_multicat_probe_from_upipe(upipe);
    upipe_throw_dead(upipe);
    upipe_multicat_probe_clean_output(upipe);
    upipe_clean(upipe);
    free(upipe_multicat_probe);
}
Example #4
0
/** @internal @This frees all resources allocated.
 *
 * @param upipe description structure of the pipe
 */
static void upipe_skip_free(struct upipe *upipe)
{
    struct upipe_skip *upipe_skip = upipe_skip_from_upipe(upipe);
    upipe_dbg_va(upipe, "releasing pipe %p", upipe);
    upipe_throw_dead(upipe);

    upipe_skip_clean_output(upipe);

    upipe_clean(upipe);
    free(upipe_skip);
}
Example #5
0
/** @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);
}
Example #6
0
/** @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);
}
Example #7
0
/** helper phony pipe to test uprobe_upump_mgr */
static void uprobe_test_free(struct upipe *upipe)
{
    upipe_clean(upipe);
    free(upipe);
}
Example #8
0
/** helper phony pipe to count pictures */
static void count_free(struct upipe *upipe)
{
    upipe_clean(upipe);
    free(upipe);
}