From 29fbc94bb9ddbac4349b61a153f01c8a2557dae2 Mon Sep 17 00:00:00 2001 From: "[CST] Focus" Date: Fri, 8 Mar 2013 13:33:24 +0400 Subject: [PATCH] zapit/src/zapit.cpp: handle PiP start/stop channels --- src/zapit/src/zapit.cpp | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/src/zapit/src/zapit.cpp b/src/zapit/src/zapit.cpp index 027d6218b..fa6f11e38 100644 --- a/src/zapit/src/zapit.cpp +++ b/src/zapit/src/zapit.cpp @@ -948,11 +948,15 @@ bool CZapit::ParseCommand(CBasicMessage::Header &rmsg, int connfd) CZapitMessages::commandZaptoServiceID msgZaptoServiceID; CZapitMessages::responseZapComplete msgResponseZapComplete; CBasicServer::receive_data(connfd, &msgZaptoServiceID, sizeof(msgZaptoServiceID)); - if(msgZaptoServiceID.record) { + if(msgZaptoServiceID.record) msgResponseZapComplete.zapStatus = ZapForRecord(msgZaptoServiceID.channel_id); - } else { +#ifdef ENABLE_PIP + else if(msgZaptoServiceID.pip) + msgResponseZapComplete.zapStatus = StartPip(msgZaptoServiceID.channel_id); +#endif + else msgResponseZapComplete.zapStatus = ZapTo(msgZaptoServiceID.channel_id, (rmsg.cmd == CZapitMessages::CMD_ZAPTO_SUBSERVICEID)); - } + CBasicServer::send_data(connfd, &msgResponseZapComplete, sizeof(msgResponseZapComplete)); break; } @@ -1497,6 +1501,13 @@ bool CZapit::ParseCommand(CBasicMessage::Header &rmsg, int connfd) SendCmdReady(connfd); break; +#ifdef ENABLE_PIP + case CZapitMessages::CMD_STOP_PIP: + StopPip(); + SendCmdReady(connfd); + break; +#endif + case CZapitMessages::CMD_SB_LOCK_PLAYBACK: /* hack. if standby true, dont blank video */ standby = true;