예제 #1
0
QString ScanStreamData::GetSIStandard(QString guess) const
{
    if (HasCachedMGT())
        return "atsc";

    if (HasCachedAnyNIT())
        return "dvb";

    QMutexLocker locker(&_cache_lock);

    pmt_cache_t::const_iterator it = _cached_pmts.begin();
    for (; it != _cached_pmts.end(); ++it)
    {
        ProgramMapTable *pmt = *it;

        for (uint i = 0; (guess != "dvb") && (i < pmt->StreamCount()); i++)
        {
            if (StreamID::OpenCableVideo == pmt->StreamType(i))
                return "opencable";
        }

        desc_list_t descs = MPEGDescriptor::ParseOnlyInclude(
            pmt->ProgramInfo(), pmt->ProgramInfoLength(),
            DescriptorID::registration);

        for (uint i = 0; i < descs.size(); i++)
        {
            RegistrationDescriptor reg(descs[i]);
            if (reg.FormatIdentifierString() == "SCTE")
                return "opencable";
        }
    }

    return "mpeg";
}
예제 #2
0
파일: dvbcam.cpp 프로젝트: awithers/mythtv
cCiCaPmt CreateCAPMT(const ProgramMapTable &pmt,
                     const unsigned short *casids,
                     uint cplm)
{
    cCiCaPmt capmt(pmt.ProgramNumber(), cplm);

    // Add CA descriptors for the service
    desc_list_t gdesc = MPEGDescriptor::ParseOnlyInclude(
        pmt.ProgramInfo(), pmt.ProgramInfoLength(),
        DescriptorID::conditional_access);

    process_desc(capmt, casids, gdesc);

    // Add elementary streams + CA descriptors
    for (uint i = 0; i < pmt.StreamCount(); i++)
    {
        LOG(VB_DVBCAM, LOG_INFO,
            QString("DVBCam: Adding elementary stream: %1, pid(0x%2)")
                .arg(pmt.StreamDescription(i, "dvb"))
                .arg(pmt.StreamPID(i),0,16));

        capmt.AddElementaryStream(pmt.StreamType(i), pmt.StreamPID(i));

        desc_list_t desc = MPEGDescriptor::ParseOnlyInclude(
            pmt.StreamInfo(i), pmt.StreamInfoLength(i),
            DescriptorID::conditional_access);

        process_desc(capmt, casids, desc);
    }
    return capmt;
}