xushiting 3 năm trước cách đây
mục cha
commit
c95902b054

+ 121 - 0
src/main/java/com/fdkk/fdkkmeta/task/UpdateFrameMetaTask.java

@@ -38,4 +38,125 @@ public class UpdateFrameMetaTask {
        );
 
    }
+
+   private void createMetaDataForRotate(){
+
+   }
+
+    private void createMetaDataForMove(){
+
+    }
+
+    private void createMetaDataForJoystick(){
+
+    }
+   /*
+   * {
+        "traceIds": ["d0864cd0-378d-4d49-b7b0-3e8e1b9494c3", "d0864cd0-378d-4d49-b7b0-3e8e1b9494c3", "939087ff-4999-4551-92e4-26ecb67f8aa2"],
+        "vehicle": null,
+        "newUserStates": [{
+            "userId": "dcff36ae4fc1d",
+            "playerState": {
+                "roomTypeId": "",
+                "person": 0,
+                "avatarId": "",
+                "skinId": "",
+                "roomId": "",
+                "isHost": false,
+                "isFollowHost": false,
+                "skinDataVersion": "",
+                "avatarComponents": "",
+                "nickName": "",
+                "movingMode": 0,
+                "attitude": "",
+                "areaName": "",
+                "pathName": "",
+                "pathId": "",
+                "avatarSize": 1,
+                "extra": "",
+                "prioritySync": false,
+                "player": {
+                    "position": {
+                        "x": -421.30057,
+                        "y": -1434.4198,
+                        "z": -34
+                    },
+                    "angle": {
+                        "pitch": 0,
+                        "yaw": 47,
+                        "roll": 0
+                    }
+                },
+                "camera": {
+                    "position": {
+                        "x": -436.2,
+                        "y": -1408.8,
+                        "z": 130.7
+                    },
+                    "angle": {
+                        "pitch": 0,
+                        "yaw": 315,
+                        "roll": 0
+                    }
+                },
+                "cameraCenter": {
+                    "x": -400,
+                    "y": -1450,
+                    "z": 10.610336
+                }
+            },
+            "renderInfo": {
+                "renderType": 0,
+                "videoFrame": null,
+                "cameraStateType": 3,
+                "isMoving": 1,
+                "needIfr": 0,
+                "isVideo": 0,
+                "stillFrame": 0,
+                "isRotating": 0,
+                "isFollowing": 0,
+                "clientPanoTitlesBitmap": [],
+                "clientPanoTreceId": "",
+                "prefetchVideoId": "",
+                "noMedia": false
+            },
+            "event": null,
+            "relation": 1
+        }],
+        "actionResponses": [{
+            "actionType": 15,
+            "pointType": 100,
+            "extra": "",
+            "traceId": "d0864cd0-378d-4d49-b7b0-3e8e1b9494c3",
+            "packetId": "d44bd2f5-f877-4dd7-868b-803c64f99082",
+            "nps": [],
+            "peopleNum": 0,
+            "zoneId": "",
+            "echoMsg": "",
+            "reserveDetail": null,
+            "userWithAvatarList": [],
+            "newUserStates": [],
+            "code": 0,
+            "msg": ""
+        }, {
+            "actionType": 1,
+            "pointType": 0,
+            "extra": "",
+            "traceId": "939087ff-4999-4551-92e4-26ecb67f8aa2",
+            "packetId": "",
+            "nps": [],
+            "peopleNum": 0,
+            "zoneId": "",
+            "echoMsg": "",
+            "reserveDetail": null,
+            "userWithAvatarList": [],
+            "newUserStates": [],
+            "code": 0,
+            "msg": ""
+        }],
+        "getStateType": 0,
+        "code": 0,
+        "msg": "OK"
+    }
+   * */
 }

+ 119 - 47
src/main/proto/scene.proto

@@ -10,8 +10,10 @@ service SceneGrpcService {
   rpc getRoute (RouteRequest) returns (RouteReply){}
   rpc init (InitRequest) returns (NormalReply){}
   rpc rotate (RotateRequest) returns (NormalReply){}
-  rpc moveStart (StartMoveRequest) returns (MoveReply){}
-  rpc moveProcess (MoveNextNeighborRequest) returns (MoveReply){}
+//  rpc moveStart (StartMoveRequest) returns (MoveReply){}
+//  rpc moveProcess (MoveNextNeighborRequest) returns (MoveReply){}
+  rpc echo (EchoRequest) returns (EchoReply){}
+  rpc usersState (GetNewUserStateRequest) returns (GetNewUserStateReply){}
   rpc getBreakPoint (BreakPointRequest) returns (BreakPointReply){}
   rpc joystick (JoystickRequest) returns (NormalReply){} //操作杆
 }
@@ -57,6 +59,14 @@ message SceneReply {
   string res=1;
 }
 
