From bad5e20ef8bcbc4bb7e12bc5bed3e9108f5f5b3b Mon Sep 17 00:00:00 2001 From: "[CST] Focus" Date: Tue, 2 Jun 2015 15:15:41 +0300 Subject: [PATCH] zapit/src/channel.cpp: add epg_id to use in place of channel id if needed Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/dc506ab3356a41628d7cb5b4e3de29e3b9923410 Author: [CST] Focus Date: 2015-06-02 (Tue, 02 Jun 2015) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/zapit/include/zapit/channel.h | 4 +++- src/zapit/src/channel.cpp | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/zapit/include/zapit/channel.h b/src/zapit/include/zapit/channel.h index 83bae3028..fba6150dc 100644 --- a/src/zapit/include/zapit/channel.h +++ b/src/zapit/include/zapit/channel.h @@ -122,6 +122,7 @@ class CZapitChannel std::string name; /* TODO : Enable different unames in different bouquets ( generated bouquetID ? ) */ std::string uname; + t_channel_id epg_id; /* WebTV */ std::string url; @@ -205,7 +206,7 @@ class CZapitChannel /* constructor, desctructor */ CZapitChannel(const std::string & p_name, t_service_id p_sid, t_transport_stream_id p_tsid, t_original_network_id p_onid, unsigned char p_service_type, t_satellite_position p_satellite_position, freq_id_t freq); CZapitChannel(const std::string & p_name, t_channel_id p_channel_id, unsigned char p_service_type, t_satellite_position p_satellite_position, freq_id_t p_freq); - CZapitChannel(const char *p_name, t_channel_id p_channel_id, const char *p_url, const char *p_desc); + CZapitChannel(const char *p_name, t_channel_id p_channel_id, const char *p_url, const char *p_desc, t_channel_id epgid = 0); ~CZapitChannel(void); /* get methods - read only variables */ @@ -284,6 +285,7 @@ class CZapitChannel return (((uint64_t)(sat+freq*4) << 48) | ((uint64_t) tsid << 32) | ((uint64_t)onid << 16) | (uint64_t)sid); }; bool Locked() { return (bLocked || !!bLockCount); } + t_channel_id getEpgID(void) const { return epg_id; } }; struct CmpChannelBySat: public std::binary_function diff --git a/src/zapit/src/channel.cpp b/src/zapit/src/channel.cpp index c13337cbc..5a497a34d 100644 --- a/src/zapit/src/channel.cpp +++ b/src/zapit/src/channel.cpp @@ -37,6 +37,7 @@ CZapitChannel::CZapitChannel(const std::string & p_name, t_service_id p_sid, t_t satellitePosition = p_satellite_position; freq = p_freq; channel_id = CREATE_CHANNEL_ID64; + epg_id = channel_id; Init(); //printf("NEW CHANNEL %s %x\n", name.c_str(), (int) this); } @@ -51,11 +52,12 @@ CZapitChannel::CZapitChannel(const std::string & p_name, t_channel_id p_channel_ serviceType = p_service_type; satellitePosition = p_satellite_position; freq = p_freq; + epg_id = channel_id; Init(); } // For WebTV ... -CZapitChannel::CZapitChannel(const char *p_name, t_channel_id p_channel_id, const char *p_url, const char *p_desc) +CZapitChannel::CZapitChannel(const char *p_name, t_channel_id p_channel_id, const char *p_url, const char *p_desc, t_channel_id epgid) { if (!p_name || !p_url) return; @@ -70,6 +72,7 @@ CZapitChannel::CZapitChannel(const char *p_name, t_channel_id p_channel_id, cons serviceType = ST_DIGITAL_TELEVISION_SERVICE; satellitePosition = 0; freq = 0; + epg_id = epgid; Init(); }