diff --git a/common.c b/common.c index c7c43e6..99cfe50 100644 --- a/common.c +++ b/common.c @@ -3,7 +3,7 @@ * * See the README file for copyright information and how to reach the author. * - * $Id: common.c,v 1.2 2007/10/06 00:02:50 rahrenbe Exp $ + * $Id: common.c,v 1.3 2007/10/10 19:41:10 rahrenbe Exp $ */ #include @@ -30,15 +30,24 @@ uint8_t payload(const uint8_t *tsp) return 184; } +const char *id_pid(const u_short Pid) +{ + for (int i = 0; i < SECTION_FILTER_TABLE_SIZE; ++i) { + if (Pid == section_filter_table[i].pid) + return section_filter_table[i].tag; + } + return "---"; +} + const section_filter_table_type section_filter_table[SECTION_FILTER_TABLE_SIZE] = { - /* description pid tid mask */ - {trNOOP("PAT (0x00)"), 0x00, 0x00, 0xFF}, - {trNOOP("NIT (0x40)"), 0x10, 0x40, 0xFF}, - {trNOOP("SDT (0x42)"), 0x11, 0x42, 0xFF}, - {trNOOP("EIT (0x4E/0x4F)"), 0x12, 0x4E, 0xFE}, - {trNOOP("EIT (0x5X)"), 0x12, 0x50, 0xF0}, - {trNOOP("EIT (0x6X)"), 0x12, 0x60, 0xF0}, - {trNOOP("TDT (0x70)"), 0x14, 0x70, 0xFF}, + /* description tag pid tid mask */ + {trNOOP("PAT (0x00)"), "PAT", 0x00, 0x00, 0xFF}, + {trNOOP("NIT (0x40)"), "NIT", 0x10, 0x40, 0xFF}, + {trNOOP("SDT (0x42)"), "SDT", 0x11, 0x42, 0xFF}, + {trNOOP("EIT (0x4E/0x4F)"), "EIT", 0x12, 0x4E, 0xFE}, + {trNOOP("EIT (0x5X)"), "EIT", 0x12, 0x50, 0xF0}, + {trNOOP("EIT (0x6X)"), "EIT", 0x12, 0x60, 0xF0}, + {trNOOP("TDT (0x70)"), "TDT", 0x14, 0x70, 0xFF}, }; diff --git a/common.h b/common.h index d739a81..e3fb793 100644 --- a/common.h +++ b/common.h @@ -3,7 +3,7 @@ * * See the README file for copyright information and how to reach the author. * - * $Id: common.h,v 1.8 2007/10/09 16:37:16 rahrenbe Exp $ + * $Id: common.h,v 1.9 2007/10/10 19:41:10 rahrenbe Exp $ */ #ifndef __IPTV_COMMON_H @@ -11,9 +11,6 @@ #include -uint16_t ts_pid(const uint8_t *buf); -uint8_t payload(const uint8_t *tsp); - #ifdef DEBUG #define debug(x...) dsyslog("IPTV: " x); #define error(x...) esyslog("IPTV: " x); @@ -32,12 +29,17 @@ uint8_t payload(const uint8_t *tsp); #define SECTION_FILTER_TABLE_SIZE 7 -typedef struct _section_filter_table_type { +uint16_t ts_pid(const uint8_t *buf); +uint8_t payload(const uint8_t *tsp); +const char *id_pid(const u_short Pid); + +struct section_filter_table_type { const char *description; + const char *tag; u_short pid; u_char tid; u_char mask; -} section_filter_table_type; +}; extern const section_filter_table_type section_filter_table[SECTION_FILTER_TABLE_SIZE]; diff --git a/device.c b/device.c index 284d9a5..430552b 100644 --- a/device.c +++ b/device.c @@ -3,7 +3,7 @@ * * See the README file for copyright information and how to reach the author. * - * $Id: device.c,v 1.65 2007/10/09 22:12:17 rahrenbe Exp $ + * $Id: device.c,v 1.66 2007/10/10 19:41:10 rahrenbe Exp $ */ #include "config.h" @@ -97,7 +97,7 @@ cIptvDevice *cIptvDevice::GetIptvDevice(int CardIndex) cString cIptvDevice::GetGeneralInformation(void) { //debug("cIptvDevice::GetGeneralInformation(%d)\n", deviceIndex); - return cString::sprintf("IPTV device #%d (CardIndex: %d)\n%s\n%s%s", + return cString::sprintf("IPTV device: %d\nCardIndex: %d\n%s\n%s%s", deviceIndex, CardIndex(), pIptvStreamer ? *pIptvStreamer->GetInformation() : "", pIptvStreamer ? *pIptvStreamer->GetStatistic() : "", @@ -118,8 +118,9 @@ cString cIptvDevice::GetFiltersInformation(void) // loop through active section filters for (unsigned int i = 0; i < eMaxSecFilterCount; ++i) { if (secfilters[i]) { - info = cString::sprintf("%sFilter %d: %s Pid=%d\n", *info, i, - *secfilters[i]->GetStatistic(), secfilters[i]->GetPid()); + info = cString::sprintf("%sFilter %d: %s Pid=0x%02X (%s)\n", *info, i, + *secfilters[i]->GetStatistic(), secfilters[i]->GetPid(), + id_pid(secfilters[i]->GetPid())); if (++count > IPTV_STATS_ACTIVE_FILTERS_COUNT) break; } diff --git a/po/fi_FI.po b/po/fi_FI.po index 2c97aad..b8f46e6 100644 --- a/po/fi_FI.po +++ b/po/fi_FI.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: VDR 1.5.7\n" "Report-Msgid-Bugs-To: Rolf Ahrenberg\n" -"POT-Creation-Date: 2007-10-09 18:24+0300\n" +"POT-Creation-Date: 2007-10-10 22:27+0300\n" "PO-Revision-Date: 2007-08-12 23:22+0300\n" "Last-Translator: Rolf Ahrenberg\n" "Language-Team: \n" @@ -15,31 +15,31 @@ msgstr "" "Content-Type: text/plain; charset=ISO-8859-15\n" "Content-Transfer-Encoding: 8bit\n" -#: common.c:36 +#: common.c:45 msgid "PAT (0x00)" msgstr "PAT (0x00)" -#: common.c:37 +#: common.c:46 msgid "NIT (0x40)" msgstr "NIT (0x40)" -#: common.c:38 +#: common.c:47 msgid "SDT (0x42)" msgstr "SDT (0x42)" -#: common.c:39 +#: common.c:48 msgid "EIT (0x4E/0x4F)" msgstr "EIT (0x4E/0x4F)" -#: common.c:40 +#: common.c:49 msgid "EIT (0x5X)" msgstr "EIT (0x5X)" -#: common.c:41 +#: common.c:50 msgid "EIT (0x6X)" msgstr "EIT (0x6X)" -#: common.c:42 +#: common.c:51 msgid "TDT (0x70)" msgstr "TDT (0x70)"