I'm currently trying to get it working a 640x480 and seem to have encountered shared memory problems:-
Code: Select all
Aug 23 19:28:12 HomePC zmu[26014]: ERR [Can't shmget, probably not enough shared memory space free: Invalid argument]
I'm using a ring buffer setting of 40 and the webcam delivers 24-bit colour, so I'm assuming that my shared memory needs to be 40 x 640 x 480 x 3, or 36854000 bytes.
My existing shared memory is as follows....
Code: Select all
mike@HomePC:~$ cat /proc/sys/kernel/shmall
134217728
mike@HomePC:~$ cat /proc/sys/kernel/shmmax
134217728
The result of ipcs -l is:-
Code: Select all
------ Shared Memory Limits --------
max number of segments = 4096
max seg size (kbytes) = 131072
max total shared memory (kbytes) = 536870912
min seg size (bytes) = 1
------ Semaphore Limits --------
max number of arrays = 128
max semaphores per array = 250
max semaphores system wide = 32000
max ops per semop call = 32
semaphore max value = 32767
------ Messages: Limits --------
max queues system wide = 16
max size of message (bytes) = 8192
default max size of queue (bytes) = 16384
The problem of shared memory settings seems to arise again and again. Is there a definitive statement anywhere which will tell me how to set it without just adding to my confusion with more rumour and caveats?
I know how to set it in /etc/sysctl.conf, but I just have no idea what values to use!

Can anyone enlighten me... please?
If my shared memory is, in fact, OK for my single webcam, what's the likely cause of the shared memory entries in the log files?
The camera woks fine at 640x480 with VLC.
Thanks,
Mike