Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[linux-dvb] Re: dvb-input PATCH for mplayer



Nico wrote:

Feedback  and suggestions are welcome.

I had to make a few tweaks to make it work for me. A patch is attached.

- Changes the frontend detection code to use the returned fe_info.type, not the ioctl() return.

- When reading a terrestial channels.conf file it wasn't initialising some of the channel parameters.

- Flipped the sense of the dvb_streaming_start() return check. I think this is right but I was trying to fix the "Unable to open URL" type errors which gmplayer was generating. This didn't fix the problem, gmplayer with dvbin seems broken.

I also commented out the line in dvb_tune.c which closed the frontend fd after tuning. This was causing the frontend to lose its tuning after a few seconds. I see in another email that you suggest changing the dvb_core shutdown timeout instead. I haven't included this change in the patch.

Perhaps you should add a note saying that it requires a szap/tzap/czap format channels.conf file to be added to your mplayer config directory (and not the newer VDR-1.2 file format)

Jon











diff -ruw tmp/main/libmpdemux/dvbin.c main/libmpdemux/dvbin.c
--- tmp/main/libmpdemux/dvbin.c	2003-06-19 22:56:17.000000000 +0100
+++ main/libmpdemux/dvbin.c	2003-06-19 22:43:35.000000000 +0100
@@ -168,6 +168,17 @@
 			fields = sscanf(line, ter_conf,
 				&ptr->name, &ptr->freq, &inv, &bw, &cr, &tmp_lcr, &mod,
 				&transm, &gi, &tmp_hier, &ptr->vpid, &ptr->apid1);
+
+			/* Fixed for DVB-T */
+			ptr->srate = 27500;
+			ptr->pol = 'T';
+			/* Some of these should be configurable */
+			ptr->diseqc = 0;
+			ptr->tone = 0;
+			ptr->apid2 = 0;
+			ptr->tpid = 0;
+			ptr->progid = 0;
+
 		}
 		else if(type == TUNER_CBL)
 		{
@@ -254,7 +265,6 @@
 			ptr->gi = GUARD_INTERVAL_1_8;
 		else ptr->gi = GUARD_INTERVAL_1_4;
 
-
 		list->NUM_CHANNELS++;
 		row_count++;
 	}
@@ -702,7 +712,7 @@
 	}
 	
 	
-	if(! dvb_streaming_start(priv, p, tuner_type))
+	if(dvb_streaming_start(priv, p, tuner_type) == 0)
 	{
 	  free(stream->priv);
 	  stream->priv = NULL;
Only in main/libmpdemux: dvbin.c-jb
Only in main/libmpdemux: dvbin.o
diff -ruw tmp/main/libmpdemux/dvb_tune.c main/libmpdemux/dvb_tune.c
--- tmp/main/libmpdemux/dvb_tune.c	2003-06-19 22:56:17.000000000 +0100
+++ main/libmpdemux/dvb_tune.c	2003-06-19 21:45:23.000000000 +0100
@@ -77,7 +77,7 @@
   }
   close(fe_fd);
 
-  switch(res)
+  switch(fe_info.type)
   {
 	case FE_OFDM:
       mp_msg(MSGT_DEMUX, MSGL_INFO, "TUNER TYPE SEEMS TO BE DVB-T\n");

Home | Main Index | Thread Index