zapit/src/channel.cpp: add epg_id to use in place of channel id if needed

Origin commit data
------------------
Branch: ni/coolstream
Commit: dc506ab335
Author: [CST] Focus <focus.cst@gmail.com>
Date: 2015-06-02 (Tue, 02 Jun 2015)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
[CST] Focus
2015-06-02 15:15:41 +03:00
parent 3b141a5863
commit bad5e20ef8
2 changed files with 7 additions and 2 deletions

View File

@@ -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 <const CZapitChannel * const, const CZapitChannel * const, bool>

View File

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