SASC-NG
DVBSoftCAM

cPrg Class Reference

#include <cam.h>

Inheritance diagram for cPrg:

List of all members.

Public Member Functions

 cPrg (void)
 cPrg (int Sid, bool IsUpdate)
bool IsUpdate (void) const
bool HasPidCaDescr (void) const
void SetPidCaDescr (bool val)
bool SimplifyCaDescr (void)
void DumpCaDescr (int c)

Public Attributes

int sid
int source
int transponder
cSimpleList< cPrgPid > pids
cCaDescr caDescr

Detailed Description

Definition at line 115 of file cam.h.


Constructor & Destructor Documentation

cPrg::cPrg ( void  )

Definition at line 809 of file cam.c.

{
  Setup();
}
cPrg::cPrg ( int  Sid,
bool  IsUpdate 
)

Definition at line 814 of file cam.c.

References IsUpdate().

{
  Setup();
  sid=Sid; isUpdate=IsUpdate;
}

Member Function Documentation

void cPrg::DumpCaDescr ( int  c)

Definition at line 826 of file cam.c.

References caDescr, cSimpleList< T >::First(), cSimpleList< T >::Next(), pid::pid, pids, PRINTF, and cCaDescr::ToString().

Referenced by SimplifyCaDescr().

{
  PRINTF(c,"prgca: %s",*caDescr.ToString());
  for(cPrgPid *pid=pids.First(); pid; pid=pids.Next(pid))
    PRINTF(c,"pidca %04x: %s",pid->pid,*pid->caDescr.ToString());
}
bool cPrg::HasPidCaDescr ( void  ) const [inline]

Definition at line 128 of file cam.h.

Referenced by cEcmHandler::SetPrg(), and SimplifyCaDescr().

{ return pidCaDescr; }
bool cPrg::IsUpdate ( void  ) const [inline]

Definition at line 127 of file cam.h.

Referenced by cCam::AddPrg(), and cPrg().

{ return isUpdate; }
void cPrg::SetPidCaDescr ( bool  val) [inline]

Definition at line 129 of file cam.h.

Referenced by cScCamSlot::Process(), and SimplifyCaDescr().

{ pidCaDescr=val; }
bool cPrg::SimplifyCaDescr ( void  )

Definition at line 833 of file cam.c.

References caDescr, cPrgPid::caDescr, cCaDescr::Clear(), cSimpleListBase::Count(), DumpCaDescr(), cSimpleList< T >::First(), HasPidCaDescr(), cCaDescr::Join(), L_CORE_PIDS, cSimpleList< T >::Next(), pids, PRINTF, and SetPidCaDescr().

Referenced by cCam::AddPrg().

{
  if(HasPidCaDescr()) {
    bool equal=true;
    if(pids.Count()>1) {
      cPrgPid *pid0=pids.First();
      for(cPrgPid *pid1=pids.Next(pid0); pid1; pid1=pids.Next(pid1))
        if(!(pid0->caDescr==pid1->caDescr)) { equal=false; break; }
      }
    if(equal) {
      cPrgPid *pid=pids.First();
      caDescr.Join(&pid->caDescr);
      for(; pid; pid=pids.Next(pid)) pid->caDescr.Clear();
      SetPidCaDescr(false);
      }
    }
  if(HasPidCaDescr()) {
    for(cPrgPid *pid=pids.First(); pid; pid=pids.Next(pid))
      pid->caDescr.Join(&caDescr,true);
    caDescr.Clear();
    }

  PRINTF(L_CORE_PIDS,"Ca descriptors after simplify (pidCa=%d)",HasPidCaDescr());
  DumpCaDescr(L_CORE_PIDS);

  return HasPidCaDescr();
}

Member Data Documentation

Definition at line 121 of file cam.h.

Referenced by cCam::AddPrg(), cEcmHandler::Process(), and cEcmHandler::SetPrg().

Definition at line 121 of file cam.h.

Referenced by cCam::AddPrg(), cEcmHandler::Process(), and cEcmHandler::SetPrg().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines