Tool/software: Linux
Hi, TI.
I have some problem in using gstreamer in capturing video from web cameras. My version of PSDK is 04_03_00_05.
gst-launch-1.0 --gst-debug=2 v4l2src device=/dev/video2 num-buffers=1000 io-mode=4 ! 'video/x-raw, format=(string)YUY2, width=(int)960, height=(int)720' ! vpe num-input-buffers=8 ! queue ! waylandsink
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
0:00:02.360030294 3080 0x149890 WARN waylandsink wlvideoformat.c:102:gst_wl_shm_format_to_video_format: gst video format not found
0:00:02.360118785 3080 0x149890 WARN waylandsink wlvideoformat.c:102:gst_wl_shm_format_to_video_format: gst video format not found
0:00:02.360421670 3080 0x149890 WARN waylandsink wlvideoformat.c:102:gst_wl_shm_format_to_video_format: gst video format not found
0:00:02.360453878 3080 0x149890 WARN waylandsink wlvideoformat.c:102:gst_wl_shm_format_to_video_format: gst video format not found
0:00:02.360909833 3080 0x149660 WARN waylandsink wlvideoformat.c:102:gst_wl_shm_format_to_video_format: gst video format not found
0:00:02.360995233 3080 0x149660 WARN waylandsink wlvideoformat.c:102:gst_wl_shm_format_to_video_format: gst video format not found
0:00:02.736983616 3080 0x149890 WARN waylandsink wlvideoformat.c:102:gst_wl_shm_format_to_video_format: gst video format not found
0:00:02.737249901 3080 0x149890 WARN waylandsink wlvideoformat.c:102:gst_wl_shm_format_to_video_format: gst video format not found
0:00:02.737876331 3080 0x149890 WARN waylandsink wlvideoformat.c:102:gst_wl_shm_format_to_video_format: gst video format not found
0:00:02.738047944 3080 0x149890 WARN waylandsink wlvideoformat.c:102:gst_wl_shm_format_to_video_format: gst video format not found
0:00:02.738575147 3080 0x149660 WARN waylandsink wlvideoformat.c:102:gst_wl_shm_format_to_video_format: gst video format not found
0:00:02.738739115 3080 0x149660 WARN waylandsink wlvideoformat.c:102:gst_wl_shm_format_to_video_format: gst video format not found
0:00:02.739231995 3080 0x149890 WARN vpe gstvpebufferpool.c:466:gst_vpe_buffer_pool_import: Allocating a new input buffer index: 0/128, 0
0:00:02.759363784 3080 0x149890 ERROR vpe gstvpebufferpool.c:380:gst_vpe_buffer_pool_queue: vpebufferpool: QBUF failed: Bad address, index = 31
0:00:02.759673989 3080 0x149630 WARN bufferpool gstbufferpool.c:300:do_alloc_buffer:<vpebufferpool1> alloc function failed
0:00:02.760006805 3080 0x149890 WARN basesrc gstbasesrc.c:2948:gst_base_src_loop:<v4l2src0> error: Internal data flow error.
0:00:02.761137501 3080 0x149890 WARN basesrc gstbasesrc.c:2948:gst_base_src_loop:<v4l2src0> error: streaming task paused, reason error (-5)
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data flow error.
Additional debug info:
../../../../gstreamer-1.8.3/libs/gst/base/gstbasesrc.c(2948): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
streaming task paused, reason error (-5)
Execution ended after 0:00:02.384171655
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
I studied the link and ...
1. increased cma
root@am57xx-evm:~# cat /proc/cmdline
console=ttyO2,115200n8 cma=64MiB root=PARTUUID=1ff95f4d-02 rw rootfstype=ext4 rootwait
2. yavta -c10 -fYUYV -Fvout_800x600_yuyv.yuv -s800x600 /dev/video2
Device /dev/video2 opened.
Device `HD Webcam C525' on `usb-xhci-hcd.1.auto-1.1' is a video output (without mplanes) device.
Video format set: YUYV (56595559) 800x600 (stride 1600) field none buffer size 960000
Video format: YUYV (56595559) 800x600 (stride 1600) field none buffer size 960000
8 buffers requested.
length: 960000 offset: 0 timestamp type/source: mono/SoE
Buffer 0/0 mapped at address 0xb6d14000.
length: 960000 offset: 962560 timestamp type/source: mono/SoE
Buffer 1/0 mapped at address 0xb6c29000.
length: 960000 offset: 1925120 timestamp type/source: mono/SoE
Buffer 2/0 mapped at address 0xb6b3e000.
length: 960000 offset: 2887680 timestamp type/source: mono/SoE
Buffer 3/0 mapped at address 0xb6a53000.
length: 960000 offset: 3850240 timestamp type/source: mono/SoE
Buffer 4/0 mapped at address 0xb6968000.
length: 960000 offset: 4812800 timestamp type/source: mono/SoE
Buffer 5/0 mapped at address 0xb687d000.
length: 960000 offset: 5775360 timestamp type/source: mono/SoE
Buffer 6/0 mapped at address 0xb6792000.
length: 960000 offset: 6737920 timestamp type/source: mono/SoE
Buffer 7/0 mapped at address 0xb66a7000.
0 (0) [-] none 0 960000 B 10301.404817 10301.701757 262.398 fps ts mono/SoE
1 (1) [-] none 1 960000 B 10301.704908 10301.745431 3.332 fps ts mono/SoE
2 (2) [-] none 2 960000 B 10301.745199 10301.785608 24.819 fps ts mono/SoE
3 (3) [-] none 3 960000 B 10301.785533 10301.829425 24.793 fps ts mono/SoE
4 (4) [-] none 4 960000 B 10301.829142 10301.869555 22.931 fps ts mono/SoE
5 (5) [-] none 5 960000 B 10301.869477 10301.913475 24.792 fps ts mono/SoE
6 (6) [-] none 6 960000 B 10301.913135 10301.953512 22.905 fps ts mono/SoE
7 (7) [-] none 7 960000 B 10301.953426 10301.997471 24.819 fps ts mono/SoE
8 (0) [-] none 8 960000 B 10301.997070 10302.037416 22.913 fps ts mono/SoE
9 (1) [-] none 9 960000 B 10302.037334 10302.081425 24.836 fps ts mono/SoE
Captured 10 frames in 0.680419 seconds (14.696822 fps, 14108949.078453 B/s).
8 buffers released.
3.Apply the patch from this thread.
But when I build the Linux kernel (sudo make linux) I had problems here:
drivers/media/usb/uvc/uvc_driver.c: In function 'uvc_probe':
drivers/media/usb/uvc/uvc_driver.c:2054:19: error: implicit declaration of function 'vb2_dma_contig_init_ctx' [-Werror=implicit-function-declaration]
dev->alloc_ctx = vb2_dma_contig_init_ctx(&intf->dev);
This is because there is no 'vb2_dma_contig_init_ctx' function in the '/opt/ti-processor-sdk-linux-am57xx-evm-04.03.00.05/board-support/linux-4.9.69+gitAUTOINC+9ce43c71ae-g9ce43c71ae/include/media/videobuf2-dma-contig.h' file
Please help me!