Ivan Eyara wrote:
> Is there any way to configure mp1e 1.7.1 in order to make it capture
> video from the Composite1 input?.
There is a patch allowing mp1e to select its source from a command line
switch.
--
y.
diff -ur mp1e-1.7/global.h mp1e-1.7-fefe/global.h
--- mp1e-1.7/global.h Fri Jan 21 16:45:19 2000
+++ mp1e-1.7-fefe/global.h Tue Feb 22 00:41:29 2000
@@ -148,6 +148,8 @@
extern int vid_buffers;
extern int aud_buffers;
+extern int source;
+
extern pthread_mutex_t mux_mutex;
extern pthread_cond_t mux_cond;
diff -ur mp1e-1.7/io.c mp1e-1.7-fefe/io.c
--- mp1e-1.7/io.c Sat Feb 19 01:10:40 2000
+++ mp1e-1.7-fefe/io.c Tue Feb 22 00:41:31 2000
@@ -234,6 +234,13 @@
printv(2, "Opened %s ('%s')\n", cap_dev, vcap.name);
+ if (source != 0) {
+ chan.channel=source;
+ ASSERT("query video channel", ioctl(cap_fd, VIDIOCGCHAN, &chan) == 0);
+ printv(2, "channel %s.\n",chan.name);
+ ASSERT("set video channel", ioctl(cap_fd, VIDIOCSCHAN, &chan) == 0);
+ }
+
ASSERT("query video channel", ioctl(cap_fd, VIDIOCGCHAN, &chan) == 0);
if (chan.norm==0)/* PAL */
diff -ur mp1e-1.7/main.c mp1e-1.7-fefe/main.c
--- mp1e-1.7/main.c Fri Jan 21 20:15:04 2000
+++ mp1e-1.7-fefe/main.c Tue Feb 22 00:42:55 2000
@@ -61,6 +61,8 @@
int vid_buffers = 6; // Video
compression -> Mux
int aud_buffers = 20; // Audio
compression -> Mux
+int source = 0; // v4l source
+
#define PACKET_SIZE 2048
#define PACKETS_PER_PACK 16
@@ -121,6 +123,7 @@
" -r line,vol Audio record source 1..30%s,\n"
" volume 0..100 %d,%d\n"
" -x name Audio mixer device (OSS API) %s\n"
+ " -i channel source number (my Hauppauge: 2=S-Video)\n"
"\n"
"The compressed stream will be sent to stdout.\n",
@@ -138,7 +141,7 @@
int c;
char have_audio_bit_rate = 0;
- while ((c = getopt(ac, av, "a:b:c:f:hlm:n:p:r:s:vB:H:x:M:S:V")) != -1) {
+ while ((c = getopt(ac, av, "a:b:c:f:hi:lm:n:p:r:s:vB:H:x:M:S:V")) != -1) {
switch (c)
{
case 'a':
@@ -169,6 +172,12 @@
usage();
break;
+ case 'i':
+ source = strtol(optarg, NULL, 0);
+ if (source < 0)
+ usage();
+ break;
+
case 'm':
mode = strtol(optarg, NULL, 0);
if (mode == 0 || mode > 3)