Android v4l2src device node issue
lma at spaceapplications.com
Tue Jun 24 07:16:48 PDT 2014
I have some gstreamer code that accesses an external webcam attached to an Android mobile device.
The webcam normally gets mounted on /dev/video3. I then access the webcam using the v4l2src element. The problems appears if the webcam is unplugged whilst reading video data.
When the device is unplugged, I detect an error and close all the resources, ie set the pipeline to NULL and then unreference the pipeline.
If I plug the device back in, it is mounted as /dev/video4. If I repeat the above process, it is mounted as /dev/video5 and so on.
It is as though the device node is not being closed properly and Android is allocating the next free one. Apart from closing the resources (as I'm already doing) is there any other way to close the associated webcam device node ?
I have even tried closing it through Java, but I'm not having any luck there either.
Can anyone help?
More information about the gstreamer-devel