static void h264_enc_unconfigure(VTH264EncCtx *ctx) { VTCompressionSessionInvalidate(ctx->session); CFRelease(ctx->session); ms_queue_flush(&ctx->queue); rfc3984_uninit(&ctx->packer_ctx); ctx->is_configured = FALSE; }
static void dec_uninit(MSFilter *f){ DecData *d=(DecData*)f->data; rfc3984_uninit(&d->unpacker); avcodec_close(&d->av_context); if (d->yuv_msg) freemsg(d->yuv_msg); if (d->sps) freemsg(d->sps); if (d->pps) freemsg(d->pps); ms_free(d->bitstream); ms_free(d); }
static void h264_dec_uninit(MSFilter *f) { VTH264DecCtx *ctx = (VTH264DecCtx *)f->data; rfc3984_uninit(&ctx->unpacker); if(ctx->session) h264_dec_uninit_decoder(ctx); ms_queue_flush(&ctx->queue); ms_mutex_destroy(&ctx->mutex); ms_yuv_buf_allocator_free(ctx->pixbuf_allocator); ms_free(f->data); }
static void dec_uninit(MSFilter *f){ DecData *d=(DecData*)f->data; rfc3984_uninit(&d->unpacker); AMediaCodec_stop(d->codec); AMediaCodec_delete(d->codec); if (d->sps) freemsg(d->sps); if (d->pps) freemsg(d->pps); ms_free(d->bitstream); ms_yuv_buf_allocator_free(d->buf_allocator); ms_free(d); }
static void dec_uninit(MSFilter *f){ DecData *d = (DecData*)f->data; JNIEnv *jni_env = NULL; JavaVM *jvm = ms_get_jvm(); (*jvm)->AttachCurrentThread(jvm, &jni_env, NULL); (*jni_env)->DeleteGlobalRef(jni_env, d->input_data); (*jni_env)->DeleteGlobalRef(jni_env, d->output_data); (*jvm)->DetachCurrentThread(jvm); rfc3984_uninit(&d->unpacker); if (d->yuv_msg) freemsg(d->yuv_msg); if (d->sps) freemsg(d->sps); if (d->pps) freemsg(d->pps); ms_free(d->bitstream); ms_free(d); }