Ticket #6874: hdhr-dvbt.patch

File hdhr-dvbt.patch, 2.4 KB (added by mikeb@…, 15 years ago)
  • mythtv/libs/libmythtv/hdhrrecorder.cpp

     
    176176        data->AddMPEGSPListener(this);
    177177        data->AddMPEGListener(this);
    178178
    179         ATSCStreamData *atsc = dynamic_cast<ATSCStreamData*>(data);
    180179        DVBStreamData  *dvb  = dynamic_cast<DVBStreamData*>(data);
    181180
     181        if (dvb)
     182            dvb->AddDVBMainListener(this);
     183
     184        ATSCStreamData *atsc = dynamic_cast<ATSCStreamData*>(data);
     185
    182186        if (atsc && atsc->DesiredMinorChannel())
    183187            atsc->SetDesiredChannel(atsc->DesiredMajorChannel(),
    184188                                    atsc->DesiredMinorChannel());
    185         else if (dvb)
    186             dvb->AddDVBMainListener(this);
     189
    187190        else if (data->DesiredProgram() >= 0)
    188191            data->SetDesiredProgram(data->DesiredProgram());
    189192    }
     
    301304            if (lpid == GetStreamData()->VideoPIDSingleProgram())
    302305            {
    303306                //cerr<<"v";
    304                 _buffer_packets = !FindMPEG2Keyframes(&tspacket);
    305                 BufferedWrite(tspacket);
     307                ProgramMapTable *pmt = _stream_data->PMTSingleProgram();
     308                uint video_stream_type = pmt->StreamType(pmt->FindPID(lpid));
     309
     310                if (video_stream_type == StreamID::H264Video)
     311                        _buffer_packets = !FindH264Keyframes(&tspacket);
     312                else if (StreamID::IsVideo(video_stream_type))
     313                        _buffer_packets = !FindMPEG2Keyframes(&tspacket);
     314
     315                if ((video_stream_type != StreamID::H264Video) || _seen_sps)
     316                        BufferedWrite(tspacket);           
    306317            }
    307318            else if (GetStreamData()->IsAudioPID(lpid))
    308319            {
  • mythtv/libs/libmythtv/hdhrchannel.cpp

     
    361361                       QString modulation, QString si_std)
    362362{
    363363    // Convert dtv_multiplex.modulation strings to something the HDHR can use:
     364#if 0
    364365    modulation.replace("qam_", "qam");  // e.g. qam_256 -> qam256
    365 #if 0
    366366    if (modulation == "qamauto")
    367367        modulation = "qam";             // "auto" works just as well?
    368 #endif
    369368
    370369    if (modulation.isEmpty())
     370#endif
    371371        modulation = "auto";
    372372
    373373    QString chan = modulation + ':' + QString::number(frequency);