Mailing List archive

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

[vdr] Re: autopid .. conditional, if rid==9999



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

i found more disturbing issues about the ppid ..

if ppid is set, but is equal to vpid or vpid is zero,
vdr does not work for tv or radio ... (vdr bug ?)

i have attached my new diff against vanilla vdr-1.1.29-autopid-2

On Thursday 01 May 2003 13:28, Andreas Schultz wrote:
> i like the idea (maybe not 9999). However, it should IMHO be possible to
> overule that with an setup option.
>

;-)

> > how about this ? (-> patch attached, against 1.1.29-autopid-2)
>
> i'll  intergrate it into the next version.
>
> > and how to easy avoid scanning at all, if rid != 9999 ?
> > or ain't it much time consuming ...
>
> like that too.
>
> I did not notice any channel switch delay cause by the patch.The SDT is
> repeated quite often, so finding it should take only a few usecs. But
> bad reception could alter that dramaticaly.
>

so if this thread does not disturb the system .. who cares .. 

> Andreas

cheers, sven
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE+sfVeHdOA30NoFAARAigkAJsHtBbDteZcln/WodDA861JyC8CoACggP6S
biobJDi2GlLgp9IZ0MyLFBI=
=M5vc
-----END PGP SIGNATURE-----
--- eit.c-old	2003-05-02 06:29:57.000000000 +0200
+++ eit.c	2003-05-02 06:25:39.000000000 +0200
@@ -1501,6 +1501,7 @@
 cChannel *cSIProcessor::updateChannelInfo(int Source, int Transponder, int oNid, int TSid, int Sid, char *name)
 {
     cChannel *channel = NULL;
+    int channelsModified = 0;
 
     const cNetworkTransponder* ntid = NetworkTransponders.getByNidTid(Source, oNid, TSid);
     const cTransponder *transponder = NULL;
@@ -1519,13 +1520,17 @@
 		channel->tid = TSid;
 	    }
 	}
-	printf("updateChannel: %d %d  %d %d %d  \"%s\"\n", Source, transponder->Frequency(), oNid, TSid, Sid, name);
-	if (channel) {
+
+	if (channel && channel->rid==9999) {
+	    printf("Update Channel: %d %d  %d %d %d  \"%s\"\n", Source, transponder->Frequency(), oNid, TSid, Sid, name);
 	    //FIXME: make this conditional??:
 	    strn0cpy(channel->name, name, sizeof(channel->name));
 
 	    channel->setTransponder(transponder);
-	} else {
+
+	    channelsModified = 1;
+	} else if (!channel) {
+	    printf("New Channel: %d %d  %d %d %d  \"%s\"\n", Source, transponder->Frequency(), oNid, TSid, Sid, name);
 	    channel = new cChannel();
 	    channel->setTransponder(transponder);
 	    strn0cpy(channel->name, name, sizeof(channel->name));
@@ -1538,9 +1543,17 @@
 	    channel->apid1  = channel->apid2 = 0;
 	    channel->dpid1  = channel->dpid2 = 0;
 	    channel->sid = Sid;
+	    channel->ca = 101;
+	    channel->rid = 9999;
 	    Channels.AddChannel(channel);
+
+	    channelsModified = 1;
 	}
     }
+
+    if ( channelsModified )
+	  Channels.Save();
+
     return channel;
 }
 
@@ -1548,14 +1561,16 @@
 {
     struct Descriptor  *d;
     
-    int index;
-    int vpid;
-    int ppid;
+    int index=0;
+    int vpid=0;
+    int ppid=0;
     int apid[8];
     int dpid[8];
-    int tpid;
+    int tpid=0;
     int *apid_p = apid;
     int *dpid_p = dpid;
+
+    int channelsModified = 0;
     
     if (!pi) return;
     
@@ -1623,19 +1638,38 @@
 
     //FIXME: this has to die
     if (cChannel *channel = Channels.GetByTransponderSid(currentSource, currentTransponder, eSid)) {
-	channel->tpid  = tpid;
-	channel->vpid  = vpid;
-	channel->ppid  = ppid;
-	channel->apid1 = apid[0];
-	channel->apid2 = apid[1];
-	channel->dpid1 = dpid[0];
-	channel->dpid2 = dpid[1];
+	if (channel->rid==9999) {
+		if(tpid>=0)
+			channel->tpid  = tpid;
+		channel->vpid  = vpid;
+		if( vpid!=ppid && vpid>0 )
+		{
+			/**
+			 * without the upper restrictions, 
+			 * the ppid will break radio and normal tv ..
+			 */
+			channel->ppid  = ppid;
+		}
+		channel->apid1 = apid[0];
+		channel->apid2 = apid[1];
+		channel->dpid1 = dpid[0];
+		channel->dpid2 = dpid[1];
+
+	        channelsModified = 1;
+        }
     }
     if (eSid != pendingSid)
         if (cChannel *channel = Channels.GetByTransponderSid(currentSource, currentTransponder, pendingSid)) {
-            //printf("setting eSid for channel\n");
-            channel->esid  = eSid;
+	    if (channel->rid==9999) {
+		    //printf("setting eSid for channel\n");
+		    channel->esid  = eSid;
+
+	            channelsModified = 1;
+            }
         }
+
+    if ( channelsModified )
+	  Channels.Save();
 }
 
 /** */

Home | Main Index | Thread Index