Lines Matching refs:internal
128 if (ctx->internal->hw_type->device_uninit) in hwdevice_ctx_free()
129 ctx->internal->hw_type->device_uninit(ctx); in hwdevice_ctx_free()
134 av_buffer_unref(&ctx->internal->source_device); in hwdevice_ctx_free()
137 av_freep(&ctx->internal->priv); in hwdevice_ctx_free()
138 av_freep(&ctx->internal); in hwdevice_ctx_free()
162 ctx->internal = av_mallocz(sizeof(*ctx->internal)); in av_hwdevice_ctx_alloc()
163 if (!ctx->internal) in av_hwdevice_ctx_alloc()
167 ctx->internal->priv = av_mallocz(hw_type->device_priv_size); in av_hwdevice_ctx_alloc()
168 if (!ctx->internal->priv) in av_hwdevice_ctx_alloc()
187 ctx->internal->hw_type = hw_type; in av_hwdevice_ctx_alloc()
192 if (ctx->internal) in av_hwdevice_ctx_alloc()
193 av_freep(&ctx->internal->priv); in av_hwdevice_ctx_alloc()
194 av_freep(&ctx->internal); in av_hwdevice_ctx_alloc()
205 if (ctx->internal->hw_type->device_init) { in av_hwdevice_ctx_init()
206 ret = ctx->internal->hw_type->device_init(ctx); in av_hwdevice_ctx_init()
213 if (ctx->internal->hw_type->device_uninit) in av_hwdevice_ctx_init()
214 ctx->internal->hw_type->device_uninit(ctx); in av_hwdevice_ctx_init()
228 if (ctx->internal->pool_internal) in hwframe_ctx_free()
229 av_buffer_pool_uninit(&ctx->internal->pool_internal); in hwframe_ctx_free()
231 if (ctx->internal->hw_type->frames_uninit) in hwframe_ctx_free()
232 ctx->internal->hw_type->frames_uninit(ctx); in hwframe_ctx_free()
237 av_buffer_unref(&ctx->internal->source_frames); in hwframe_ctx_free()
242 av_freep(&ctx->internal->priv); in hwframe_ctx_free()
243 av_freep(&ctx->internal); in hwframe_ctx_free()
250 const HWContextType *hw_type = device_ctx->internal->hw_type; in av_hwframe_ctx_alloc()
258 ctx->internal = av_mallocz(sizeof(*ctx->internal)); in av_hwframe_ctx_alloc()
259 if (!ctx->internal) in av_hwframe_ctx_alloc()
263 ctx->internal->priv = av_mallocz(hw_type->frames_priv_size); in av_hwframe_ctx_alloc()
264 if (!ctx->internal->priv) in av_hwframe_ctx_alloc()
290 ctx->internal->hw_type = hw_type; in av_hwframe_ctx_alloc()
297 if (ctx->internal) in av_hwframe_ctx_alloc()
298 av_freep(&ctx->internal->priv); in av_hwframe_ctx_alloc()
299 av_freep(&ctx->internal); in av_hwframe_ctx_alloc()
339 if (ctx->internal->source_frames) { in av_hwframe_ctx_init()
345 for (pix_fmt = ctx->internal->hw_type->pix_fmts; *pix_fmt != AV_PIX_FMT_NONE; pix_fmt++) { in av_hwframe_ctx_init()
352 av_get_pix_fmt_name(ctx->format), ctx->internal->hw_type->name); in av_hwframe_ctx_init()
362 if (ctx->internal->hw_type->frames_init) { in av_hwframe_ctx_init()
363 ret = ctx->internal->hw_type->frames_init(ctx); in av_hwframe_ctx_init()
368 if (ctx->internal->pool_internal && !ctx->pool) in av_hwframe_ctx_init()
369 ctx->pool = ctx->internal->pool_internal; in av_hwframe_ctx_init()
380 if (ctx->internal->hw_type->frames_uninit) in av_hwframe_ctx_init()
381 ctx->internal->hw_type->frames_uninit(ctx); in av_hwframe_ctx_init()
391 if (!ctx->internal->hw_type->transfer_get_formats) in av_hwframe_transfer_get_formats()
394 return ctx->internal->hw_type->transfer_get_formats(ctx, dir, formats); in av_hwframe_transfer_get_formats()
463 if (src_ctx->internal->source_frames) { in av_hwframe_transfer_data()
470 if (dst_ctx->internal->source_frames) { in av_hwframe_transfer_data()
477 ret = src_ctx->internal->hw_type->transfer_data_from(src_ctx, dst, src); in av_hwframe_transfer_data()
479 ret = dst_ctx->internal->hw_type->transfer_data_to(dst_ctx, dst, src); in av_hwframe_transfer_data()
486 ret = ctx->internal->hw_type->transfer_data_from(ctx, dst, src); in av_hwframe_transfer_data()
492 ret = ctx->internal->hw_type->transfer_data_to(ctx, dst, src); in av_hwframe_transfer_data()
507 if (ctx->internal->source_frames) { in av_hwframe_get_buffer()
521 ret = av_hwframe_get_buffer(ctx->internal->source_frames, in av_hwframe_get_buffer()
529 ctx->internal->source_allocation_map_flags); in av_hwframe_get_buffer()
544 if (!ctx->internal->hw_type->frames_get_buffer) in av_hwframe_get_buffer()
554 ret = ctx->internal->hw_type->frames_get_buffer(ctx, frame); in av_hwframe_get_buffer()
568 const HWContextType *hw_type = ctx->internal->hw_type; in av_hwdevice_hwconfig_alloc()
580 const HWContextType *hw_type = ctx->internal->hw_type; in av_hwdevice_get_hwframe_constraints()
624 if (!device_ctx->internal->hw_type->device_create) { in av_hwdevice_ctx_create()
629 ret = device_ctx->internal->hw_type->device_create(device_ctx, device, in av_hwdevice_ctx_create()
666 tmp_ref = tmp_ctx->internal->source_device; in av_hwdevice_ctx_create_derived_opts()
679 if (dst_ctx->internal->hw_type->device_derive) { in av_hwdevice_ctx_create_derived_opts()
680 ret = dst_ctx->internal->hw_type->device_derive(dst_ctx, in av_hwdevice_ctx_create_derived_opts()
685 dst_ctx->internal->source_device = av_buffer_ref(src_ref); in av_hwdevice_ctx_create_derived_opts()
686 if (!dst_ctx->internal->source_device) { in av_hwdevice_ctx_create_derived_opts()
698 tmp_ref = tmp_ctx->internal->source_device; in av_hwdevice_ctx_create_derived_opts()
802 (src_frames->internal->source_frames && in av_hwframe_map()
803 src_frames->internal->source_frames->data == in av_hwframe_map()
824 src_frames->internal->hw_type->map_from) { in av_hwframe_map()
825 ret = src_frames->internal->hw_type->map_from(src_frames, in av_hwframe_map()
836 dst_frames->internal->hw_type->map_to) { in av_hwframe_map()
837 ret = dst_frames->internal->hw_type->map_to(dst_frames, in av_hwframe_map()
858 if (src->internal->source_frames) { in av_hwframe_ctx_create_derived()
860 (AVHWFramesContext*)src->internal->source_frames->data; in av_hwframe_ctx_create_derived()
868 av_buffer_ref(src->internal->source_frames); in av_hwframe_ctx_create_derived()
890 dst->internal->source_frames = av_buffer_ref(source_frame_ctx); in av_hwframe_ctx_create_derived()
891 if (!dst->internal->source_frames) { in av_hwframe_ctx_create_derived()
896 dst->internal->source_allocation_map_flags = in av_hwframe_ctx_create_derived()
903 if (src->internal->hw_type->frames_derive_from) in av_hwframe_ctx_create_derived()
904 ret = src->internal->hw_type->frames_derive_from(dst, src, flags); in av_hwframe_ctx_create_derived()
906 dst->internal->hw_type->frames_derive_to) in av_hwframe_ctx_create_derived()
907 ret = dst->internal->hw_type->frames_derive_to(dst, src, flags); in av_hwframe_ctx_create_derived()
918 av_buffer_unref(&dst->internal->source_frames); in av_hwframe_ctx_create_derived()