zapit/lib/zapitclient.cpp: add start/stop commands got PiP

This commit is contained in:
[CST] Focus
2013-03-08 13:22:27 +04:00
parent 9dcf32cdd2
commit f4b6177076
3 changed files with 33 additions and 1 deletions

View File

@@ -151,6 +151,7 @@ unsigned int CZapitClient::zapTo_serviceID(const t_channel_id channel_id)
msg.channel_id = channel_id;
msg.record = false;
msg.pip = false;
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.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));
@@ -968,6 +988,14 @@ void CZapitClient::stopPlayBack()
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()
{
send(CZapitMessages::CMD_SB_LOCK_PLAYBACK);