zapit: add new event EVT_TUNE_COMPLETE

This commit is contained in:
[CST] Focus
2012-02-19 14:13:55 +04:00
parent e9430aec0d
commit b6a60b6243
3 changed files with 8 additions and 3 deletions

View File

@@ -143,9 +143,10 @@ struct NeutrinoMessages {
EVT_ZAP_GOT_SUBSERVICES = CRCInput::RC_WithData + 19, /* data: (t_channel_id *) */
EVT_ZAP_GOTAPIDS = CRCInput::RC_WithData + 20, /* data: (t_channel_id *) */
EVT_ZAP_GOTPIDS = CRCInput::RC_WithData + 21, /* data: (t_channel_id *) */
EVT_TUNE_COMPLETE = CRCInput::RC_WithData + 22, /* data: (t_channel_id *) */
/* neutrino */
EVT_RECORDING_ENDED = CRCInput::RC_WithData + 22
EVT_RECORDING_ENDED = CRCInput::RC_WithData + 23
};
enum
{

View File

@@ -71,6 +71,7 @@ class CZapitClient:public CBasicClient
EVT_SDT_CHANGED,
EVT_SERVICES_CHANGED,
EVT_PMT_CHANGED,
EVT_TUNE_COMPLETE,
LAST_EVENT_MARKER // <- no actual event, needed by pzapit
};

View File

@@ -504,9 +504,12 @@ bool CZapit::ZapIt(const t_channel_id channel_id, bool forupdate, bool startplay
live_channel_id = current_channel->getChannelID();
SaveSettings(false);
if(!TuneChannel(live_fe, newchannel, transponder_change))
if(!TuneChannel(live_fe, newchannel, transponder_change)) {
t_channel_id chid = 0;
SendEvent(CZapitClient::EVT_TUNE_COMPLETE, &chid, sizeof(t_channel_id));
return false;
}
SendEvent(CZapitClient::EVT_TUNE_COMPLETE, &live_channel_id, sizeof(t_channel_id));
if (current_channel->getServiceType() == ST_NVOD_REFERENCE_SERVICE) {
current_is_nvod = true;