diff --git a/src/daemonc/remotecontrol.cpp b/src/daemonc/remotecontrol.cpp index 9ecd680ca..fe1281711 100644 --- a/src/daemonc/remotecontrol.cpp +++ b/src/daemonc/remotecontrol.cpp @@ -90,7 +90,7 @@ CSubService::CSubService(const t_original_network_id anoriginal_network_id, cons t_channel_id CSubService::getChannelID(void) const { return ((uint64_t) ( satellitePosition >= 0 ? satellitePosition : (uint64_t)(0xF000+ abs(satellitePosition))) << 48) | - (uint64_t) CREATE_CHANNEL_ID_FROM_SERVICE_ORIGINALNETWORK_TRANSPORTSTREAM_ID(service.service_id, service.original_network_id, service.transport_stream_id); + (uint64_t) CREATE_CHANNEL_ID(service.service_id, service.original_network_id, service.transport_stream_id); } diff --git a/src/eitd/SIevents.hpp b/src/eitd/SIevents.hpp index 52e4b28c4..08025ce99 100644 --- a/src/eitd/SIevents.hpp +++ b/src/eitd/SIevents.hpp @@ -313,11 +313,11 @@ class SIevent void setExtendedText(const std::string &lang, const std::string &text); t_channel_id get_channel_id(void) const { - return CREATE_CHANNEL_ID; + return CREATE_CHANNEL_ID(service_id, original_network_id, transport_stream_id); } event_id_t uniqueKey(void) const { - return CREATE_EVENT_ID(CREATE_CHANNEL_ID, eventID); + return CREATE_EVENT_ID(get_channel_id(), eventID); } int runningStatus(void) const { return running; diff --git a/src/eitd/SIservices.hpp b/src/eitd/SIservices.hpp index 4eebb08c9..91cacc583 100644 --- a/src/eitd/SIservices.hpp +++ b/src/eitd/SIservices.hpp @@ -65,7 +65,7 @@ public: } t_channel_id uniqueKey(void) const { - return CREATE_CHANNEL_ID; // cf. zapittypes.h + return CREATE_CHANNEL_ID(service_id, original_network_id, transport_stream_id); // cf. zapittypes.h } void dump(void) const { @@ -124,9 +124,8 @@ public: } t_channel_id uniqueKey(void) const { - //return CREATE_CHANNEL_ID; //notice that tsid & onid were changed for compatibility sake - order should be onid tsid when being sorted - return CREATE_CHANNEL_ID_FROM_SERVICE_ORIGINALNETWORK_TRANSPORTSTREAM_ID(service_id, transport_stream_id, original_network_id); + return CREATE_CHANNEL_ID(service_id, transport_stream_id, original_network_id); } void dump(void) const { diff --git a/src/eitd/xmlutil.cpp b/src/eitd/xmlutil.cpp index 8fd64e490..7a2e58eb1 100644 --- a/src/eitd/xmlutil.cpp +++ b/src/eitd/xmlutil.cpp @@ -142,9 +142,9 @@ static void addEPGFilter(t_original_network_id onid, t_transport_stream_id tsid, static void addBlacklist(t_original_network_id onid, t_transport_stream_id tsid, t_service_id sid) { t_channel_id channel_id = - CREATE_CHANNEL_ID_FROM_SERVICE_ORIGINALNETWORK_TRANSPORTSTREAM_ID(sid, onid, tsid); + CREATE_CHANNEL_ID(sid, onid, tsid); t_channel_id mask = - CREATE_CHANNEL_ID_FROM_SERVICE_ORIGINALNETWORK_TRANSPORTSTREAM_ID( + CREATE_CHANNEL_ID( (sid ? 0xFFFF : 0), (onid ? 0xFFFF : 0), (tsid ? 0xFFFF : 0) ); if (!checkBlacklist(channel_id)) @@ -161,9 +161,9 @@ static void addBlacklist(t_original_network_id onid, t_transport_stream_id tsid, static void addNoDVBTimelist(t_original_network_id onid, t_transport_stream_id tsid, t_service_id sid) { t_channel_id channel_id = - CREATE_CHANNEL_ID_FROM_SERVICE_ORIGINALNETWORK_TRANSPORTSTREAM_ID(sid, onid, tsid); + CREATE_CHANNEL_ID(sid, onid, tsid); t_channel_id mask = - CREATE_CHANNEL_ID_FROM_SERVICE_ORIGINALNETWORK_TRANSPORTSTREAM_ID( + CREATE_CHANNEL_ID( (sid ? 0xFFFF : 0), (onid ? 0xFFFF : 0), (tsid ? 0xFFFF : 0) ); if (!checkNoDVBTimelist(channel_id)) diff --git a/src/gui/eventlist.cpp b/src/gui/eventlist.cpp index 0c8b2f374..e628f1444 100644 --- a/src/gui/eventlist.cpp +++ b/src/gui/eventlist.cpp @@ -181,7 +181,7 @@ void CNeutrinoEventList::readEvents(const t_channel_id channel_id) #endif for (unsigned int i=0; iprintf(PRINTF_CHANNEL_ID_TYPE_NO_LEADING_ZEROS " %s\n", diff --git a/src/nhttpd/tuxboxapi/coolstream/neutrinoyparser.cpp b/src/nhttpd/tuxboxapi/coolstream/neutrinoyparser.cpp index 201c9c805..92727a314 100644 --- a/src/nhttpd/tuxboxapi/coolstream/neutrinoyparser.cpp +++ b/src/nhttpd/tuxboxapi/coolstream/neutrinoyparser.cpp @@ -409,7 +409,7 @@ std::string CNeutrinoYParser::func_get_bouquets_with_epg(CyhookHandler *hh, std: cmd.service_id = ntohs(ni->service_id); cmd.transport_stream_id = ntohs(ni->transport_stream_id); - t_channel_id channel_id = CREATE_CHANNEL_ID_FROM_SERVICE_ORIGINALNETWORK_TRANSPORTSTREAM_ID(cmd.service_id, cmd.original_network_id, cmd.transport_stream_id); + t_channel_id channel_id = CREATE_CHANNEL_ID(cmd.service_id, cmd.original_network_id, cmd.transport_stream_id); timestr = timeString(ni->zeit.startzeit); // FIXME: time is wrong (at least on little endian)! sectionsd_getActualEPGServiceKey(channel_id&0xFFFFFFFFFFFFULL, &epg); // FIXME: der scheissendreck geht nit!!! diff --git a/src/zapit/include/zapit/client/zapittypes.h b/src/zapit/include/zapit/client/zapittypes.h index 557c8df93..de78cc657 100644 --- a/src/zapit/include/zapit/client/zapittypes.h +++ b/src/zapit/include/zapit/client/zapittypes.h @@ -44,17 +44,17 @@ typedef uint16_t t_transport_stream_id; typedef int16_t t_satellite_position; #define SCANF_SATELLITE_POSITION_TYPE "%hd" -typedef uint16_t t_network_id; +//typedef uint16_t t_network_id; //Introduced by Nirvana 11/05. Didn't check if there are similar types typedef uint16_t t_bouquet_id; //Introduced by Nirvana 11/05. Didn't check if there are similar types -typedef uint32_t t_transponder_id; +//typedef uint32_t t_transponder_id; #define CREATE_TRANSPONDER_ID_FROM_ORIGINALNETWORK_TRANSPORTSTREAM_ID(original_network_id,transport_stream_id) ((((t_original_network_id) original_network_id) << 16) | (t_transport_stream_id) transport_stream_id) /* unique channel identification */ typedef uint64_t t_channel_id; -#define CREATE_CHANNEL_ID_FROM_SERVICE_ORIGINALNETWORK_TRANSPORTSTREAM_ID(service_id,original_network_id,transport_stream_id) ((((t_channel_id)transport_stream_id) << 32) | (((t_channel_id)original_network_id) << 16) | (t_channel_id)service_id) -#define CREATE_CHANNEL_ID CREATE_CHANNEL_ID_FROM_SERVICE_ORIGINALNETWORK_TRANSPORTSTREAM_ID(service_id, original_network_id, transport_stream_id) +#define CREATE_CHANNEL_ID(service_id,original_network_id,transport_stream_id) ((((t_channel_id)transport_stream_id) << 32) | (((t_channel_id)original_network_id) << 16) | (t_channel_id)service_id) +//#define CREATE_CHANNEL_ID CREATE_CHANNEL_ID_FROM_SERVICE_ORIGINALNETWORK_TRANSPORTSTREAM_ID(service_id, original_network_id, transport_stream_id) #define GET_TRANSPORT_STREAM_ID_FROM_CHANNEL_ID(channel_id) ((t_original_network_id)((channel_id) >> 32)) #define GET_ORIGINAL_NETWORK_ID_FROM_CHANNEL_ID(channel_id) ((t_original_network_id)((channel_id) >> 16)) #define GET_SERVICE_ID_FROM_CHANNEL_ID(channel_id) ((t_service_id)(channel_id)) diff --git a/src/zapit/src/zapit.cpp b/src/zapit/src/zapit.cpp index b1902a338..c1c920501 100644 --- a/src/zapit/src/zapit.cpp +++ b/src/zapit/src/zapit.cpp @@ -1492,7 +1492,7 @@ printf("[zapit] TP_id %d freq %d rate %d fec %d pol %d\n", TP.TP_id, TP.feparams t_service_id service_id = msgAddSubService.service_id; t_channel_id sub_channel_id = ((uint64_t) ( satellitePosition >= 0 ? satellitePosition : (uint64_t)(0xF000+ abs(satellitePosition))) << 48) | - (uint64_t) CREATE_CHANNEL_ID_FROM_SERVICE_ORIGINALNETWORK_TRANSPORTSTREAM_ID(msgAddSubService.service_id, msgAddSubService.original_network_id, msgAddSubService.transport_stream_id); + (uint64_t) CREATE_CHANNEL_ID(msgAddSubService.service_id, msgAddSubService.original_network_id, msgAddSubService.transport_stream_id); DBG("NVOD insert %llx\n", sub_channel_id); nvodchannels.insert ( std::pair (