mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-09-10 15:18:28 +02:00
zapit/lib/zapitclient.cpp: add start/stop commands got PiP
Origin commit data
------------------
Commit: f4b6177076
Author: [CST] Focus <focus.cst@gmail.com>
Date: 2013-03-08 (Fri, 08 Mar 2013)
This commit is contained in:
@@ -148,7 +148,8 @@ class CZapitMessages
|
|||||||
CMD_GET_ASPECTRATIO = 107,
|
CMD_GET_ASPECTRATIO = 107,
|
||||||
CMD_SET_ASPECTRATIO = 108,
|
CMD_SET_ASPECTRATIO = 108,
|
||||||
CMD_GET_MODE43 = 109,
|
CMD_GET_MODE43 = 109,
|
||||||
CMD_SET_MODE43 = 110
|
CMD_SET_MODE43 = 110,
|
||||||
|
CMD_STOP_PIP = 111
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -188,6 +189,7 @@ class CZapitMessages
|
|||||||
{
|
{
|
||||||
t_channel_id channel_id;
|
t_channel_id channel_id;
|
||||||
bool record;
|
bool record;
|
||||||
|
bool pip;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct commandSetAudioChannel
|
struct commandSetAudioChannel
|
||||||
|
@@ -273,6 +273,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);
|
unsigned int zapTo_record(const t_channel_id channel_id);
|
||||||
|
unsigned int zapTo_pip(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);
|
||||||
@@ -486,6 +487,7 @@ class CZapitClient:public CBasicClient
|
|||||||
void setStandby(const bool enable);
|
void setStandby(const bool enable);
|
||||||
void startPlayBack();
|
void startPlayBack();
|
||||||
void stopPlayBack();
|
void stopPlayBack();
|
||||||
|
void stopPip();
|
||||||
void lockPlayBack();
|
void lockPlayBack();
|
||||||
void unlockPlayBack();
|
void unlockPlayBack();
|
||||||
bool tune_TP(TP_params TP);
|
bool tune_TP(TP_params TP);
|
||||||
|
@@ -151,6 +151,7 @@ unsigned int CZapitClient::zapTo_serviceID(const t_channel_id channel_id)
|
|||||||
|
|
||||||
msg.channel_id = channel_id;
|
msg.channel_id = channel_id;
|
||||||
msg.record = false;
|
msg.record = false;
|
||||||
|
msg.pip = false;
|
||||||
|
|
||||||
send(CZapitMessages::CMD_ZAPTO_SERVICEID, (const char *) & msg, sizeof(msg));
|
send(CZapitMessages::CMD_ZAPTO_SERVICEID, (const char *) & msg, sizeof(msg));
|
||||||
|
|
||||||
@@ -168,6 +169,25 @@ unsigned int CZapitClient::zapTo_record(const t_channel_id channel_id)
|
|||||||
|
|
||||||
msg.channel_id = channel_id;
|
msg.channel_id = channel_id;
|
||||||
msg.record = true;
|
msg.record = true;
|
||||||
|
msg.pip = 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_pip(const t_channel_id channel_id)
|
||||||
|
{
|
||||||
|
CZapitMessages::commandZaptoServiceID msg;
|
||||||
|
|
||||||
|
msg.channel_id = channel_id;
|
||||||
|
msg.record = false;
|
||||||
|
msg.pip = true;
|
||||||
|
|
||||||
send(CZapitMessages::CMD_ZAPTO_SERVICEID, (const char *) & msg, sizeof(msg));
|
send(CZapitMessages::CMD_ZAPTO_SERVICEID, (const char *) & msg, sizeof(msg));
|
||||||
|
|
||||||
@@ -968,6 +988,14 @@ void CZapitClient::stopPlayBack()
|
|||||||
close_connection();
|
close_connection();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CZapitClient::stopPip()
|
||||||
|
{
|
||||||
|
send(CZapitMessages::CMD_STOP_PIP);
|
||||||
|
CZapitMessages::responseCmd response;
|
||||||
|
CBasicClient::receive_data((char* )&response, sizeof(response));
|
||||||
|
close_connection();
|
||||||
|
}
|
||||||
|
|
||||||
void CZapitClient::lockPlayBack()
|
void CZapitClient::lockPlayBack()
|
||||||
{
|
{
|
||||||
send(CZapitMessages::CMD_SB_LOCK_PLAYBACK);
|
send(CZapitMessages::CMD_SB_LOCK_PLAYBACK);
|
||||||
|
Reference in New Issue
Block a user