[Mplayer-cvslog] CVS: main/libmpdemux tv.c,1.37,1.38 tv.h,1.17,1.18 tvi_v4l.c,1.36,1.37
Jindrich Makovicka CVS
henry at mplayerhq.hu
Fri Oct 25 11:42:51 CEST 2002
Update of /cvsroot/mplayer/main/libmpdemux
In directory mail:/var/tmp.root/cvs-serv9830/libmpdemux
Modified Files:
tv.c tv.h tvi_v4l.c
Log Message:
added an option for specifying the size of capture buffer
Index: tv.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/tv.c,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -r1.37 -r1.38
--- tv.c 22 Oct 2002 07:56:13 -0000 1.37
+++ tv.c 25 Oct 2002 09:42:41 -0000 1.38
@@ -60,6 +60,7 @@
int tv_param_balance = -1;
int tv_param_forcechan = -1;
int tv_param_force_audio = 0;
+int tv_param_buffer_size = -1;
#ifdef HAVE_ALSA9
int tv_param_alsa = 0;
#endif
Index: tv.h
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/tv.h,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- tv.h 22 Oct 2002 07:56:13 -0000 1.17
+++ tv.h 25 Oct 2002 09:42:41 -0000 1.18
@@ -32,6 +32,7 @@
extern int tv_param_balance;
extern int tv_param_forcechan;
extern int tv_param_force_audio;
+extern int tv_param_buffer_size;
#ifdef HAVE_ALSA9
extern int tv_param_alsa;
#endif
Index: tvi_v4l.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/tvi_v4l.c,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -r1.36 -r1.37
--- tvi_v4l.c 22 Oct 2002 15:33:41 -0000 1.36
+++ tvi_v4l.c 25 Oct 2002 09:42:41 -0000 1.37
@@ -579,19 +579,24 @@
static int get_capture_buffer_size(priv_t *priv)
{
int bufsize, cnt;
-#ifdef HAVE_SYS_SYSINFO_H
- struct sysinfo si;
-
- sysinfo(&si);
- if (si.totalram<2*1024*1024) {
- bufsize = 1024*1024;
+
+ if (tv_param_buffer_size) {
+ bufsize = tv_param_buffer_size*1024*1024;
} else {
- bufsize = si.totalram/2;
- }
+#ifdef HAVE_SYS_SYSINFO_H
+ struct sysinfo si;
+
+ sysinfo(&si);
+ if (si.totalram<2*1024*1024) {
+ bufsize = 1024*1024;
+ } else {
+ bufsize = si.totalram/2;
+ }
#else
- bufsize = 16*1024*1024;
+ bufsize = 16*1024*1024;
#endif
-
+ }
+
cnt = bufsize/(priv->height*priv->bytesperline);
if (cnt < 2) cnt = 2;
More information about the MPlayer-cvslog
mailing list