+/**********************************************************/
+// 正常出参对象
+message NormalReply {
+  string code=1;                                       //0/1   0表示没收到,1表示收到
+}
+
+/**********************************************************/
+
 /***********************************************************/
 message Space {
    Point position=1;
@@ -129,8 +139,65 @@ message InitRequest {
   string room_id=5;
   string app_id=6;
 }
-
 /**********************************************************/
+message echoMsg{
+  string echoMsg=1;
+}
+
+message EchoRequest{
+  int32 action_type=1;   //1009
+  echoMsg echo_msg=2;
+  string trace_id=3;
+  string user_id=4;
+}
+
+message EchoReply{
+  int32 actionType=1;    //1009
+  int32 pointType=2;
+  string extra=3;
+  string traceId=4;
+  string packetId=5;
+  repeated Point nps=6;
+  int32 peopleNum=7;
+  string zoneId=8;
+  string echoMsg=9;
+  string reserveDetail=10;
+  repeated string userWithAvatarList=11;
+  repeated UserState newUserStates=12;
+  int32 code=13;
+  string msg=14;
+}
+
+/*********************************************/
+
+message getNewUserStateAction{
+  int32 userType=1;
+}
+
+message GetNewUserStateRequest{
+  int32 action_type=1;                                           //1024
+  getNewUserStateAction getNewUserStateAction=2;
+  string trace_id=3;
+  string user_id=4;
+}
+
+message GetNewUserStateReply{
+  int32 actionType=1;                                            //1024
+  int32 pointType=2;
+  string extra=3;
+  string traceId=4;
+  string packetId=5;
+  repeated Point nps=6;
+  int32 peopleNum=7;
+  string zoneId=8;
+  string echoMsg=9;
+  string reserveDetail=10;
+  repeated string userWithAvatarList=11;
+  repeated UserState newUserStates=12;
+  int32 code=13;
+  string msg=14;
+}
+/*********************************************/
 //全局对象,旋转的参数
 message RotationAction{
   int32 vertical_move=1;
@@ -139,24 +206,23 @@ message RotationAction{
 
 // rotate入参对象
 message RotateRequest {
-  int32 action_type=1;
+  int32 action_type=1;                                                     //1014
   RotationAction rotation_action=2;
   string trace_id=3;
   string user_id=4;
 }
-
 /**********************************************************/
 //正常的反馈
-message NormalReply {
-   repeated string traceIds=1;
-   string vehicle=2;
-   repeated UserState newUserStates=3;
-   repeated int32 actionResponses=4;
-   int32 getStateType=5;
-   int32 code=6;
-   string msg=7;
-   string frameSrc=8;              //视频路径
-}
+//message NormalReply {
+//   repeated string traceIds=1;
+//   string vehicle=2;
+//   repeated UserState newUserStates=3;
+//   repeated int32 actionResponses=4;
+//   int32 getStateType=5;
+//   int32 code=6;
+//   string msg=7;
+//   string frameSrc=8;              //视频路径
+//}
 
 /**********************************************************/
 //
@@ -166,40 +232,46 @@ message ClickingAction {
    string extra=3;
    string attitude=4;
 }
-
-// 开始请求漫游
-message StartMoveRequest {
-  int32 action_type=1;
-  ClickingAction clicking_action=2;
-  State clicking_state=3;
-  string trace_id=4;
-  string user_id=5;
-}
-
-// 请求移动下一段
-message MoveNextNeighborRequest {
-  string user_id=1;
-  string trace_id=2;
-  bool next=3;      //true表示继续拿下一个,false表示结束(一般是有新的请求)
+message MoveRequest {
+    int32 action_type=1;                                                //1
+    ClickingAction clicking_action=2;
+    State clicking_state=3;
+    string trace_id=4;
+    string user_id=5;
 }
+//// 开始请求漫游
+//message StartMoveRequest {
+//  int32 action_type=1;
+//  ClickingAction clicking_action=2;
+//  State clicking_state=3;
+//  string trace_id=4;
+//  string user_id=5;
+//}
+//
+//// 请求移动下一段
+//message MoveNextNeighborRequest {
+//  string user_id=1;
+//  string trace_id=2;
+//  bool next=3;      //true表示继续拿下一个,false表示结束(一般是有新的请求)
+//}
 
 // move出参对象
 // 这需要自定义
-message MoveReply {
-   repeated string traceIds=1;
-   string vehicle=2;
-   repeated UserState newUserStates=3;      //自己的话,不要有player,camera和cameraCenter。自己对应的这三个属性在8,9,10上,到webrtc服务器上组装
-   repeated int32 actionResponses=4;
-   int32 getStateType=5;
-   int32 code=6;
-   string msg=7;
-   //每一段的人物和相机坐标,第一段可能还有初始旋转
-   repeated Space player=8;
-   repeated Space camera=9;
-   repeated Point cameraCenter=10;
-   repeated string frameSrc=11;
-   bool isEnd=12;     //false表示可以继续移动,true表示这次移动已经结束
-}
+//message MoveReply {
+//   repeated string traceIds=1;
+//   string vehicle=2;
+//   repeated UserState newUserStates=3;      //自己的话,不要有player,camera和cameraCenter。自己对应的这三个属性在8,9,10上,到webrtc服务器上组装
+//   repeated int32 actionResponses=4;
+//   int32 getStateType=5;
+//   int32 code=6;
+//   string msg=7;
+//   //每一段的人物和相机坐标,第一段可能还有初始旋转
+//   repeated Space player=8;
+//   repeated Space camera=9;
+//   repeated Point cameraCenter=10;
+//   repeated string frameSrc=11;
+//   bool isEnd=12;     //false表示可以继续移动,true表示这次移动已经结束
+//}
 /**********************************************************/
 
 /**********************************************************/
@@ -228,14 +300,14 @@ message NeighborPointsAction{
 
 // move入参对象
 message BreakPointRequest{
-  int32 action_type=1;
+  int32 action_type=1;                                              //1004
   NeighborPointsAction get_neighbor_points_action=2;
   string trace_id=3;
   string user_id=4;
 }
 // move出参对象
 message BreakPointReply {
-  int32 actionType=1;
+  int32 actionType=1;                                               //1004
   int32 pointType=2;
   string extra=3;
   string traceId=4;