mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-28 07:51:19 +02:00
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:
@@ -187,6 +187,7 @@ class CZapitMessages
|
||||
struct commandZaptoServiceID
|
||||
{
|
||||
t_channel_id channel_id;
|
||||
bool record;
|
||||
};
|
||||
|
||||
struct commandSetAudioChannel
|
||||
|
@@ -271,6 +271,7 @@ class CZapitClient:public CBasicClient
|
||||
|
||||
/* zaps to channel, returns the "zap-status" */
|
||||
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" */
|
||||
unsigned int zapTo_subServiceID(const t_channel_id channel_id);
|
||||
|
@@ -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 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 */
|
||||
typedef enum {
|
||||
NO_DISEQC,
|
||||
|
@@ -146,6 +146,24 @@ unsigned int CZapitClient::zapTo_serviceID(const t_channel_id channel_id)
|
||||
CZapitMessages::commandZaptoServiceID msg;
|
||||
|
||||
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));
|
||||
|
||||
|
Reference in New Issue
Block a user