NvVideoConverter and V4L2

Hello,

I am looking at samples/12_camera_v4l2_cuda and I would like to know what data stream is coming out of /dev/nvhost-vic ? Basically, I have difficulties understanding the link between converter and camera stream. Why is converter’s output and capture planes dequeuing v4l2_buffer when the data is showing up on /dev/video0 ?

Thank you.

Hi,
You may try to run it with a USB camera.
First, get the format via v4l2-ctl:

nvidia@tegra-ubuntu:~/tegra_multimedia_api/samples/12_camera_v4l2_cuda$ v4l2-ctl -d /dev/video1 --list-formats-ext
ioctl: VIDIOC_ENUM_FMT
        Index       : 0
        Type        : Video Capture
        Pixel Format: 'YUYV'
        Name        : YUYV 4:2:2
                Size: Discrete 640x480
                        Interval: Discrete 0.033s (30.000 fps)
                        Interval: Discrete 0.042s (24.000 fps)
                        Interval: Discrete 0.050s (20.000 fps)
                        Interval: Discrete 0.067s (15.000 fps)
                        Interval: Discrete 0.100s (10.000 fps)
                        Interval: Discrete 0.133s (7.500 fps)
                        Interval: Discrete 0.200s (5.000 fps)

And configure it to run the app:

nvidia@tegra-ubuntu:~/tegra_multimedia_api/samples/12_camera_v4l2_cuda$ ./camera_v4l2_cuda -d /dev/video1 <b>-s 640x480 -f YUYV</b>
Failed to query video capabilities: Inappropriate ioctl for device
libv4l2_nvvidconv (0):(774) (INFO) : Allocating (4) OUTPUT PLANE BUFFERS Layout=0
libv4l2_nvvidconv (0):(790) (INFO) : Allocating (4) CAPTURE PLANE BUFFERS Layout=0
[INFO] (NvEglRenderer.cpp:109) <renderer0> Setting Screen width 640 height 480
^CQuit due to exit command from user!
----------- Element = renderer0 -----------
Total Profiling time = 3.63215
Average FPS = 30.0098
Total units processed = 110
Num. of late units = 105
-------------------------------------

Hi DaneLLL,

I have already tried that but I still don’t know how output plane and capture plane threads get to dequeue v4l2 buffer when the main thread is receiving frame from camera(/dev/video0). I guess I’d like to know which entity is sending data on /dev/nvhost-vic?

Hi,
We have controlled it through NvVideoConverter. Beffers are sent to converter via output_plane.qBuffer(). And after the conversion is done, it calls conv_capture_dqbuf_thread_callback().