[FFmpeg-devel] [PATCHv8] libavcodec: v4l2: add support for v4l2 mem2mem codecs

Mark Thompson sw at jkqxz.net
Sun Sep 3 15:53:44 EEST 2017


On 03/09/17 13:20, Jorge Ramirez wrote:
> On 09/03/2017 02:27 AM, Mark Thompson wrote:
>>> +# check V4L2 codecs available in the API
>>>   check_header linux/fb.h
>>>   check_header linux/videodev.h
>>>   check_header linux/videodev2.h
>>>   check_code cc linux/videodev2.h "struct v4l2_frmsizeenum vfse; vfse.discrete.width = 0;" && enable_safe struct_v4l2_frmivalenum_discrete
>>> +check_code cc linux/videodev2.h "int i = V4L2_CAP_VIDEO_M2M_MPLANE | V4L2_CAP_VIDEO_M2M | V4L2_BUF_FLAG_LAST;" || disable v4l2_m2m
>>> +check_code cc linux/videodev2.h "int i = V4L2_PIX_FMT_VC1_ANNEX_G;" && enable vc1_v4l2_m2m
>>> +check_code cc linux/videodev2.h "int i = V4L2_PIX_FMT_MPEG1;" && enable mpeg1_v4l2_m2m
>>> +check_code cc linux/videodev2.h "int i = V4L2_PIX_FMT_MPEG2;" && enable mpeg2_v4l2_m2m
>>> +check_code cc linux/videodev2.h "int i = V4L2_PIX_FMT_MPEG4;" && enable mpeg4_v4l2_m2m
>>> +check_code cc linux/videodev2.h "int i = V4L2_PIX_FMT_HEVC;" && enable hevc_v4l2_m2m
>>> +check_code cc linux/videodev2.h "int i = V4L2_PIX_FMT_H263;" && enable h263_v4l2_m2m
>>> +check_code cc linux/videodev2.h "int i = V4L2_PIX_FMT_H264;" && enable h264_v4l2_m2m
>>> +check_code cc linux/videodev2.h "int i = V4L2_PIX_FMT_VP8;" && enable vp8_v4l2_m2m
>>> +check_code cc linux/videodev2.h "int i = V4L2_PIX_FMT_VP9;" && enable vp9_v4l2_m2m
>> I think these need to appear as named config options somewhere.  It doesn't currently detect anything for me, even with e.g. --enable-v4l2-m2m --enable-encoder=h264_v4l2m2m.
>>
> 
> I dont think that would bring much value to be honest: since the ffmpeg project doesn't contain a copy of linux/videodev2.h - something strongly rejected by the maintainers - forcing the options would just cause a build error so you would not gain anything.
> 
> do you have videodev2.h in your system? (in /usr/include/linux for instance)

Yes, it detected correctly in a previous version of the patch.  I think it might be something to do with the recent build system updates - maybe rebase and try again yourself.

- Mark


More information about the ffmpeg-devel mailing list