Ticket #2101: fix_RunTableMonitorSR.diff

File fix_RunTableMonitorSR.diff, 1.8 KB (added by Janne <janne-mythtv@…>, 15 years ago)
  • libs/libmythtv/dvbsignalmonitor.cpp

    old new bool DVBSignalMonitor::AddPIDFilter(uint 
    212212    {
    213213        struct dmx_sct_filter_params sctFilterParams;
    214214        bzero(&sctFilterParams, sizeof(struct dmx_sct_filter_params));
    215         // TODO as is this will break for ATSC streams, where the
    216         // MGT is on pid 0x1ffb and the VCTs can be on any pid like
    217         // PMTs, but is usually on 0x1ffb.
     215
     216        sctFilterParams.filter.mask[0]   = 0xff; // default
     217
    218218        switch ( (__u16) pid )
    219219        {
    220220            case 0x0: // PAT
    bool DVBSignalMonitor::AddPIDFilter(uint 
    228228            case 0x0011: // assume this is for an SDT
    229229                sctFilterParams.filter.filter[0] = 0x42;
    230230                break;
    231             default: // otherwise assume we are looking for a PMT
    232                 sctFilterParams.filter.filter[0] = 0x02;
     231            case 0x1ffb: // assume this is for a MGT or VCT
     232                // MGT 0xc7, terrestrial VCT 0xc8, cable VCT 0xc9
     233                sctFilterParams.filter.filter[0] = 0xc0;
     234                sctFilterParams.filter.mask[0]   = 0xf0;
     235            default: // otherwise assume we are looking for a PMT or EIT
     236                sctFilterParams.filter.filter[0] = 0x00;
     237                sctFilterParams.filter.mask[0]   = 0x00;
    233238                break;
    234239        }
    235240        sctFilterParams.pid            = (__u16) pid;
    236241        sctFilterParams.timeout        = 0;
    237         sctFilterParams.filter.mask[0] = 0xff;
    238242        sctFilterParams.flags          = DMX_IMMEDIATE_START;
    239243
    240244        if (ioctl(mux_fd, DMX_SET_FILTER, &sctFilterParams) < 0)