Skip to content

DoneMr/ShareScreenClient

Repository files navigation

Custom video protocol by Done


分享屏幕客户端,需要结合使用服务端程序,硬解H264码,暂不支持屏幕反向控制功能

request structure METHOD CSeq length Content CRLF

response structure STATUS CSeq length Content CRLF

METHOD Lists

  • SETUP //operate transport param such as client control port/TCP and video port/UDP
  • PLAY //start transfer video for phone window
  • TEARDOWN //stop transmission
  • HEART //heart package for keeping communicating
  • HOME //mock clicking home key
  • BACK //mock clicking back key
  • MENU //mock clicking menu key
  • VOLUME //mock clicking menu key
  • CLICK //mock clicking window
  • TOUCH //mock touching window

control port is Odd Number such as PORT%2 = 1

video port is Even Number such as PORT%2 = 0





sample:

/******************** C->S **********************/
//                                               /
//   METHOD                                      /
//     |                                         /
//     |  CSeq                                   /
//     |   |                                     /
//     |   |Length                               /
//     |   |  |                                  /
//     |   |  |           Content                /
//     |   |  |              |                   /
//     |   |  |              |     CRLF          /
//     |   |  |              |      |            /
//     |   |  |              |      |            /
//   SETUP 1 17 client-port=60001 \r\n           /
//                                               /
/************************************************/




/********************************* S->C *********************************/
/                                                                        /
/    STATUS                                                              /
/      | CSeq                                                            /
/      |  |Length                                                        /
/      |  |  |                  Content                                  /
/      |  |  |                     |              CRLF                   /
/      |  |  |                     |               |                     /
/      |  |  |                     |               |                     /
/      |  |  |                     |               |                     /
/      |  |  |                     |               |                     /
/      |  |  | ---------------------------------   |                     /
/     200 1 33 client-port=60001;server-port=999 \r\n                    /
/                                                                        /
/************************************************************************/




/****************** C->S *****************/
//                                        /
//   METHOD                               /
//     |                                  /
//     |  CSeq                            /
//     |   |                              /
//     |   |Length                        /
//     |   |  |                           /
//     |   |  |      Content              /
//     |   |  |        |                  /
//     |   |  |        |           CRLF   /
//     |   |  |        |            |     /
//     |   |  |        |            |     /
//  VOLUME 1 17 set=up;type=alarm \r\n    /
//                                        /
/*****************************************/

/********************* S->C ******************/
/                                             /
/    STATUS                                   /
/      | CSeq                                 /
/      |  |Length                             /
/      |  | |   Content                       /
/      |  | |     |    CRLF                   /
/      |  | |     |     |                     /
/      |  | |     |     |                     /
/      |  | |     |     |                     /
/      |  | |     |     |                     /
/      |  | | --------  |                     /
/     200 1 8 alarm=ok \r\n                   /
/                                             /
/*********************************************/




/********************** C->S **********************/
//                                                 /
//   METHOD                                        /
//     |                                           /
//     |  CSeq                                     /
//     |   |                                       /
//     |   |Length                                 /
//     |   | |                                     /
//     |   | |    Content                          /
//     |   | |      |                              /
//     |   | |      |                      CRLF    /
//     |   | |      |                       |      /
//     |   | |      |                       |      /
//   CLICK 1 8 src=1280,720;order=200,250 \r\n     /
//                                                 /
/**************************************************/

/********************* S->C ******************/
/                                             /
/    STATUS                                   /
/      | CSeq                                 /
/      |  |Length                             /
/      |  | |   Content                       /
/      |  | |     |    CRLF                   /
/      |  | |     |     |                     /
/      |  | |     |     |                     /
/      |  | |     |     |                     /
/      |  | |     |     |                     /
/      |  | | --------  |                     /
/     200 1 8 click=ok \r\n                   /
/                                             /
/*********************************************/


/************************** C->S **************************/
//                                                         /
//   METHOD                                                /
//     |                                                   /
//     |  CSeq                                             /
//     |   |                                               /
//     |   |Length                                         /
//     |   | |                                             /
//     |   | |            Content                          /
//     |   | |              |                              /
//     |   | |              |                      CRLF    /
//     |   | |              |                       |      /
//     |   | |              |                       |      /
//   TOUCH 1 8 src=1280,720;order=200,250,200,300 \r\n     /
//                                                         /
/**********************************************************/

/********************* S->C ******************/
/                                             /
/    STATUS                                   /
/      | CSeq                                 /
/      |  |Length                             /
/      |  | |   Content                       /
/      |  | |     |    CRLF                   /
/      |  | |     |     |                     /
/      |  | |     |     |                     /
/      |  | |     |     |                     /
/      |  | |     |     |                     /
/      |  | | --------  |                     /
/     200 1 8 touch=ok \r\n                   /
/                                             /
/*********************************************/


Releases

No releases published

Packages

No packages published

Languages