
BOXTYPE in camd3.config muss auf 8 gesetzt werden.

camd3 braucht PMTList in /tmp/camd.socket, deshalb muss VDR gepatcht werden.
	Was ich jetzt mache ist sehr schmutzige Lösung (ich kenne mich mit VDR nicht aus).

als Erstes muss in der Funktion cDvbDevice::ProvidesChannel(const cChannel *Channel, int Priority, bool *NeedsDetachReceivers)
	 auch alle verschlüsselte Sender erlauben. Das bedeutet, ProvidesCa(Channel) aus der if-Bedingung entfernen, und nur
	 if (ProvidesSource(Channel->Source())) drin lassen.
	 

alz Zweites ist ci.c dran. Der Code-Abschnitt mit cCiHandler::SendCaPmt(void) sieht jetzt so aus:

void send_my_data(int Tag, int Length, const uint8_t *Data)
{
	unsigned char		session_number = 0;
	unsigned short	session_id = 0;
  uint8_t buffer[2048];
  uint8_t *p = buffer;
  *p++ = session_number;
  *p++ = 0x02;
  *p++ = (session_id >> 8) & 0xFF;
  *p++ =  session_id       & 0xFF;
  *p++ = (Tag >> 16) & 0xFF;
  *p++ = (Tag >>  8) & 0xFF;
  *p++ =  Tag        & 0xFF;
  p = SetLength(p, Length);
  if (p - buffer + Length < int(sizeof(buffer))) {
     memcpy(p, Data, Length);
     p += Length;
          
			int fd_sock = -1;
			struct sockaddr_un srvaddr;
			socklen_t addrlen;
					
			srvaddr.sun_family = AF_UNIX;
			strcpy(srvaddr.sun_path, "/tmp/camd.socket");
			addrlen = sizeof(srvaddr.sun_family) + strlen(srvaddr.sun_path);
		
			if((fd_sock = socket(AF_UNIX, SOCK_STREAM, 0))>=0)
			{
				if(connect(fd_sock, (struct sockaddr*)&srvaddr, addrlen)>=0)
				{
					write(fd_sock, buffer, p-buffer);
				}
			}
		
			if(fd_sock >=0 )
				close(fd_sock);
     }
}

void cCiHandler::SendCaPmt(void)
{
  cMutexLock MutexLock(&mutex);
  if (newCaSupport) {
  
  {
	  cList<cCiCaPmt> CaPmtList;
	  unsigned short sysids = 0xFFFF;
		for (cCiCaProgramData *p = caProgramList.First(); p; p = caProgramList.Next(p))
		{
			bool Active = false;
			cCiCaPmt *CaPmt = new cCiCaPmt(CPCI_OK_DESCRAMBLING, source, transponder, p->programNumber, &sysids);
			if (CaPmt->Valid())
			{
				for (cCiCaPidData *q = p->pidList.First(); q; q = p->pidList.Next(q))
				{
					if (q->active)
					{
						CaPmt->AddPid(q->pid, q->streamType);
						Active = true;
					}
				}
			}
			if (Active)
				CaPmtList.Add(CaPmt);
			else
				delete CaPmt;
		}
		// send the CA_PMT data:
		uint8_t ListManagement = CaPmtList.Count() > 1 ? CPLM_FIRST : CPLM_ONLY;
		for (cCiCaPmt *CaPmt = CaPmtList.First(); CaPmt; CaPmt = CaPmtList.Next(CaPmt))
		{
			CaPmt->SetListManagement(ListManagement);
			send_my_data(AOT_CA_PMT, CaPmt->length, CaPmt->capmt);
			ListManagement = CaPmt->Next() && CaPmt->Next()->Next() ? CPLM_MORE : CPLM_LAST;
		}
	}
  
  
  
     newCaSupport = false;
     for (int Slot = 0; Slot < numSlots; Slot++) {
         cCiConditionalAccessSupport *cas = (cCiConditionalAccessSupport *)GetSessionByResourceId(RI_CONDITIONAL_ACCESS_SUPPORT, Slot);
         if (cas)
         {
            // build the list of CA_PMT data:
            cList<cCiCaPmt> CaPmtList;
            for (cCiCaProgramData *p = caProgramList.First(); p; p = caProgramList.Next(p)) {
                bool Active = false;
                cCiCaPmt *CaPmt = new cCiCaPmt(CPCI_OK_DESCRAMBLING, source, transponder, p->programNumber, GetCaSystemIds(Slot));
                if (CaPmt->Valid()) {
                   for (cCiCaPidData *q = p->pidList.First(); q; q = p->pidList.Next(q)) {
                       if (q->active) {
                          CaPmt->AddPid(q->pid, q->streamType);
                          Active = true;
                          }
                       }
                   }
               if (Active)
                   CaPmtList.Add(CaPmt);
                else
                   delete CaPmt;
                }
            // send the CA_PMT data:
            uint8_t ListManagement = CaPmtList.Count() > 1 ? CPLM_FIRST : CPLM_ONLY;
            for (cCiCaPmt *CaPmt = CaPmtList.First(); CaPmt; CaPmt = CaPmtList.Next(CaPmt)) {
                CaPmt->SetListManagement(ListManagement);
                if (!cas->SendPMT(CaPmt))
                   newCaSupport = true;
                ListManagement = CaPmt->Next() && CaPmt->Next()->Next() ? CPLM_MORE : CPLM_LAST;
                }
            }
         }
     }
}


Wie gesagt, dass habe ich gemacht, um schneller zu sein. Also nicht auf mich schlagen:)   Lieber verbessern.


