1
0
mirror of https://github.com/rofafor/vdr-plugin-iptv.git synced 2023-10-10 13:37:03 +02:00

Added text identication to section filter statistics.

This commit is contained in:
Rolf Ahrenberg 2007-10-10 19:41:10 +00:00
parent c568bf973c
commit 9d5a91b288
4 changed files with 39 additions and 27 deletions

View File

@ -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 <vdr/i18n.h>
@ -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},
};

View File

@ -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 <vdr/tools.h>
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];

View File

@ -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;
}

View File

@ -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: <vdr@linuxtv.org>\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)"