mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-28 16:01:20 +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
|
struct commandZaptoServiceID
|
||||||
{
|
{
|
||||||
t_channel_id channel_id;
|
t_channel_id channel_id;
|
||||||
|
bool record;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct commandSetAudioChannel
|
struct commandSetAudioChannel
|
||||||
|
@@ -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);
|
||||||
|
@@ -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,
|
||||||
|
@@ -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));
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user