diff --git a/src/driver/genpsi.cpp b/src/driver/genpsi.cpp index 856bfa4cf..4f11d2d03 100644 --- a/src/driver/genpsi.cpp +++ b/src/driver/genpsi.cpp @@ -247,7 +247,7 @@ int CGenPsi::genpsi(int fd) } //-- write row with desc. for pcr stream (eq. video) -- pkt[ofs] = EN_TYPE_PCR; - pkt[ofs+1] = 0x02;//vtype ??? + pkt[ofs+1] = 0x02; pkt[ofs+2] = (pcrpid>>8); pkt[ofs+3] = (pcrpid & 0xFF); diff --git a/src/driver/record.cpp b/src/driver/record.cpp index d74a78cf0..123d6d012 100644 --- a/src/driver/record.cpp +++ b/src/driver/record.cpp @@ -345,8 +345,8 @@ void CRecordInstance::GetPids(CZapitChannel * channel) allpids.PIDs.vtxtpid = channel->getTeletextPid(); allpids.PIDs.pmtpid = channel->getPmtPid(); allpids.PIDs.selected_apid = channel->getAudioChannelIndex(); -#if 0 // not needed allpids.PIDs.pcrpid = channel->getPcrPid(); +#if 0 // not needed allpids.PIDs.privatepid = channel->getPrivatePid(); #endif allpids.APIDs.clear(); diff --git a/src/driver/streamts.cpp b/src/driver/streamts.cpp index 2df37b569..9e52136aa 100644 --- a/src/driver/streamts.cpp +++ b/src/driver/streamts.cpp @@ -394,6 +394,27 @@ bool CStreamManager::Parse(int fd, stream_pids_t &pids, t_channel_id &chid) pids.insert(channel->getPcrPid()); psi.addPid(channel->getPcrPid(), EN_TYPE_PCR, 0); } + //add teletext pid + if (g_settings.recording_stream_vtxt_pid && channel->getTeletextPid() != 0){ + pids.insert(channel->getTeletextPid()); + psi.addPid(channel->getTeletextPid(), EN_TYPE_TELTEX, 0, channel->getTeletextLang()); + } + //add dvb sub pid + if (g_settings.recording_stream_subtitle_pids){ + for (int i = 0 ; i < (int)channel->getSubtitleCount() ; ++i) { + CZapitAbsSub* s = channel->getChannelSub(i); + if (s->thisSubType == CZapitAbsSub::DVB) { + if(i>9)//max sub pids + break; + + CZapitDVBSub* sd = reinterpret_cast(s); + pids.insert(sd->pId); + psi.addPid( sd->pId, EN_TYPE_DVBSUB, 0, sd->ISO639_language_code.c_str() ); + } + } + + } + psi.genpsi(fd); return !pids.empty();