Android v4l2src device node issue
Lee Matthews
lma at spaceapplications.com
Wed Jun 25 00:31:02 PDT 2014
Hi Nicolas,
Thanks for that. I'm not sure how to test if there is a leak however, is it an increasing number of files in the /proc/$PID/fd each time the usb device is unplugged/plugged in ?
It certainly seems to be the case that the number of files is increasing.
Below is a printout of multiple ls commands in the /proc/$PID/fd folder, each ls ran after unplugging and re-plugging the usb device.
Thanks
Lee
--
130|root at hammerhead:/ # ls -la /proc/4487/fd
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 0 -> /dev/null
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 1 -> /dev/null
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 10 -> socket:[9230]
lr-x------ u0_a86 u0_a86 2014-06-24 18:42 11 -> /system/framework/okhttp.jar
lr-x------ u0_a86 u0_a86 2014-06-24 18:42 12 -> /system/framework/core-junit.jar
lr-x------ u0_a86 u0_a86 2014-06-24 18:42 13 -> /system/framework/bouncycastle.jar
lr-x------ u0_a86 u0_a86 2014-06-24 18:42 14 -> /system/framework/ext.jar
lr-x------ u0_a86 u0_a86 2014-06-24 18:42 15 -> /system/framework/framework.jar
lr-x------ u0_a86 u0_a86 2014-06-24 18:42 16 -> /system/framework/framework2.jar
lr-x------ u0_a86 u0_a86 2014-06-24 18:42 17 -> /system/framework/telephony-common.jar
lr-x------ u0_a86 u0_a86 2014-06-24 18:42 18 -> /system/framework/voip-common.jar
lr-x------ u0_a86 u0_a86 2014-06-24 18:42 19 -> /system/framework/mms-common.jar
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 2 -> /dev/null
lr-x------ u0_a86 u0_a86 2014-06-24 18:42 20 -> /system/framework/android.policy.jar
lr-x------ u0_a86 u0_a86 2014-06-24 18:42 21 -> /system/framework/services.jar
lr-x------ u0_a86 u0_a86 2014-06-24 18:42 22 -> /system/framework/apache-xml.jar
lr-x------ u0_a86 u0_a86 2014-06-24 18:42 23 -> /system/framework/webviewchromium.jar
l-wx------ u0_a86 u0_a86 2014-06-24 18:42 24 -> /dev/log/main
l-wx------ u0_a86 u0_a86 2014-06-24 18:42 25 -> /dev/log/radio
l-wx------ u0_a86 u0_a86 2014-06-24 18:42 26 -> /dev/log/events
l-wx------ u0_a86 u0_a86 2014-06-24 18:42 27 -> /dev/log/system
lr-x------ u0_a86 u0_a86 2014-06-24 18:42 28 -> /system/framework/framework.jar
l-wx------ u0_a86 u0_a86 2014-06-24 18:42 29 -> /sys/kernel/debug/tracing/trace_marker
l-wx------ u0_a86 u0_a86 2014-06-24 18:42 3 -> /dev/log/main
lr-x------ u0_a86 u0_a86 2014-06-24 18:42 30 -> /system/framework/framework-res.apk
lr-x------ u0_a86 u0_a86 2014-06-24 18:42 31 -> /system/framework/core.jar
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 32 -> socket:[9549]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 33 -> socket:[225213]
l-wx------ u0_a86 u0_a86 2014-06-24 18:42 34 -> /dev/cpuctl/apps/tasks
l-wx------ u0_a86 u0_a86 2014-06-24 18:42 35 -> /dev/cpuctl/apps/bg_non_interactive/tasks
lr-x------ u0_a86 u0_a86 2014-06-24 18:42 36 -> pipe:[225214]
l-wx------ u0_a86 u0_a86 2014-06-24 18:42 37 -> pipe:[225214]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 38 -> /dev/binder
lr-x------ u0_a86 u0_a86 2014-06-24 18:42 39 -> pipe:[225217]
l-wx------ u0_a86 u0_a86 2014-06-24 18:42 4 -> /dev/log/radio
l-wx------ u0_a86 u0_a86 2014-06-24 18:42 40 -> pipe:[225217]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 41 -> anon_inode:[eventpoll]
lr-x------ u0_a86 u0_a86 2014-06-24 18:42 42 -> /data/app/com.mobinet.mobinetbootapp-2.apk
lr-x------ u0_a86 u0_a86 2014-06-24 18:42 43 -> /data/app/com.mobinet.mobinetbootapp-2.apk
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 44 -> socket:[225228]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 45 -> socket:[226446]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 46 -> socket:[226447]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 47 -> socket:[226448]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 48 -> /dev/kgsl-3d0
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 49 -> socket:[225556]
l-wx------ u0_a86 u0_a86 2014-06-24 18:42 5 -> /dev/log/events
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 50 -> socket:[225559]
lr-x------ u0_a86 u0_a86 2014-06-24 18:42 51 -> /dev/ion
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 52 -> /dev/video3
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 53 -> socket:[225229]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 54 -> anon_inode:dmabuf
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 55 -> anon_inode:dmabuf
lr-x------ u0_a86 u0_a86 2014-06-24 18:42 56 -> /dev/ion
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 57 -> socket:[225235]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 58 -> anon_inode:dmabuf
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 59 -> anon_inode:dmabuf
l-wx------ u0_a86 u0_a86 2014-06-24 18:42 6 -> /dev/log/system
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 60 -> socket:[226501]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 61 -> socket:[226502]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 62 -> socket:[225236]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 63 -> anon_inode:[eventfd]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 64 -> anon_inode:[eventfd]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 65 -> /dev/video3
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 66 -> socket:[226509]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 67 -> socket:[225241]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 68 -> socket:[225242]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 69 -> socket:[225243]
lr-x------ u0_a86 u0_a86 2014-06-24 18:42 7 -> /system/framework/core.jar
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 70 -> socket:[225244]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 71 -> socket:[225245]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 72 -> socket:[225246]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 73 -> /dev/video3
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 74 -> socket:[225249]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 75 -> socket:[225250]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 76 -> socket:[225251]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 77 -> socket:[225252]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 78 -> /dev/video3
lr-x------ u0_a86 u0_a86 2014-06-24 18:42 8 -> /system/framework/conscrypt.jar
lr-x------ u0_a86 u0_a86 2014-06-24 18:42 9 -> /dev/__properties__
root at hammerhead:/ #
root at hammerhead:/ #
root at hammerhead:/ #
root at hammerhead:/ #
root at hammerhead:/ #
root at hammerhead:/ # ls -la /proc/4487/fd
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 0 -> /dev/null
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 1 -> /dev/null
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 10 -> socket:[9230]
lr-x------ u0_a86 u0_a86 2014-06-24 18:42 11 -> /system/framework/okhttp.jar
lr-x------ u0_a86 u0_a86 2014-06-24 18:42 12 -> /system/framework/core-junit.jar
lr-x------ u0_a86 u0_a86 2014-06-24 18:42 13 -> /system/framework/bouncycastle.jar
lr-x------ u0_a86 u0_a86 2014-06-24 18:42 14 -> /system/framework/ext.jar
lr-x------ u0_a86 u0_a86 2014-06-24 18:42 15 -> /system/framework/framework.jar
lr-x------ u0_a86 u0_a86 2014-06-24 18:42 16 -> /system/framework/framework2.jar
lr-x------ u0_a86 u0_a86 2014-06-24 18:42 17 -> /system/framework/telephony-common.jar
lr-x------ u0_a86 u0_a86 2014-06-24 18:42 18 -> /system/framework/voip-common.jar
lr-x------ u0_a86 u0_a86 2014-06-24 18:42 19 -> /system/framework/mms-common.jar
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 2 -> /dev/null
lr-x------ u0_a86 u0_a86 2014-06-24 18:42 20 -> /system/framework/android.policy.jar
lr-x------ u0_a86 u0_a86 2014-06-24 18:42 21 -> /system/framework/services.jar
lr-x------ u0_a86 u0_a86 2014-06-24 18:42 22 -> /system/framework/apache-xml.jar
lr-x------ u0_a86 u0_a86 2014-06-24 18:42 23 -> /system/framework/webviewchromium.jar
l-wx------ u0_a86 u0_a86 2014-06-24 18:42 24 -> /dev/log/main
l-wx------ u0_a86 u0_a86 2014-06-24 18:42 25 -> /dev/log/radio
l-wx------ u0_a86 u0_a86 2014-06-24 18:42 26 -> /dev/log/events
l-wx------ u0_a86 u0_a86 2014-06-24 18:42 27 -> /dev/log/system
lr-x------ u0_a86 u0_a86 2014-06-24 18:42 28 -> /system/framework/framework.jar
l-wx------ u0_a86 u0_a86 2014-06-24 18:42 29 -> /sys/kernel/debug/tracing/trace_marker
l-wx------ u0_a86 u0_a86 2014-06-24 18:42 3 -> /dev/log/main
lr-x------ u0_a86 u0_a86 2014-06-24 18:42 30 -> /system/framework/framework-res.apk
lr-x------ u0_a86 u0_a86 2014-06-24 18:42 31 -> /system/framework/core.jar
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 32 -> socket:[9549]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 33 -> socket:[225213]
l-wx------ u0_a86 u0_a86 2014-06-24 18:42 34 -> /dev/cpuctl/apps/tasks
l-wx------ u0_a86 u0_a86 2014-06-24 18:42 35 -> /dev/cpuctl/apps/bg_non_interactive/tasks
lr-x------ u0_a86 u0_a86 2014-06-24 18:42 36 -> pipe:[225214]
l-wx------ u0_a86 u0_a86 2014-06-24 18:42 37 -> pipe:[225214]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 38 -> /dev/binder
lr-x------ u0_a86 u0_a86 2014-06-24 18:42 39 -> pipe:[225217]
l-wx------ u0_a86 u0_a86 2014-06-24 18:42 4 -> /dev/log/radio
l-wx------ u0_a86 u0_a86 2014-06-24 18:42 40 -> pipe:[225217]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 41 -> anon_inode:[eventpoll]
lr-x------ u0_a86 u0_a86 2014-06-24 18:42 42 -> /data/app/com.mobinet.mobinetbootapp-2.apk
lr-x------ u0_a86 u0_a86 2014-06-24 18:42 43 -> /data/app/com.mobinet.mobinetbootapp-2.apk
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 44 -> socket:[225228]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 45 -> socket:[226446]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 46 -> socket:[226447]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 47 -> socket:[226448]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 48 -> /dev/kgsl-3d0
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 49 -> socket:[225556]
l-wx------ u0_a86 u0_a86 2014-06-24 18:42 5 -> /dev/log/events
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 50 -> socket:[225559]
lr-x------ u0_a86 u0_a86 2014-06-24 18:42 51 -> /dev/ion
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 52 -> /dev/video3 (deleted)
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 53 -> socket:[225229]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 54 -> anon_inode:dmabuf
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 55 -> anon_inode:dmabuf
lr-x------ u0_a86 u0_a86 2014-06-24 18:42 56 -> /dev/ion
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 57 -> socket:[225235]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 58 -> anon_inode:dmabuf
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 59 -> anon_inode:dmabuf
l-wx------ u0_a86 u0_a86 2014-06-24 18:42 6 -> /dev/log/system
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 60 -> socket:[226501]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 61 -> socket:[226502]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 62 -> socket:[225236]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 63 -> anon_inode:[eventfd]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 64 -> /dev/video4
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 65 -> anon_inode:[eventfd]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 66 -> socket:[227519]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 67 -> socket:[227520]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 68 -> /dev/video4
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 69 -> socket:[225243]
lr-x------ u0_a86 u0_a86 2014-06-24 18:42 7 -> /system/framework/core.jar
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 70 -> socket:[225244]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 71 -> socket:[225245]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 72 -> socket:[225246]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 73 -> /dev/video3 (deleted)
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 74 -> socket:[225249]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 75 -> socket:[225250]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 76 -> socket:[225251]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 77 -> socket:[225252]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 78 -> /dev/video3 (deleted)
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 79 -> socket:[227531]
lr-x------ u0_a86 u0_a86 2014-06-24 18:42 8 -> /system/framework/conscrypt.jar
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 80 -> /dev/video4
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 81 -> socket:[227525]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 82 -> socket:[227526]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 83 -> socket:[227527]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 84 -> socket:[227528]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 85 -> socket:[227529]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 86 -> socket:[227530]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 87 -> socket:[227532]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 88 -> socket:[227533]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 89 -> socket:[227534]
lr-x------ u0_a86 u0_a86 2014-06-24 18:42 9 -> /dev/__properties__
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 90 -> socket:[227535]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 91 -> /dev/video4
root at hammerhead:/ #
root at hammerhead:/ #
root at hammerhead:/ #
root at hammerhead:/ # ls -la /proc/4487/fd
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 0 -> /dev/null
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 1 -> /dev/null
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 10 -> socket:[9230]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 100 -> socket:[227680]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 101 -> socket:[227681]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 102 -> socket:[227682]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 103 -> socket:[227683]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 104 -> socket:[227684]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 105 -> socket:[227685]
lr-x------ u0_a86 u0_a86 2014-06-24 18:42 11 -> /system/framework/okhttp.jar
lr-x------ u0_a86 u0_a86 2014-06-24 18:42 12 -> /system/framework/core-junit.jar
lr-x------ u0_a86 u0_a86 2014-06-24 18:42 13 -> /system/framework/bouncycastle.jar
lr-x------ u0_a86 u0_a86 2014-06-24 18:42 14 -> /system/framework/ext.jar
lr-x------ u0_a86 u0_a86 2014-06-24 18:42 15 -> /system/framework/framework.jar
lr-x------ u0_a86 u0_a86 2014-06-24 18:42 16 -> /system/framework/framework2.jar
lr-x------ u0_a86 u0_a86 2014-06-24 18:42 17 -> /system/framework/telephony-common.jar
lr-x------ u0_a86 u0_a86 2014-06-24 18:42 18 -> /system/framework/voip-common.jar
lr-x------ u0_a86 u0_a86 2014-06-24 18:42 19 -> /system/framework/mms-common.jar
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 2 -> /dev/null
lr-x------ u0_a86 u0_a86 2014-06-24 18:42 20 -> /system/framework/android.policy.jar
lr-x------ u0_a86 u0_a86 2014-06-24 18:42 21 -> /system/framework/services.jar
lr-x------ u0_a86 u0_a86 2014-06-24 18:42 22 -> /system/framework/apache-xml.jar
lr-x------ u0_a86 u0_a86 2014-06-24 18:42 23 -> /system/framework/webviewchromium.jar
l-wx------ u0_a86 u0_a86 2014-06-24 18:42 24 -> /dev/log/main
l-wx------ u0_a86 u0_a86 2014-06-24 18:42 25 -> /dev/log/radio
l-wx------ u0_a86 u0_a86 2014-06-24 18:42 26 -> /dev/log/events
l-wx------ u0_a86 u0_a86 2014-06-24 18:42 27 -> /dev/log/system
lr-x------ u0_a86 u0_a86 2014-06-24 18:42 28 -> /system/framework/framework.jar
l-wx------ u0_a86 u0_a86 2014-06-24 18:42 29 -> /sys/kernel/debug/tracing/trace_marker
l-wx------ u0_a86 u0_a86 2014-06-24 18:42 3 -> /dev/log/main
lr-x------ u0_a86 u0_a86 2014-06-24 18:42 30 -> /system/framework/framework-res.apk
lr-x------ u0_a86 u0_a86 2014-06-24 18:42 31 -> /system/framework/core.jar
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 32 -> socket:[9549]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 33 -> socket:[225213]
l-wx------ u0_a86 u0_a86 2014-06-24 18:42 34 -> /dev/cpuctl/apps/tasks
l-wx------ u0_a86 u0_a86 2014-06-24 18:42 35 -> /dev/cpuctl/apps/bg_non_interactive/tasks
lr-x------ u0_a86 u0_a86 2014-06-24 18:42 36 -> pipe:[225214]
l-wx------ u0_a86 u0_a86 2014-06-24 18:42 37 -> pipe:[225214]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 38 -> /dev/binder
lr-x------ u0_a86 u0_a86 2014-06-24 18:42 39 -> pipe:[225217]
l-wx------ u0_a86 u0_a86 2014-06-24 18:42 4 -> /dev/log/radio
l-wx------ u0_a86 u0_a86 2014-06-24 18:42 40 -> pipe:[225217]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 41 -> anon_inode:[eventpoll]
lr-x------ u0_a86 u0_a86 2014-06-24 18:42 42 -> /data/app/com.mobinet.mobinetbootapp-2.apk
lr-x------ u0_a86 u0_a86 2014-06-24 18:42 43 -> /data/app/com.mobinet.mobinetbootapp-2.apk
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 44 -> socket:[225228]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 45 -> socket:[226446]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 46 -> socket:[226447]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 47 -> socket:[226448]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 48 -> /dev/kgsl-3d0
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 49 -> socket:[225556]
l-wx------ u0_a86 u0_a86 2014-06-24 18:42 5 -> /dev/log/events
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 50 -> socket:[225559]
lr-x------ u0_a86 u0_a86 2014-06-24 18:42 51 -> /dev/ion
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 52 -> /dev/video3 (deleted)
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 53 -> socket:[225229]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 54 -> anon_inode:dmabuf
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 55 -> anon_inode:dmabuf
lr-x------ u0_a86 u0_a86 2014-06-24 18:42 56 -> /dev/ion
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 57 -> socket:[225235]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 58 -> anon_inode:dmabuf
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 59 -> anon_inode:dmabuf
l-wx------ u0_a86 u0_a86 2014-06-24 18:42 6 -> /dev/log/system
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 60 -> socket:[226501]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 61 -> socket:[226502]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 62 -> socket:[225236]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 63 -> anon_inode:[eventfd]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 64 -> /dev/video4 (deleted)
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 65 -> /dev/video5
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 66 -> socket:[227519]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 67 -> socket:[227520]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 68 -> anon_inode:[eventfd]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 69 -> socket:[225243]
lr-x------ u0_a86 u0_a86 2014-06-24 18:42 7 -> /system/framework/core.jar
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 70 -> socket:[225244]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 71 -> socket:[225245]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 72 -> socket:[225246]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 73 -> /dev/video3 (deleted)
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 74 -> socket:[225249]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 75 -> socket:[225250]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 76 -> socket:[225251]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 77 -> socket:[225252]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 78 -> /dev/video3 (deleted)
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 79 -> socket:[227670]
lr-x------ u0_a86 u0_a86 2014-06-24 18:42 8 -> /system/framework/conscrypt.jar
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 80 -> /dev/video4 (deleted)
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 81 -> socket:[227671]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 82 -> /dev/video5
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 83 -> socket:[227527]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 84 -> socket:[227528]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 85 -> socket:[227529]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 86 -> socket:[227530]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 87 -> socket:[227532]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 88 -> socket:[227533]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 89 -> socket:[227534]
lr-x------ u0_a86 u0_a86 2014-06-24 18:42 9 -> /dev/__properties__
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 90 -> socket:[227535]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 91 -> /dev/video4 (deleted)
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 92 -> /dev/video5
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 93 -> socket:[227674]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 94 -> socket:[227675]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 95 -> socket:[227676]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 96 -> socket:[227677]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 97 -> /dev/video5
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 98 -> socket:[227686]
root at hammerhead:/ #
root at hammerhead:/ #
root at hammerhead:/ #
root at hammerhead:/ #
root at hammerhead:/ # ls -la /proc/4487/fd
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 0 -> /dev/null
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 1 -> /dev/null
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 10 -> socket:[9230]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 100 -> /dev/video6
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 101 -> socket:[227827]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 102 -> socket:[227682]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 103 -> socket:[227683]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 104 -> socket:[227684]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 105 -> socket:[227685]
lrwx------ u0_a86 u0_a86 2014-06-24 18:43 106 -> /dev/video6
lrwx------ u0_a86 u0_a86 2014-06-24 18:43 107 -> socket:[227821]
lrwx------ u0_a86 u0_a86 2014-06-24 18:43 108 -> socket:[227822]
lrwx------ u0_a86 u0_a86 2014-06-24 18:43 109 -> socket:[227823]
lr-x------ u0_a86 u0_a86 2014-06-24 18:42 11 -> /system/framework/okhttp.jar
lrwx------ u0_a86 u0_a86 2014-06-24 18:43 110 -> socket:[227824]
lrwx------ u0_a86 u0_a86 2014-06-24 18:43 111 -> socket:[227825]
lrwx------ u0_a86 u0_a86 2014-06-24 18:43 112 -> socket:[227826]
lrwx------ u0_a86 u0_a86 2014-06-24 18:43 113 -> socket:[227828]
lrwx------ u0_a86 u0_a86 2014-06-24 18:43 114 -> socket:[227829]
lrwx------ u0_a86 u0_a86 2014-06-24 18:43 115 -> socket:[227830]
lrwx------ u0_a86 u0_a86 2014-06-24 18:43 116 -> socket:[227831]
lrwx------ u0_a86 u0_a86 2014-06-24 18:43 117 -> /dev/video6
lr-x------ u0_a86 u0_a86 2014-06-24 18:42 12 -> /system/framework/core-junit.jar
lr-x------ u0_a86 u0_a86 2014-06-24 18:42 13 -> /system/framework/bouncycastle.jar
lr-x------ u0_a86 u0_a86 2014-06-24 18:42 14 -> /system/framework/ext.jar
lr-x------ u0_a86 u0_a86 2014-06-24 18:42 15 -> /system/framework/framework.jar
lr-x------ u0_a86 u0_a86 2014-06-24 18:42 16 -> /system/framework/framework2.jar
lr-x------ u0_a86 u0_a86 2014-06-24 18:42 17 -> /system/framework/telephony-common.jar
lr-x------ u0_a86 u0_a86 2014-06-24 18:42 18 -> /system/framework/voip-common.jar
lr-x------ u0_a86 u0_a86 2014-06-24 18:42 19 -> /system/framework/mms-common.jar
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 2 -> /dev/null
lr-x------ u0_a86 u0_a86 2014-06-24 18:42 20 -> /system/framework/android.policy.jar
lr-x------ u0_a86 u0_a86 2014-06-24 18:42 21 -> /system/framework/services.jar
lr-x------ u0_a86 u0_a86 2014-06-24 18:42 22 -> /system/framework/apache-xml.jar
lr-x------ u0_a86 u0_a86 2014-06-24 18:42 23 -> /system/framework/webviewchromium.jar
l-wx------ u0_a86 u0_a86 2014-06-24 18:42 24 -> /dev/log/main
l-wx------ u0_a86 u0_a86 2014-06-24 18:42 25 -> /dev/log/radio
l-wx------ u0_a86 u0_a86 2014-06-24 18:42 26 -> /dev/log/events
l-wx------ u0_a86 u0_a86 2014-06-24 18:42 27 -> /dev/log/system
lr-x------ u0_a86 u0_a86 2014-06-24 18:42 28 -> /system/framework/framework.jar
l-wx------ u0_a86 u0_a86 2014-06-24 18:42 29 -> /sys/kernel/debug/tracing/trace_marker
l-wx------ u0_a86 u0_a86 2014-06-24 18:42 3 -> /dev/log/main
lr-x------ u0_a86 u0_a86 2014-06-24 18:42 30 -> /system/framework/framework-res.apk
lr-x------ u0_a86 u0_a86 2014-06-24 18:42 31 -> /system/framework/core.jar
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 32 -> socket:[9549]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 33 -> socket:[225213]
l-wx------ u0_a86 u0_a86 2014-06-24 18:42 34 -> /dev/cpuctl/apps/tasks
l-wx------ u0_a86 u0_a86 2014-06-24 18:42 35 -> /dev/cpuctl/apps/bg_non_interactive/tasks
lr-x------ u0_a86 u0_a86 2014-06-24 18:42 36 -> pipe:[225214]
l-wx------ u0_a86 u0_a86 2014-06-24 18:42 37 -> pipe:[225214]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 38 -> /dev/binder
lr-x------ u0_a86 u0_a86 2014-06-24 18:42 39 -> pipe:[225217]
l-wx------ u0_a86 u0_a86 2014-06-24 18:42 4 -> /dev/log/radio
l-wx------ u0_a86 u0_a86 2014-06-24 18:42 40 -> pipe:[225217]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 41 -> anon_inode:[eventpoll]
lr-x------ u0_a86 u0_a86 2014-06-24 18:42 42 -> /data/app/com.mobinet.mobinetbootapp-2.apk
lr-x------ u0_a86 u0_a86 2014-06-24 18:42 43 -> /data/app/com.mobinet.mobinetbootapp-2.apk
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 44 -> socket:[225228]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 45 -> socket:[226446]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 46 -> socket:[226447]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 47 -> socket:[226448]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 48 -> /dev/kgsl-3d0
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 49 -> socket:[225556]
l-wx------ u0_a86 u0_a86 2014-06-24 18:42 5 -> /dev/log/events
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 50 -> socket:[225559]
lr-x------ u0_a86 u0_a86 2014-06-24 18:42 51 -> /dev/ion
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 52 -> /dev/video3 (deleted)
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 53 -> socket:[225229]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 54 -> anon_inode:dmabuf
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 55 -> anon_inode:dmabuf
lr-x------ u0_a86 u0_a86 2014-06-24 18:42 56 -> /dev/ion
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 57 -> socket:[225235]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 58 -> anon_inode:dmabuf
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 59 -> anon_inode:dmabuf
l-wx------ u0_a86 u0_a86 2014-06-24 18:42 6 -> /dev/log/system
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 60 -> socket:[226501]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 61 -> socket:[226502]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 62 -> socket:[225236]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 63 -> anon_inode:[eventfd]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 64 -> /dev/video4 (deleted)
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 65 -> /dev/video5 (deleted)
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 66 -> socket:[227519]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 67 -> socket:[227520]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 68 -> /dev/video6
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 69 -> socket:[225243]
lr-x------ u0_a86 u0_a86 2014-06-24 18:42 7 -> /system/framework/core.jar
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 70 -> socket:[225244]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 71 -> socket:[225245]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 72 -> socket:[225246]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 73 -> /dev/video3 (deleted)
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 74 -> socket:[225249]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 75 -> socket:[225250]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 76 -> socket:[225251]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 77 -> socket:[225252]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 78 -> /dev/video3 (deleted)
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 79 -> socket:[227670]
lr-x------ u0_a86 u0_a86 2014-06-24 18:42 8 -> /system/framework/conscrypt.jar
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 80 -> /dev/video4 (deleted)
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 81 -> socket:[227671]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 82 -> anon_inode:[eventfd]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 83 -> socket:[227527]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 84 -> socket:[227528]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 85 -> socket:[227529]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 86 -> socket:[227530]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 87 -> socket:[227532]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 88 -> socket:[227533]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 89 -> socket:[227534]
lr-x------ u0_a86 u0_a86 2014-06-24 18:42 9 -> /dev/__properties__
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 90 -> socket:[227535]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 91 -> /dev/video4 (deleted)
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 92 -> /dev/video5 (deleted)
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 93 -> socket:[227674]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 94 -> socket:[227675]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 95 -> socket:[227676]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 96 -> socket:[227677]
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 97 -> /dev/video5 (deleted)
lrwx------ u0_a86 u0_a86 2014-06-24 18:42 98 -> socket:[227815]
lrwx------ u0_a86 u0_a86 2014-06-24 18:43 99 -> socket:[227816]
root at hammerhead:/ #
----- Original Message -----
From: "Nicolas Dufresne" <nicolas.dufresne at collabora.com>
To: "Discussion of the development of and with GStreamer" <gstreamer-devel at lists.freedesktop.org>
Sent: Tuesday, 24 June, 2014 5:29:51 PM
Subject: Re: Android v4l2src device node issue
Hi Lee,
Le mardi 24 juin 2014 à 16:16 +0200, Lee Matthews a écrit :
> Hi,
>
> 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.
It is likely there is a bug in this error handling. One would have to
check, I think you can check this by monitoring the process opened FD
(see if it increase, see /proc/$PID/fd). If it leaks, please report on
bugs.gnome.org, mention the GStreamer version you are running.
>
> 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.
Even without leaks, it is not guarantied that the device number will be
the same. In current dev tree, we have introduced the device monitor,
that let you watch devices as they appear and disappear.
>
> 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?
>
> Thanks
> Lee
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
_______________________________________________
gstreamer-devel mailing list
gstreamer-devel at lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
More information about the gstreamer-devel
mailing list