[Mplayer-cvslog] CVS: main/libmpdemux Makefile,1.65,1.66 ai_alsa.c,1.4,1.5 ai_oss.c,1.5,1.6 audio_in.c,1.7,1.8 tv.c,1.59,1.60 tv.h,1.24,1.25
Jindrich Makovicka CVS
henry at mplayerhq.hu
Thu Aug 7 14:24:39 CEST 2003
Update of /cvsroot/mplayer/main/libmpdemux
In directory mail:/var/tmp.root/cvs-serv4227/libmpdemux
Modified Files:
Makefile ai_alsa.c ai_oss.c audio_in.c tv.c tv.h
Log Message:
v4l2 support
Index: Makefile
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/Makefile,v
retrieving revision 1.65
retrieving revision 1.66
diff -u -r1.65 -r1.66
--- Makefile 9 Jun 2003 00:24:22 -0000 1.65
+++ Makefile 7 Aug 2003 12:24:35 -0000 1.66
@@ -3,7 +3,7 @@
include ../config.mak
-SRCS = mp3_hdr.c video.c mpeg_hdr.c cache2.c asfheader.c aviheader.c aviprint.c muxer.c muxer_avi.c muxer_mpeg.c demux_asf.c demux_avi.c demux_mov.c parse_mp4.c demux_mpg.c demux_ty.c demux_ty_osd.c demux_pva.c demux_viv.c demuxer.c dvdauth.c dvdnav_stream.c open.c parse_es.c stream.c stream_file.c stream_netstream.c stream_vcd.c stream_null.c tv.c tvi_dummy.c tvi_v4l.c tvi_bsdbt848.c frequencies.c demux_fli.c demux_real.c demux_y4m.c yuv4mpeg.c yuv4mpeg_ratio.c demux_nuv.c demux_film.c demux_roq.c mf.c demux_mf.c demux_audio.c demux_demuxers.c demux_ogg.c demux_bmp.c cdda.c demux_rawaudio.c demux_rawvideo.c cddb.c cdinfo.c demux_rawdv.c ai_alsa.c ai_oss.c audio_in.c demux_smjpeg.c cue_read.c extension.c demux_gif.c demux_ts.c demux_realaud.c
+SRCS = mp3_hdr.c video.c mpeg_hdr.c cache2.c asfheader.c aviheader.c aviprint.c muxer.c muxer_avi.c muxer_mpeg.c demux_asf.c demux_avi.c demux_mov.c parse_mp4.c demux_mpg.c demux_ty.c demux_ty_osd.c demux_pva.c demux_viv.c demuxer.c dvdauth.c dvdnav_stream.c open.c parse_es.c stream.c stream_file.c stream_netstream.c stream_vcd.c stream_null.c tv.c tvi_dummy.c tvi_v4l.c tvi_v4l2.c tvi_bsdbt848.c frequencies.c demux_fli.c demux_real.c demux_y4m.c yuv4mpeg.c yuv4mpeg_ratio.c demux_nuv.c demux_film.c demux_roq.c mf.c demux_mf.c demux_audio.c demux_demuxers.c demux_ogg.c demux_bmp.c cdda.c demux_rawaudio.c demux_rawvideo.c cddb.c cdinfo.c demux_rawdv.c ai_alsa.c ai_oss.c audio_in.c demux_smjpeg.c cue_read.c extension.c demux_gif.c demux_ts.c demux_realaud.c
ifeq ($(XMMS_PLUGINS),yes)
SRCS += demux_xmms.c
endif
Index: ai_alsa.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/ai_alsa.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- ai_alsa.c 2 Oct 2002 16:56:54 -0000 1.4
+++ ai_alsa.c 7 Aug 2003 12:24:35 -0000 1.5
@@ -4,7 +4,7 @@
#include "config.h"
-#if defined(USE_TV) && defined(HAVE_TV_V4L) && defined(HAVE_ALSA9)
+#if defined(USE_TV) && (defined(HAVE_TV_V4L) || defined(HAVE_TV_V4L2)) && defined(HAVE_ALSA9)
#include <alsa/asoundlib.h>
#include "audio_in.h"
Index: ai_oss.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/ai_oss.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- ai_oss.c 28 Sep 2002 18:42:17 -0000 1.5
+++ ai_oss.c 7 Aug 2003 12:24:35 -0000 1.6
@@ -3,7 +3,7 @@
#include "config.h"
-#if defined(USE_TV) && defined(HAVE_TV_V4L) && defined(USE_OSS_AUDIO)
+#if defined(USE_TV) && (defined(HAVE_TV_V4L) || defined(HAVE_TV_V4L2)) && defined(USE_OSS_AUDIO)
#include <string.h> /* strerror */
#include <fcntl.h>
Index: audio_in.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/audio_in.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- audio_in.c 23 Nov 2002 10:58:08 -0000 1.7
+++ audio_in.c 7 Aug 2003 12:24:35 -0000 1.8
@@ -4,7 +4,7 @@
#include "config.h"
-#if defined(USE_TV) && defined(HAVE_TV_V4L)
+#if defined(USE_TV) && (defined(HAVE_TV_V4L) || defined(HAVE_TV_V4L2))
#include "audio_in.h"
#include "mp_msg.h"
Index: tv.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/tv.c,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -r1.59 -r1.60
--- tv.c 4 Aug 2003 09:13:10 -0000 1.59
+++ tv.c 7 Aug 2003 12:24:35 -0000 1.60
@@ -45,6 +45,9 @@
char *tv_param_freq = NULL;
char *tv_param_channel = NULL;
char *tv_param_norm = "pal";
+#ifdef HAVE_TV_V4L2
+int tv_param_normid = -1;
+#endif
char *tv_param_chanlist = "europe-east";
char *tv_param_device = NULL;
char *tv_param_driver = "dummy";
@@ -54,7 +57,7 @@
char *tv_param_outfmt = "yv12";
float tv_param_fps = -1.0;
char **tv_param_channels = NULL;
-#ifdef HAVE_TV_V4L
+#if defined(HAVE_TV_V4L) || defined(HAVE_TV_V4L2)
int tv_param_amode = -1;
int tv_param_audio_id = 0;
int tv_param_volume = 60000;
@@ -179,6 +182,9 @@
/* set some params got from cmdline */
funcs->control(tvh->priv, TVI_CONTROL_SPC_SET_INPUT, &tv_param_input);
+#ifdef HAVE_TV_V4L2
+ if (strcmp(tv_param_driver, "v4l2") != 0) {
+#endif
/* select video norm */
tvh->norm = norm_from_string(tv_param_norm);
@@ -187,7 +193,17 @@
mp_msg(MSGT_TV, MSGL_ERR, "Error: cannot set norm!\n");
return 0;
}
-
+#ifdef HAVE_TV_V4L2
+ } else {
+ if (tv_param_normid >= 0) {
+ mp_msg(MSGT_TV, MSGL_V, "Selected norm id: %d\n", tv_param_normid);
+ if (funcs->control(tvh->priv, TVI_CONTROL_TUN_SET_NORM, &tv_param_normid) != TVI_CONTROL_TRUE) {
+ mp_msg(MSGT_TV, MSGL_ERR, "Error: cannot set norm!\n");
+ return 0;
+ }
+ }
+ }
+#endif
#ifdef HAVE_TV_V4L
if ( tv_param_mjpeg )
@@ -582,6 +598,7 @@
/* ================== STREAM_TV ===================== */
tvi_handle_t *tvi_init_dummy(char *device);
tvi_handle_t *tvi_init_v4l(char *device, char *adevice);
+tvi_handle_t *tvi_init_v4l2(char *device, char *adevice);
tvi_handle_t *tvi_init_bsdbt848(char *device);
tvi_handle_t *tv_begin(void)
@@ -591,6 +608,10 @@
#ifdef HAVE_TV_V4L
if (!strcmp(tv_param_driver, "v4l"))
return tvi_init_v4l(tv_param_device, tv_param_adevice);
+#endif
+#ifdef HAVE_TV_V4L2
+ if (!strcmp(tv_param_driver, "v4l2"))
+ return tvi_init_v4l2(tv_param_device, tv_param_adevice);
#endif
#ifdef HAVE_TV_BSDBT848
if (!strcmp(tv_param_driver, "bsdbt848"))
Index: tv.h
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/tv.h,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- tv.h 4 Aug 2003 09:13:10 -0000 1.24
+++ tv.h 7 Aug 2003 12:24:35 -0000 1.25
@@ -13,6 +13,9 @@
extern char *tv_param_channel;
extern char *tv_param_chanlist;
extern char *tv_param_norm;
+#ifdef HAVE_TV_V4L2
+extern int tv_param_normid;
+#endif
extern char *tv_param_device;
extern char *tv_param_driver;
extern int tv_param_width;
@@ -24,7 +27,7 @@
extern int tv_param_noaudio;
extern int tv_param_immediate;
extern int tv_param_audiorate;
-#ifdef HAVE_TV_V4L
+#if defined(HAVE_TV_V4L) || defined(HAVE_TV_V4L2)
extern int tv_param_amode;
extern int tv_param_audio_id;
extern int tv_param_volume;
More information about the MPlayer-cvslog
mailing list