I'm trying to set up Apple's VDA on Mac OS X 10.7 with libav but I'm not sure how this is done. I read the source, and it seems I must pass a vda_context struct as a hwaccel_context to the AVCodecContext. I've filled the vda_context fields and assigned it as a hwaccel_context, but it doesn't seem to be doing anything:
./configure --enable-vda --enable-hwaccels I can confirm it's being compiled in: CC libavcodec/vda.o libavcodec/vda.c: In function ‘ff_vda_create_decoder’: libavcodec/vda.c:182: warning: passing argument 3 of ‘VDADecoderCreate’ from incompatible pointer type CC libavcodec/vda_h264.o Now I set up my decode context: AVCodecContext *vcodecCtx = NULL; /* find and open decoder, etc. */ struct vda_context vda_ctx; vda_ctx.decoder = NULL; //set by libavcodec according to source vda_ctx.width = vcodecCtx->width; vda_ctx.width = vcodecCtx->height; vda_ctx.format = 'avc1'; vda_ctx.cv_pix_fmt_type = 'y420'; vcodecCtx->hwaccel_context = &vda_ctx; Do I retrieve frames the same way I would using the normal, non-accelerated method? In other words, do I decode using avcodec_decode_video2 and pass my AVCodecContext as usual? Or is there something special I need to do since the input data is now being routed through the VDA decoder? _______________________________________________ libav-api mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-api
