سؤال

As the title says I am not sure how to write an IplImage to a V4l2 loopback device. I know how to write to a device as I have posted here How to write/pipe to a virtual webcam created by V4L2loopback module?

But now I am not sure how I can exactly write IplImage objects in to the device. If I just write the image->imageData where image is an IplImage*, when I view the device using "luvcview" the malformed frames show up for about a second then it throws the following error.

luvcview 0.2.6

SDL information:
  Video driver: x11
  A window manager is available
Device information:
 Device path:  /dev/video3
Stream settings:
  Frame format: YUYV (MJPG is not supported by device)
  Frame size:   520x474 (requested size 640x480 is not supported by device)
  Frame rate:   30 fps
libv4l2: error dequeuing buf: Invalid argument
Unable to dequeue buffer: Invalid argument
Error grabbing
Cleanup done. Exiting ...

Could it be because I have not converted the opencv images to v4l2 format? or the v4l2 arguments does not match with the IplImage properties? If so how to do it?

If anyone knows what this error means please let me know.

I decided to post this question separately as this question is not about writing to the device its particularly about write an IplImage to the device.

Could anyone please give me a code snippet that shows how to write an IplImage to a V4l2 loopback device?

هل كانت مفيدة؟

المحلول

I worked out that the above issue was not an issue anymore as it seems that luvcview or skype does not fully support v4l2. But if I view the loopback device using VLC player, it works fine.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top