~medibuntu-maintainers/mplayer/medibuntu.precise

« back to all changes in this revision

Viewing changes to stream/tvi_v4l2.c

  • Committer: Package Import Robot
  • Author(s): Reinhard Tartler
  • Date: 2012-01-12 22:23:28 UTC
  • mfrom: (0.4.7 sid)
  • mto: This revision was merged to the branch mainline in revision 76.
  • Revision ID: package-import@ubuntu.com-20120112222328-8jqdyodym3p84ygu
Tags: 2:1.0~rc4.dfsg1+svn34540-1
* New upstream snapshot
* upload to unstable

Show diffs side-by-side

added added

removed removed

Lines of Context:
1376
1376
 
1377
1377
static int get_capture_buffer_size(priv_t *priv)
1378
1378
{
1379
 
    int bufsize, cnt;
 
1379
    uint64_t bufsize;
 
1380
    int cnt;
1380
1381
 
1381
1382
    if (priv->tv_param->buffer_size >= 0) {
1382
1383
        bufsize = priv->tv_param->buffer_size*1024*1024;
1385
1386
        struct sysinfo si;
1386
1387
 
1387
1388
        sysinfo(&si);
1388
 
        if (si.totalram<2*1024*1024) {
1389
 
            bufsize = 1024*1024;
1390
 
        } else {
1391
 
            bufsize = si.totalram/2;
1392
 
        }
1393
 
#else
 
1389
        bufsize = (si.freeram/2)*si.mem_unit;
 
1390
        if ( bufsize < 16*1024*1024)
 
1391
#endif
1394
1392
        bufsize = 16*1024*1024;
1395
 
#endif
1396
1393
    }
1397
1394
 
1398
1395
    cnt = bufsize/priv->format.fmt.pix.sizeimage;