mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-27 23:42:51 +02:00
sectionsd: add table ID to event data
record the originating table ID with every event
if not set (e.g. for events read from saved data), it defaults
to 0xff to make sure it is bigger than a real existing table ID
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@1381 e54a6e83-5905-42d5-8d5c-058d10e6a962
Origin commit data
------------------
Commit: 72149b63a4
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2011-04-09 (Sat, 09 Apr 2011)
This commit is contained in:
@@ -233,6 +233,7 @@ class CEPGData
|
|||||||
std::vector<std::string> itemDescriptions;
|
std::vector<std::string> itemDescriptions;
|
||||||
std::vector<std::string> items;
|
std::vector<std::string> items;
|
||||||
char fsk;
|
char fsk;
|
||||||
|
unsigned char table_id;
|
||||||
std::string contentClassification;
|
std::string contentClassification;
|
||||||
std::string userClassification;
|
std::string userClassification;
|
||||||
|
|
||||||
@@ -243,6 +244,7 @@ class CEPGData
|
|||||||
info1 = "";
|
info1 = "";
|
||||||
info2 = "";
|
info2 = "";
|
||||||
fsk = 0;
|
fsk = 0;
|
||||||
|
table_id = 0xff;
|
||||||
contentClassification = "";
|
contentClassification = "";
|
||||||
userClassification = "";
|
userClassification = "";
|
||||||
};
|
};
|
||||||
|
@@ -65,6 +65,7 @@ SIevent::SIevent(const struct eit_event *e)
|
|||||||
|
|
||||||
running = (int)e->running_status;
|
running = (int)e->running_status;
|
||||||
|
|
||||||
|
table_id = 0xFF; /* not set */
|
||||||
service_id = 0;
|
service_id = 0;
|
||||||
original_network_id = 0;
|
original_network_id = 0;
|
||||||
transport_stream_id = 0;
|
transport_stream_id = 0;
|
||||||
@@ -77,6 +78,7 @@ SIevent::SIevent(const t_original_network_id _original_network_id, const t_trans
|
|||||||
transport_stream_id = _transport_stream_id;
|
transport_stream_id = _transport_stream_id;
|
||||||
service_id = _service_id;
|
service_id = _service_id;
|
||||||
eventID = _event_id;
|
eventID = _event_id;
|
||||||
|
table_id = 0xFF; /* not set */
|
||||||
/* contentClassification = "";
|
/* contentClassification = "";
|
||||||
userClassification = "";
|
userClassification = "";
|
||||||
itemDescription = "";
|
itemDescription = "";
|
||||||
@@ -105,6 +107,8 @@ SIevent::SIevent(const SIevent &e)
|
|||||||
ratings=e.ratings;
|
ratings=e.ratings;
|
||||||
linkage_descs=e.linkage_descs;
|
linkage_descs=e.linkage_descs;
|
||||||
running=e.running;
|
running=e.running;
|
||||||
|
vps = e.vps;
|
||||||
|
table_id = e.table_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
int SIevent::saveXML(FILE *file, const char *serviceName) const
|
int SIevent::saveXML(FILE *file, const char *serviceName) const
|
||||||
|
@@ -353,6 +353,7 @@ public:
|
|||||||
transport_stream_id = 0;
|
transport_stream_id = 0;
|
||||||
eventID = 0;
|
eventID = 0;
|
||||||
vps = 0;
|
vps = 0;
|
||||||
|
table_id = 0xFF; /* 0xFF means "not set" */
|
||||||
// dauer=0;
|
// dauer=0;
|
||||||
// startzeit=0;
|
// startzeit=0;
|
||||||
}
|
}
|
||||||
@@ -393,6 +394,7 @@ public:
|
|||||||
SIlinkage_descs linkage_descs;
|
SIlinkage_descs linkage_descs;
|
||||||
SItimes times;
|
SItimes times;
|
||||||
time_t vps;
|
time_t vps;
|
||||||
|
unsigned char table_id;
|
||||||
// Der Operator zum sortieren
|
// Der Operator zum sortieren
|
||||||
bool operator < (const SIevent& e) const {
|
bool operator < (const SIevent& e) const {
|
||||||
return uniqueKey()<e.uniqueKey();
|
return uniqueKey()<e.uniqueKey();
|
||||||
|
@@ -503,6 +503,8 @@ void SIsectionEIT::parse(void)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
unsigned char table_id = header()->table_id;
|
||||||
|
|
||||||
actPos = buffer + sizeof(SI_section_EIT_header);
|
actPos = buffer + sizeof(SI_section_EIT_header);
|
||||||
bufEnd = buffer + bufferLength;
|
bufEnd = buffer + bufferLength;
|
||||||
|
|
||||||
@@ -512,6 +514,7 @@ void SIsectionEIT::parse(void)
|
|||||||
e.service_id = service_id();
|
e.service_id = service_id();
|
||||||
e.original_network_id = original_network_id();
|
e.original_network_id = original_network_id();
|
||||||
e.transport_stream_id = transport_stream_id();
|
e.transport_stream_id = transport_stream_id();
|
||||||
|
e.table_id = table_id;
|
||||||
descriptors_loop_length = sizeof(struct eit_event) + ((evt->descriptors_loop_length_hi << 8) | evt->descriptors_loop_length_lo);
|
descriptors_loop_length = sizeof(struct eit_event) + ((evt->descriptors_loop_length_hi << 8) | evt->descriptors_loop_length_lo);
|
||||||
parseDescriptors(actPos, min((unsigned)(bufEnd - actPos), descriptors_loop_length), e);
|
parseDescriptors(actPos, min((unsigned)(bufEnd - actPos), descriptors_loop_length), e);
|
||||||
evts.insert(e);
|
evts.insert(e);
|
||||||
|
@@ -9179,6 +9179,7 @@ bool sectionsd_getEPGid(const event_id_t epgID, const time_t startzeit, CEPGData
|
|||||||
epgdata->contentClassification = std::string(evt.contentClassification.data(), evt.contentClassification.length());
|
epgdata->contentClassification = std::string(evt.contentClassification.data(), evt.contentClassification.length());
|
||||||
epgdata->userClassification = std::string(evt.userClassification.data(), evt.userClassification.length());
|
epgdata->userClassification = std::string(evt.userClassification.data(), evt.userClassification.length());
|
||||||
epgdata->fsk = evt.getFSK();
|
epgdata->fsk = evt.getFSK();
|
||||||
|
epgdata->table_id = evt.table_id;
|
||||||
|
|
||||||
epgdata->epg_times.startzeit = t->startzeit;
|
epgdata->epg_times.startzeit = t->startzeit;
|
||||||
epgdata->epg_times.dauer = t->dauer;
|
epgdata->epg_times.dauer = t->dauer;
|
||||||
@@ -9236,6 +9237,7 @@ bool sectionsd_getActualEPGServiceKey(const t_channel_id uniqueServiceKey, CEPGD
|
|||||||
epgdata->contentClassification = std::string(evt.contentClassification.data(), evt.contentClassification.length());
|
epgdata->contentClassification = std::string(evt.contentClassification.data(), evt.contentClassification.length());
|
||||||
epgdata->userClassification = std::string(evt.userClassification.data(), evt.userClassification.length());
|
epgdata->userClassification = std::string(evt.userClassification.data(), evt.userClassification.length());
|
||||||
epgdata->fsk = evt.getFSK();
|
epgdata->fsk = evt.getFSK();
|
||||||
|
epgdata->table_id = evt.table_id;
|
||||||
|
|
||||||
epgdata->epg_times.startzeit = zeit.startzeit;
|
epgdata->epg_times.startzeit = zeit.startzeit;
|
||||||
epgdata->epg_times.dauer = zeit.dauer;
|
epgdata->epg_times.dauer = zeit.dauer;
|
||||||
|
Reference in New Issue
Block a user