hardkernel / linux

Linux kernel source tree
Other
428 stars 407 forks source link

V4l2 is not Supported #156

Closed spsingh closed 8 years ago

spsingh commented 8 years ago

Using gstreamer 1.0 on XU4 with code from branch odroidxu3-3.10.y results in the following log indicating that V4l2 is not supported.

0:00:01.756558125 ^[[332m 1849^[[00m 0xa60088c0 ^[[31;01mERROR ^[[00m ^[[00m v4l2 gstv4l2object.c:1637:gst_v4l2_object_get_interlace_mode:^[[00m Driver bug detected - check driver with v4l2-compliance from http://git.linuxtv.org/v4l-utils.git

And ultimately, video playback fails with

0:00:01.767332875 ^[[332m 1849^[[00m 0xa60088c0 ^[[33;01mWARN ^[[00m ^[[00m v4l2 gstv4l2object.c:3006:gst_v4l2_object_acquire_format:<v4l2video6dec0>^[[00m error: Video devices uses an unsupported pixel format. 0:00:01.767387208 ^[[332m 1849^[[00m 0xa60088c0 ^[[33;01mWARN ^[[00m ^[[00m v4l2 gstv4l2object.c:3006:gst_v4l2_object_acquire_format:<v4l2video6dec0>^[[00m error: V4L2 format YM12 not supported 0:00:01.767464583 ^[[332m 1849^[[00m 0xa60088c0 ^[[36mINFO ^[[00m ^[[00;01;31;47m GST_ERROR_SYSTEM gstelement.c:1835:gst_element_message_full:<v4l2video6dec0>^[[00m posting message: Video devices uses an unsupported pixel format. 0:00:01.767634958 ^[[332m 1849^[[00m 0xa60088c0 ^[[36mINFO ^[[00m ^[[00;01;31;47m GST_ERROR_SYSTEM gstelement.c:1858:gst_element_message_full:<v4l2video6dec0>^[[00m posted error message: Video devices uses an unsupported pixel format. 0:00:01.767684250 ^[[332m 1849^[[00m 0xa60088c0 ^[[31;01mERROR ^[[00m ^[[00m v4l2videodec gstv4l2videodec.c:567:gst_v4l2_video_dec_handle_frame:<v4l2video6dec0>^[[00m not negotiated 0:00:01.768254000 ^[[332m 1849^[[00m 0xa60088c0 ^[[36mINFO ^[[00m ^[[00m task gsttask.c:300:gst_task_func:<multiqueue0:src_0>^[[00m Task going to paused

The v4l2 compliance output is as below

` Driver Info: Driver name : MFC Card type : decoder Bus info : Driver version: 1.0.0 Capabilities : 0x04003003 Video Capture Video Capture Multiplanar Video Output Video Output Multiplanar Streaming

Compliance test for device /dev/video6 (not using libv4l2):

Required ioctls: fail: /home/spsingh/xu4mali/poky/build/tmp/work/cortexa15hf-vfp-neon-poky-linux-gnueabi/v4l-utils/1.6.2-r0/v4l-utils-1.6.2/utils/v4l2-compliance/v4l2-compliance.cpp(244): string empty fail: /home/spsingh/xu4mali/poky/build/tmp/work/cortexa15hf-vfp-neon-poky-linux-gnueabi/v4l-utils/1.6.2-r0/v4l-utils-1.6.2/utils/v4l2-compliance/v4l2-compliance.cpp(297): check_ustring(vcap.bus_info, sizeof(vcap.bus_info)) test VIDIOC_QUERYCAP: FAIL

Allow for multiple opens: test second video open: OK fail: /home/spsingh/xu4mali/poky/build/tmp/work/cortexa15hf-vfp-neon-poky-linux-gnueabi/v4l-utils/1.6.2-r0/v4l-utils-1.6.2/utils/v4l2-compliance/v4l2-compliance.cpp(244): string empty fail: /home/spsingh/xu4mali/poky/build/tmp/work/cortexa15hf-vfp-neon-poky-linux-gnueabi/v4l-utils/1.6.2-r0/v4l-utils-1.6.2/utils/v4l2-compliance/v4l2-compliance.cpp(297): check_ustring(vcap.bus_info, sizeof(vcap.bus_info)) test VIDIOC_QUERYCAP: FAIL fail: /home/spsingh/xu4mali/poky/build/tmp/work/cortexa15hf-vfp-neon-poky-linux-gnueabi/v4l-utils/1.6.2-r0/v4l-utils-1.6.2/utils/v4l2-compliance/v4l2-compliance.cpp(365): doioctl(node, VIDIOC_G_PRIORITY, &prio) test VIDIOC_G/S_PRIORITY: FAIL

Debug ioctls: test VIDIOC_DBG_G/S_REGISTER: OK (Not Supported) test VIDIOC_LOG_STATUS: OK (Not Supported)

Input ioctls: test VIDIOC_G/S_TUNER/ENUM_FREQ_BANDS: OK (Not Supported) test VIDIOC_G/S_FREQUENCY: OK (Not Supported) test VIDIOC_S_HW_FREQ_SEEK: OK (Not Supported) test VIDIOC_ENUMAUDIO: OK (Not Supported) test VIDIOC_G/S/ENUMINPUT: OK (Not Supported) test VIDIOC_G/S_AUDIO: OK (Not Supported) Inputs: 0 Audio Inputs: 0 Tuners: 0

Output ioctls: test VIDIOC_G/S_MODULATOR: OK (Not Supported) test VIDIOC_G/S_FREQUENCY: OK (Not Supported) test VIDIOC_ENUMAUDOUT: OK (Not Supported) test VIDIOC_G/S/ENUMOUTPUT: OK (Not Supported) test VIDIOC_G/S_AUDOUT: OK (Not Supported) Outputs: 0 Audio Outputs: 0 Modulators: 0

Input/Output configuration ioctls: test VIDIOC_ENUM/G/S/QUERY_STD: OK (Not Supported) test VIDIOC_ENUM/G/S/QUERY_DV_TIMINGS: OK (Not Supported) test VIDIOC_DV_TIMINGS_CAP: OK (Not Supported) test VIDIOC_G/S_EDID: OK (Not Supported)

Control ioctls:
    test VIDIOC_QUERY_EXT_CTRL/QUERYMENU: OK (Not Supported)
    test VIDIOC_QUERYCTRL: OK
    test VIDIOC_G/S_CTRL: OK
    fail: /home/spsingh/xu4mali/poky/build/tmp/work/cortexa15hf-vfp-neon-poky-linux-gnueabi/v4l-utils/1.6.2-r0/v4l-utils-1.6.2/utils/v4l2-compliance/v4l2-test-controls.cpp(573): g_ext_ctrls does not support count == 0
    test VIDIOC_G/S/TRY_EXT_CTRLS: FAIL
    test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: OK (Not Supported)
    test VIDIOC_G/S_JPEGCOMP: OK (Not Supported)
    Standard Controls: 0 Private Controls: 0

Format ioctls:
    fail: /home/spsingh/xu4mali/poky/build/tmp/work/cortexa15hf-vfp-neon-poky-linux-gnueabi/v4l-utils/1.6.2-r0/v4l-utils-1.6.2/utils/v4l2-compliance/v4l2-test-formats.cpp(287): Video Capture cap set, but no Video Capture formats defined
    test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: FAIL
    test VIDIOC_G/S_PARM: OK (Not Supported)
    test VIDIOC_G_FBUF: OK (Not Supported)
    fail: /home/spsingh/xu4mali/poky/build/tmp/work/cortexa15hf-vfp-neon-poky-linux-gnueabi/v4l-utils/1.6.2-r0/v4l-utils-1.6.2/utils/v4l2-compliance/v4l2-test-formats.cpp(557): Video Capture cap set, but no Video Capture formats defined
    test VIDIOC_G_FMT: FAIL
    test VIDIOC_TRY_FMT: OK (Not Supported)
    test VIDIOC_S_FMT: OK (Not Supported)
    test VIDIOC_G_SLICED_VBI_CAP: OK (Not Supported)

Codec ioctls:
    test VIDIOC_(TRY_)ENCODER_CMD: OK (Not Supported)
    test VIDIOC_G_ENC_INDEX: OK (Not Supported)
    test VIDIOC_(TRY_)DECODER_CMD: OK (Not Supported)

Buffer ioctls:
    test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: OK
    test VIDIOC_EXPBUF: OK (Not Supported)

Total: 39, Succeeded: 33, Failed: 6, Warnings: 0 `

mdrjr commented 8 years ago

Please, properly format code before posting it here..

Also, whats the output of the v4l utils compliance test? Does GST supports YM12?

spsingh commented 8 years ago

I have updated the formatting and also added the v4l utils compliance test report to the original post. yes GST supports YM12, It can be specified in the pipeline.

ardje commented 8 years ago

Hi,

0:00:01767332875 ^[[332m 1849^[[00m 0xa60088c0 ^[[33;01mWARN ^[[00m ^[[00m v4l2 gstv4l2objectc:3006:gst_v4l2_object_acquire_format:^[[00m error: Video devices uses an unsupported pixel format 0:00:01767387208 ^[[332m 1849^[[00m 0xa60088c0 ^[[33;01mWARN ^[[00m ^[[00m v4l2 gstv4l2objectc:3006:gst_v4l2_object_acquire_format:^[[00m error: V4L2 format YM12 not supported

If you are using playbin, please use these flags: GST_PLAY_FLAG_DEINTERLACE|GST_PLAY_FLAG_NATIVE_VIDEO|GST_PLAY_FLAG_SOFT_VOLUME|GST_PLAY_FLAG_AUDIO|GST_PLAY_FLAG_VIDEO or better: 0x253 I have it working that way. I think the problem is that the subtitling cannot be mixed allong the pipeline somehow. Anyway: I have this working: gst-launch-1.0 -v playbin uri="$1" video-sink=cluttersink flags=0x00000253 the gst is from memeka from a post on the odroid forum, that gives precedence to the V4L2 M2M codecs. If I leave out the flags, it will try to add more handling, and then it borks on the YM12 not supported.

I think you might have misread the error: "V4L2 format YM12" : not supported So the V4l2 is working correct, but YM12 format is just not supported by the gst subtitling pipeline I guess.

Use: gst-inspect-1.0 playbin to see the flags and the default...

Regards, Ard van Breemen

.signature not found

spsingh commented 8 years ago

I still get the same error message after using the flags you mention. I also built the gstreamer with the changes suggested by memeka, still the same issue.

spsingh commented 8 years ago

This issue is closed but I do not know of the solution can you please add any references to the solutions.