From d546cac834703686294bffaf76efdc6ac881b673 Mon Sep 17 00:00:00 2001 From: Rolf Ahrenberg Date: Fri, 6 Mar 2009 22:20:34 +0200 Subject: [PATCH] Fixed pid scanner to set the existing video stream type. --- HISTORY | 4 ++-- README | 3 +-- pidscanner.c | 4 ++-- po/de_DE.po | 7 +++++-- po/fi_FI.po | 7 +++++-- po/fr_FR.po | 7 +++++-- po/it_IT.po | 8 +++++--- po/ru_RU.po | 8 +++++--- setup.c | 7 +++++-- 9 files changed, 35 insertions(+), 20 deletions(-) diff --git a/HISTORY b/HISTORY index 5fc134a..42342bb 100644 --- a/HISTORY +++ b/HISTORY @@ -86,10 +86,10 @@ VDR Plugin 'iptv' Revision History - Set max IPTV device count to VDR's max devices. - Fixed a possible crash in sid and pid scanners. -2009-xx-xx: Version 0.2.5 +2009-03-08: Version 0.2.5 - Optimized TS packet data flow. - Refactored section filter class. - Cleaned up example scripts. -- Fixed pid scanner to default MPEG2 video stream type +- Fixed pid scanner to set the existing video stream type (Thanks to ua0lnj for reporting this one). diff --git a/README b/README index 220415f..deef7dc 100644 --- a/README +++ b/README @@ -171,5 +171,4 @@ Acknowledgements: - The IPTV section filtering code is derived from Linux kernel. -- The pid scanning code is derived from Udo Richter's streamplayer plugin - and defaults to MPEG2 video stream type. +- The pid scanning code is derived from Udo Richter's streamplayer plugin. diff --git a/pidscanner.c b/pidscanner.c index 6c03c9c..7681100 100644 --- a/pidscanner.c +++ b/pidscanner.c @@ -146,8 +146,8 @@ void cPidScanner::Process(const uint8_t* buf) for (unsigned int i = 0; i < MAXSPIDS; ++i) Spids[i] = IptvChannel->Spid(i); debug("cPidScanner::Process(): Vpid=0x%04X, Apid=0x%04X\n", Vpid, Apid); -#if defined(APIVERSNUM) && APIVERSNUM >= 10700 - int Vtype = 0x02; // MPEG-2=0x02, H.264=0x1B +#if defined(APIVERSNUM) && APIVERSNUM >= 10704 + int Vtype = IptvChannel->Vtype(); IptvChannel->SetPids(Vpid, Ppid, Vtype, Apids, ALangs, Dpids, DLangs, Spids, SLangs, Tpid); #else IptvChannel->SetPids(Vpid, Ppid, Apids, ALangs, Dpids, DLangs, Spids, SLangs, Tpid); diff --git a/po/de_DE.po b/po/de_DE.po index 58229af..60f4848 100644 --- a/po/de_DE.po +++ b/po/de_DE.po @@ -5,9 +5,9 @@ # msgid "" msgstr "" -"Project-Id-Version: iptv 0.2.0\n" +"Project-Id-Version: iptv 0.2.5\n" "Report-Msgid-Bugs-To: Rolf Ahrenberg\n" -"POT-Creation-Date: 2008-02-01 23:43+0200\n" +"POT-Creation-Date: 2009-03-06 22:15+0200\n" "PO-Revision-Date: 2007-10-29 21:19+0100\n" "Last-Translator: Tobias Grimm \n" "Language-Team: German\n" @@ -76,6 +76,9 @@ msgstr "Scanne SID" msgid "Scan pids" msgstr "Scanne PIDS" +msgid "Vtype" +msgstr "Vtype" + msgid "Nid" msgstr "Nid" diff --git a/po/fi_FI.po b/po/fi_FI.po index d921d67..79a16b0 100644 --- a/po/fi_FI.po +++ b/po/fi_FI.po @@ -5,9 +5,9 @@ # msgid "" msgstr "" -"Project-Id-Version: iptv 0.2.0\n" +"Project-Id-Version: iptv 0.2.5\n" "Report-Msgid-Bugs-To: Rolf Ahrenberg\n" -"POT-Creation-Date: 2008-02-01 23:43+0200\n" +"POT-Creation-Date: 2009-03-06 22:15+0200\n" "PO-Revision-Date: 2007-08-12 23:22+0300\n" "Last-Translator: Rolf Ahrenberg\n" "Language-Team: \n" @@ -75,6 +75,9 @@ msgstr "Etsi palvelu-ID" msgid "Scan pids" msgstr "Etsi pidit" +msgid "Vtype" +msgstr "Kuvatyyppi" + msgid "Nid" msgstr "Verkko-ID" diff --git a/po/fr_FR.po b/po/fr_FR.po index 46af71f..b078925 100644 --- a/po/fr_FR.po +++ b/po/fr_FR.po @@ -6,9 +6,9 @@ # msgid "" msgstr "" -"Project-Id-Version: iptv 0.2.0\n" +"Project-Id-Version: iptv 0.2.5\n" "Report-Msgid-Bugs-To: Rolf Ahrenberg\n" -"POT-Creation-Date: 2008-02-01 23:43+0200\n" +"POT-Creation-Date: 2009-03-06 22:15+0200\n" "PO-Revision-Date: 2008-01-26 13:14+0100\n" "Last-Translator: NIVAL Michaël \n" "Language-Team: French\n" @@ -77,6 +77,9 @@ msgstr "Scanne les SID" msgid "Scan pids" msgstr "Scanne les PID" +msgid "Vtype" +msgstr "Vtype" + msgid "Nid" msgstr "Nid" diff --git a/po/it_IT.po b/po/it_IT.po index fcfc3e6..89b0a0e 100644 --- a/po/it_IT.po +++ b/po/it_IT.po @@ -5,9 +5,9 @@ # msgid "" msgstr "" -"Project-Id-Version: iptv 0.2.0\n" +"Project-Id-Version: iptv 0.2.5\n" "Report-Msgid-Bugs-To: Rolf Ahrenberg\n" -"POT-Creation-Date: 2008-02-01 23:43+0200\n" +"POT-Creation-Date: 2009-03-06 22:15+0200\n" "PO-Revision-Date: 2008-07-13 03:28+0100\n" "Last-Translator: Diego Pierotto \n" "Language-Team: Italian\n" @@ -76,6 +76,9 @@ msgstr "Scansione Sid" msgid "Scan pids" msgstr "Scansione Pids" +msgid "Vtype" +msgstr "Vtype" + msgid "Nid" msgstr "Nid" @@ -180,4 +183,3 @@ msgstr "Definisci un filtro corrotto che sarà messo nella lista nera." msgid "Help" msgstr "Aiuto" - diff --git a/po/ru_RU.po b/po/ru_RU.po index 433387e..1d81050 100644 --- a/po/ru_RU.po +++ b/po/ru_RU.po @@ -5,9 +5,9 @@ # msgid "" msgstr "" -"Project-Id-Version: iptv 0.2.0\n" +"Project-Id-Version: iptv 0.2.5\n" "Report-Msgid-Bugs-To: Rolf Ahrenberg\n" -"POT-Creation-Date: 2008-02-01 23:43+0200\n" +"POT-Creation-Date: 2009-03-06 22:15+0200\n" "PO-Revision-Date: 2008-03-16 12:14+0100\n" "Last-Translator: Alexander Gross \n" "Language-Team: Russian \n" @@ -77,6 +77,9 @@ msgstr "Сканировать SID" msgid "Scan pids" msgstr "Сканировать пиды" +msgid "Vtype" +msgstr "Vtype" + msgid "Nid" msgstr "Nid" @@ -165,4 +168,3 @@ msgstr "Неправильно работающий фильтр, занести msgid "Help" msgstr "Справка" - diff --git a/setup.c b/setup.c index d643dce..47a3116 100644 --- a/setup.c +++ b/setup.c @@ -127,7 +127,7 @@ void cIptvMenuEditChannel::GetChannelData(cChannel *Channel) data.source = Channel->Source(); data.vpid = Channel->Vpid(); data.ppid = Channel->Ppid(); -#if defined(APIVERSNUM) && APIVERSNUM >= 10700 +#if defined(APIVERSNUM) && APIVERSNUM >= 10704 data.vtype = Channel->Vtype(); #endif data.tpid = Channel->Tpid(); @@ -200,7 +200,7 @@ void cIptvMenuEditChannel::SetChannelData(cChannel *Channel) break; } char slangs[MAXSPIDS][MAXLANGCODE2] = { "" }; -#if defined(APIVERSNUM) && APIVERSNUM >= 10700 +#if defined(APIVERSNUM) && APIVERSNUM >= 10704 Channel->SetPids(data.vpid, data.ppid, data.vtype, data.apid, alangs, data.dpid, dlangs, data.spid, slangs, data.tpid); #else Channel->SetPids(data.vpid, data.ppid, data.apid, alangs, data.dpid, dlangs, data.spid, slangs, data.tpid); @@ -244,6 +244,9 @@ void cIptvMenuEditChannel::Setup(void) Add(new cMenuEditStrItem(trVDR("Name"), data.name, sizeof(data.name))); Add(new cMenuEditIntItem(trVDR("Frequency"), &data.frequency)); Add(new cMenuEditIntItem(trVDR("Vpid"), &data.vpid, 0, 0x1FFF)); +#if defined(APIVERSNUM) && APIVERSNUM >= 10704 + Add(new cMenuEditIntItem(tr ("Vtype"), &data.vtype, 0, 0xFF)); +#endif Add(new cMenuEditIntItem(trVDR("Ppid"), &data.ppid, 0, 0x1FFF)); Add(new cMenuEditIntItem(trVDR("Apid1"), &data.apid[0], 0, 0x1FFF)); Add(new cMenuEditIntItem(trVDR("Apid2"), &data.apid[1], 0, 0x1FFF));