Add SAME_TRANSPONDER define; Add new zapit client function

git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-beta@1565 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
focus
2011-07-21 10:16:03 +00:00
parent 9dadf4ff05
commit 1c6d1a8a08
4 changed files with 22 additions and 0 deletions

View File

@@ -187,6 +187,7 @@ class CZapitMessages
struct commandZaptoServiceID struct commandZaptoServiceID
{ {
t_channel_id channel_id; t_channel_id channel_id;
bool record;
}; };
struct commandSetAudioChannel struct commandSetAudioChannel

View File

@@ -271,6 +271,7 @@ class CZapitClient:public CBasicClient
/* zaps to channel, returns the "zap-status" */ /* zaps to channel, returns the "zap-status" */
unsigned int zapTo_serviceID(const t_channel_id channel_id); unsigned int zapTo_serviceID(const t_channel_id channel_id);
unsigned int zapTo_record(const t_channel_id channel_id);
/* zaps to subservice, returns the "zap-status" */ /* zaps to subservice, returns the "zap-status" */
unsigned int zapTo_subServiceID(const t_channel_id channel_id); unsigned int zapTo_subServiceID(const t_channel_id channel_id);

View File

@@ -64,6 +64,8 @@ typedef uint64_t t_channel_id;
#define CREATE_CHANNEL_ID64 (((uint64_t)(satellitePosition+freq*4) << 48) | ((uint64_t) transport_stream_id << 32) | ((uint64_t)original_network_id << 16) | (uint64_t)service_id) #define CREATE_CHANNEL_ID64 (((uint64_t)(satellitePosition+freq*4) << 48) | ((uint64_t) transport_stream_id << 32) | ((uint64_t)original_network_id << 16) | (uint64_t)service_id)
//#define CREATE_CHANNEL_ID64 CREATE_CHANNEL_ID_FROM_64(satellitePosition, service_id, original_network_id, transport_stream_id) //#define CREATE_CHANNEL_ID64 CREATE_CHANNEL_ID_FROM_64(satellitePosition, service_id, original_network_id, transport_stream_id)
#define SAME_TRANSPONDER(id1, id2) ((id1 >> 16) == (id2 >> 16))
/* diseqc types */ /* diseqc types */
typedef enum { typedef enum {
NO_DISEQC, NO_DISEQC,

View File

@@ -146,6 +146,24 @@ unsigned int CZapitClient::zapTo_serviceID(const t_channel_id channel_id)
CZapitMessages::commandZaptoServiceID msg; CZapitMessages::commandZaptoServiceID msg;
msg.channel_id = channel_id; msg.channel_id = channel_id;
msg.record = false;
send(CZapitMessages::CMD_ZAPTO_SERVICEID, (const char *) & msg, sizeof(msg));
CZapitMessages::responseZapComplete response;
CBasicClient::receive_data((char* )&response, sizeof(response));
close_connection();
return response.zapStatus;
}
unsigned int CZapitClient::zapTo_record(const t_channel_id channel_id)
{
CZapitMessages::commandZaptoServiceID msg;
msg.channel_id = channel_id;
msg.record = true;
send(CZapitMessages::CMD_ZAPTO_SERVICEID, (const char *) & msg, sizeof(msg)); send(CZapitMessages::CMD_ZAPTO_SERVICEID, (const char *) & msg, sizeof(msg));