mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-29 16:31:05 +02:00
eitd: ifdef unused item/itemDescription, comment unused vps in SIevent
Origin commit data
------------------
Branch: ni/coolstream
Commit: 1cc3219c89
Author: [CST] Focus <focus.cst@gmail.com>
Date: 2012-05-29 (Tue, 29 May 2012)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -144,7 +144,7 @@ void SIevent::parse(Event &event)
|
|||||||
std::string lang = d->getIso639LanguageCode();
|
std::string lang = d->getIso639LanguageCode();
|
||||||
std::transform(lang.begin(), lang.end(), lang.begin(), tolower);
|
std::transform(lang.begin(), lang.end(), lang.begin(), tolower);
|
||||||
int table = getCountryCodeDefaultMapping(lang);
|
int table = getCountryCodeDefaultMapping(lang);
|
||||||
|
#ifdef USE_ITEM_DESCRIPTION
|
||||||
const ExtendedEventList *itemlist = d->getItems();
|
const ExtendedEventList *itemlist = d->getItems();
|
||||||
for (ExtendedEventConstIterator it = itemlist->begin(); it != itemlist->end(); ++it) {
|
for (ExtendedEventConstIterator it = itemlist->begin(); it != itemlist->end(); ++it) {
|
||||||
itemDescription.append(stringDVBUTF8((*it)->getItemDescription(), table, tsidonid));
|
itemDescription.append(stringDVBUTF8((*it)->getItemDescription(), table, tsidonid));
|
||||||
@@ -152,6 +152,7 @@ void SIevent::parse(Event &event)
|
|||||||
item.append(stringDVBUTF8((*it)->getItem(), table, tsidonid));
|
item.append(stringDVBUTF8((*it)->getItem(), table, tsidonid));
|
||||||
item.append("\n");
|
item.append("\n");
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
appendExtendedText(lang, stringDVBUTF8(d->getText(), table, tsidonid));
|
appendExtendedText(lang, stringDVBUTF8(d->getText(), table, tsidonid));
|
||||||
}
|
}
|
||||||
else if(dtype == CONTENT_DESCRIPTOR) {
|
else if(dtype == CONTENT_DESCRIPTOR) {
|
||||||
@@ -275,15 +276,19 @@ void SIevent::parseExtendedEventDescriptor(const uint8_t *buf, unsigned maxlen)
|
|||||||
|
|
||||||
unsigned char *items=(unsigned char *)(buf+sizeof(struct descr_extended_event_header));
|
unsigned char *items=(unsigned char *)(buf+sizeof(struct descr_extended_event_header));
|
||||||
while(items < (unsigned char *)(buf + sizeof(struct descr_extended_event_header) + evt->length_of_items)) {
|
while(items < (unsigned char *)(buf + sizeof(struct descr_extended_event_header) + evt->length_of_items)) {
|
||||||
|
#ifdef USE_ITEM_DESCRIPTION
|
||||||
if(*items) {
|
if(*items) {
|
||||||
itemDescription.append(convertDVBUTF8((const char *)(items+1), min(maxlen-(items+1-buf), *items), table, tsidonid));
|
itemDescription.append(convertDVBUTF8((const char *)(items+1), min(maxlen-(items+1-buf), *items), table, tsidonid));
|
||||||
itemDescription.append("\n");
|
itemDescription.append("\n");
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
items+=1+*items;
|
items+=1+*items;
|
||||||
|
#ifdef USE_ITEM_DESCRIPTION
|
||||||
if(*items) {
|
if(*items) {
|
||||||
item.append(convertDVBUTF8((const char *)(items+1), min(maxlen-(items+1-buf), *items), table, tsidonid));
|
item.append(convertDVBUTF8((const char *)(items+1), min(maxlen-(items+1-buf), *items), table, tsidonid));
|
||||||
item.append("\n");
|
item.append("\n");
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
items+=1+*items;
|
items+=1+*items;
|
||||||
}
|
}
|
||||||
if(*items)
|
if(*items)
|
||||||
@@ -475,6 +480,7 @@ int SIevent::saveXML2(FILE *file) const
|
|||||||
fprintf(file, "\"/>\n");
|
fprintf(file, "\"/>\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#ifdef USE_ITEM_DESCRIPTION
|
||||||
if(item.length()) {
|
if(item.length()) {
|
||||||
fprintf(file, "\t\t\t<item string=\"");
|
fprintf(file, "\t\t\t<item string=\"");
|
||||||
saveStringToXMLfile(file, item.c_str());
|
saveStringToXMLfile(file, item.c_str());
|
||||||
@@ -485,6 +491,7 @@ int SIevent::saveXML2(FILE *file) const
|
|||||||
saveStringToXMLfile(file, itemDescription.c_str());
|
saveStringToXMLfile(file, itemDescription.c_str());
|
||||||
fprintf(file, "\"/>\n");
|
fprintf(file, "\"/>\n");
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
for (std::map<std::string, std::string>::const_iterator
|
for (std::map<std::string, std::string>::const_iterator
|
||||||
i = langExtendedText.begin() ;
|
i = langExtendedText.begin() ;
|
||||||
i != langExtendedText.end() ;
|
i != langExtendedText.end() ;
|
||||||
@@ -516,11 +523,12 @@ void SIevent::dump(void) const
|
|||||||
if (service_id)
|
if (service_id)
|
||||||
printf("Service-ID: %hu\n", service_id);
|
printf("Service-ID: %hu\n", service_id);
|
||||||
printf("Event-ID: %hu\n", eventID);
|
printf("Event-ID: %hu\n", eventID);
|
||||||
|
#ifdef USE_ITEM_DESCRIPTION
|
||||||
if(item.length())
|
if(item.length())
|
||||||
printf("Item: %s\n", item.c_str());
|
printf("Item: %s\n", item.c_str());
|
||||||
if(itemDescription.length())
|
if(itemDescription.length())
|
||||||
printf("Item-Description: %s\n", itemDescription.c_str());
|
printf("Item-Description: %s\n", itemDescription.c_str());
|
||||||
|
#endif
|
||||||
for (std::map<std::string, std::string>::const_iterator it = langName.begin() ;
|
for (std::map<std::string, std::string>::const_iterator it = langName.begin() ;
|
||||||
it != langName.end() ; ++it)
|
it != langName.end() ; ++it)
|
||||||
printf("Name (%s): %s\n", it->first.c_str(), it->second.c_str());
|
printf("Name (%s): %s\n", it->first.c_str(), it->second.c_str());
|
||||||
|
@@ -32,6 +32,8 @@
|
|||||||
#include <dvbsi++/event_information_section.h>
|
#include <dvbsi++/event_information_section.h>
|
||||||
#include "edvbstring.h"
|
#include "edvbstring.h"
|
||||||
|
|
||||||
|
//#define USE_ITEM_DESCRIPTION
|
||||||
|
|
||||||
struct eit_event {
|
struct eit_event {
|
||||||
unsigned event_id_hi : 8;
|
unsigned event_id_hi : 8;
|
||||||
unsigned event_id_lo : 8;
|
unsigned event_id_lo : 8;
|
||||||
@@ -358,7 +360,7 @@ class SIevent
|
|||||||
t_original_network_id original_network_id;
|
t_original_network_id original_network_id;
|
||||||
t_transport_stream_id transport_stream_id;
|
t_transport_stream_id transport_stream_id;
|
||||||
unsigned short eventID;
|
unsigned short eventID;
|
||||||
time_t vps;
|
//time_t vps;
|
||||||
unsigned char table_id;
|
unsigned char table_id;
|
||||||
unsigned char version;
|
unsigned char version;
|
||||||
|
|
||||||
@@ -367,8 +369,10 @@ class SIevent
|
|||||||
SIlinkage_descs linkage_descs;
|
SIlinkage_descs linkage_descs;
|
||||||
SItimes times;
|
SItimes times;
|
||||||
|
|
||||||
|
#ifdef USE_ITEM_DESCRIPTION
|
||||||
std::string itemDescription; // Aus dem Extended Descriptor
|
std::string itemDescription; // Aus dem Extended Descriptor
|
||||||
std::string item; // Aus dem Extended Descriptor
|
std::string item; // Aus dem Extended Descriptor
|
||||||
|
#endif
|
||||||
std::string contentClassification; // Aus dem Content Descriptor, als String, da mehrere vorkommen koennen
|
std::string contentClassification; // Aus dem Content Descriptor, als String, da mehrere vorkommen koennen
|
||||||
std::string userClassification; // Aus dem Content Descriptor, als String, da mehrere vorkommen koennen
|
std::string userClassification; // Aus dem Content Descriptor, als String, da mehrere vorkommen koennen
|
||||||
|
|
||||||
@@ -378,7 +382,7 @@ class SIevent
|
|||||||
original_network_id = 0;
|
original_network_id = 0;
|
||||||
transport_stream_id = 0;
|
transport_stream_id = 0;
|
||||||
eventID = 0;
|
eventID = 0;
|
||||||
vps = 0;
|
//vps = 0;
|
||||||
table_id = 0xFF; /* 0xFF means "not set" */
|
table_id = 0xFF; /* 0xFF means "not set" */
|
||||||
version = 0xFF;
|
version = 0xFF;
|
||||||
running = false;
|
running = false;
|
||||||
|
@@ -349,9 +349,11 @@ xprintf("addEvent: current %016llx event %016llx running %d messaging_got_CN %d\
|
|||||||
if ((already_exists) && (SIlanguage::getMode() == CSectionsdClient::LANGUAGE_MODE_OFF)) {
|
if ((already_exists) && (SIlanguage::getMode() == CSectionsdClient::LANGUAGE_MODE_OFF)) {
|
||||||
si->second->contentClassification = evt.contentClassification;
|
si->second->contentClassification = evt.contentClassification;
|
||||||
si->second->userClassification = evt.userClassification;
|
si->second->userClassification = evt.userClassification;
|
||||||
|
#ifdef USE_ITEM_DESCRIPTION
|
||||||
si->second->itemDescription = evt.itemDescription;
|
si->second->itemDescription = evt.itemDescription;
|
||||||
si->second->item = evt.item;
|
si->second->item = evt.item;
|
||||||
si->second->vps = evt.vps;
|
#endif
|
||||||
|
//si->second->vps = evt.vps;
|
||||||
if ((evt.getExtendedText().length() > 0) && !evt.times.empty() &&
|
if ((evt.getExtendedText().length() > 0) && !evt.times.empty() &&
|
||||||
(evt.times.begin()->startzeit < zeit + secondsExtendedTextCache))
|
(evt.times.begin()->startzeit < zeit + secondsExtendedTextCache))
|
||||||
si->second->setExtendedText("OFF",evt.getExtendedText().c_str());
|
si->second->setExtendedText("OFF",evt.getExtendedText().c_str());
|
||||||
|
@@ -334,6 +334,7 @@ void *insertEventsfromFile(void * data)
|
|||||||
std::string(xmlGetAttribute(node, "string")));
|
std::string(xmlGetAttribute(node, "string")));
|
||||||
node = node->xmlNextNode;
|
node = node->xmlNextNode;
|
||||||
}
|
}
|
||||||
|
#ifdef USE_ITEM_DESCRIPTION
|
||||||
while (xmlGetNextOccurence(node, "item") != NULL) {
|
while (xmlGetNextOccurence(node, "item") != NULL) {
|
||||||
e.item = std::string(xmlGetAttribute(node, "string"));
|
e.item = std::string(xmlGetAttribute(node, "string"));
|
||||||
node = node->xmlNextNode;
|
node = node->xmlNextNode;
|
||||||
@@ -342,6 +343,7 @@ void *insertEventsfromFile(void * data)
|
|||||||
e.itemDescription = std::string(xmlGetAttribute(node, "string"));
|
e.itemDescription = std::string(xmlGetAttribute(node, "string"));
|
||||||
node = node->xmlNextNode;
|
node = node->xmlNextNode;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
while (xmlGetNextOccurence(node, "extended_text") != NULL) {
|
while (xmlGetNextOccurence(node, "extended_text") != NULL) {
|
||||||
e.appendExtendedText( std::string(ZapitTools::UTF8_to_Latin1(xmlGetAttribute(node, "lang"))),
|
e.appendExtendedText( std::string(ZapitTools::UTF8_to_Latin1(xmlGetAttribute(node, "lang"))),
|
||||||
std::string(xmlGetAttribute(node, "string")));
|
std::string(xmlGetAttribute(node, "string")));
|
||||||
|
Reference in New Issue
Block a user