diff options
author | iive <iive@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2011-06-26 14:42:35 +0000 |
---|---|---|
committer | Uoti Urpala <uau@mplayer2.org> | 2011-07-06 13:01:08 +0300 |
commit | 860e66818b6f93d80f0e61763de21892c8596dc0 (patch) | |
tree | 125e6fc62260eed1cae4e36c5afe0d7ad4471501 /configure | |
parent | 01e441dddc3cb9677819513b9ef32f502c58c2fd (diff) |
stream/tvi_v4l[2]: fix calculation of free RAM for buffers
Do a proper calculation of free RAM to be used as V4L buffers.
The code uses sysinfo to query the available RAM, however it used
ancient form available in some early development 2.3.x kernels.
Newer form reports the size in memory units (usually same as page size),
as result the code would fall back on 2 buffers even on multi GB system.
The commit does: Improve the check in configure to ensure that we
do use sysinfo struct with present mem_unit. Use free RAM instead of
total RAM (to avoid swapping). Tweak memory constants and simplify code.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33732 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -3551,7 +3551,7 @@ fi #if sunos echocheck "sys/sysinfo.h" _sys_sysinfo=no -statement_check sys/sysinfo.h 'struct sysinfo s_info; sysinfo(&s_info)' && _sys_sysinfo=yes +statement_check sys/sysinfo.h 'struct sysinfo s_info; s_info.mem_unit=0; sysinfo(&s_info)' && _sys_sysinfo=yes if test "$_sys_sysinfo" = yes ; then def_sys_sysinfo_h='#define HAVE_SYS_SYSINFO_H 1' else |