I't trying to access to a dummy v4l2 camera from Unity3D.
The dummy camera is created with gstreamer
gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,format=YUY2,width=640,height=480 !v4l2sink device=/dev/video1
and works when used like
gst-launch-1.0 v4l2src device=/dev/video1 ! xvimagesink
The output of v4l2-ctl
v4l2-ctl --list-formats-ext -d /dev/video1
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)
But the application - that works just fine with the webcam itself on /dev/video0 - when pointed to /dev/video1 just doesn't show anything.
Looking at Player.log in ~/.config/unity3d I find
Camera 0: HP HD Camera (/dev/video0)
(Filename: Line: 93)
Camera 1: Dummy video device (0x0000) (/dev/video1)
(Filename: Line: 93)
UnityEngine.WebCamDevice[]
(Filename: /home/builduser/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)
Error dequeuing image buffer: No such file or directory
(Filename: Line: 326)
I'm not sure on how to proceed from here in fixing some error in the unity application and/or gstreamer pipeline.