diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml
index 6560a98..bac8f7b 100644
--- a/.idea/inspectionProfiles/Project_Default.xml
+++ b/.idea/inspectionProfiles/Project_Default.xml
@@ -30,7 +30,7 @@
-
+
\ No newline at end of file
diff --git a/app/src/main/java/com/mogo/cloud/MainActivity.java b/app/src/main/java/com/mogo/cloud/MainActivity.java
index dc3485e..14c6b63 100644
--- a/app/src/main/java/com/mogo/cloud/MainActivity.java
+++ b/app/src/main/java/com/mogo/cloud/MainActivity.java
@@ -10,9 +10,14 @@ import android.widget.TextView;
import com.mogo.cloud.network.NetworkActivity;
import com.mogo.cloud.passport.IMoGoTokenCallback;
import com.mogo.cloud.passport.MoGoAiCloudClient;
+import com.mogo.cloud.trafficlive.api.ITrafficIntersectionLiveCallBack;
+import com.mogo.cloud.trafficlive.api.MoGoAiCloudTrafficLive;
+import com.mogo.cloud.utils.logger.Logger;
public class MainActivity extends AppCompatActivity {
+ private static final String TAG = "MainActivity";
+
private Button btnJumpPassPort;
private Button btnJumpConfigInfo;
private Button btnJumpNetWorkPort;
@@ -21,6 +26,7 @@ public class MainActivity extends AppCompatActivity {
private Button btnJumpLivePlayAndPush;
private Button btnJumpLivePush;
private Button btnJumpLivePlay;
+ private Button btnRequestXINGLive;
private TextView tvSn;
private TextView tvToken;
@@ -84,6 +90,21 @@ public class MainActivity extends AppCompatActivity {
startActivity(intent);
});
+ btnRequestXINGLive = findViewById(R.id.btnRequestXINGLive);
+ btnRequestXINGLive.setOnClickListener(v -> {
+ MoGoAiCloudTrafficLive.viewFrontIntersectionLive(40.11547, 116.22544, 60, new ITrafficIntersectionLiveCallBack() {
+ @Override
+ public void liveUrlResult(String liveUrl) {
+ Logger.d(TAG, "liveUrl : " + liveUrl);
+ }
+
+ @Override
+ public void onError(String errorMsg) {
+ Logger.e(TAG, "errorMsg : " + errorMsg);
+ }
+ });
+ });
+
MoGoAiCloudClient.getInstance().addTokenCallbacks(new IMoGoTokenCallback() {
@Override
public void onTokenGot(String token, String sn) {
diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml
index a867d29..f8ddde4 100644
--- a/app/src/main/res/layout/activity_main.xml
+++ b/app/src/main/res/layout/activity_main.xml
@@ -91,6 +91,13 @@
android:layout_height="match_parent"
android:text="直播SDK观看测试"
android:visibility="visible" />
+
+
\ No newline at end of file
diff --git a/foudations/mogo-live/src/main/java/com/mogo/cloud/live/manager/RequestLiveManager.java b/foudations/mogo-live/src/main/java/com/mogo/cloud/live/manager/RequestLiveManager.java
index 75a126c..45012de 100644
--- a/foudations/mogo-live/src/main/java/com/mogo/cloud/live/manager/RequestLiveManager.java
+++ b/foudations/mogo-live/src/main/java/com/mogo/cloud/live/manager/RequestLiveManager.java
@@ -4,6 +4,7 @@ import com.google.gson.Gson;
import com.mogo.cloud.live.constant.LiveConstant;
import com.mogo.cloud.live.listener.IRequestLiveListener;
import com.mogo.cloud.live.model.BaseData;
+import com.mogo.cloud.live.model.LiveCameraPush;
import com.mogo.cloud.live.model.LivePush;
import com.mogo.cloud.live.model.LiveReceive;
import com.mogo.cloud.live.network.LiveApiServer;
@@ -196,10 +197,18 @@ public class RequestLiveManager {
});
}
+ /**
+ * 请求服务器查看特定设备路口直播
+ *
+ * @param cameraId 设备id
+ * @param lat 纬度
+ * @param lon 经度
+ * @param requestLiveListener {@link IRequestLiveListener}
+ */
public void requestDesignativeIntersectionLive(int cameraId, double lat, double lon, IRequestLiveListener requestLiveListener) {
Gson gson = new Gson();
String sn = MoGoAiCloudClient.getInstance().getAiCloudClientConfig().getSn();
- LivePush livePush = new LivePush(cameraId, lat, lon);
+ LiveCameraPush livePush = new LiveCameraPush(cameraId, lat, lon);
Map map = new HashMap<>();
map.put("sn", sn);
map.put("data", gson.toJson(livePush));
diff --git a/foudations/mogo-live/src/main/java/com/mogo/cloud/live/model/LiveCameraPush.java b/foudations/mogo-live/src/main/java/com/mogo/cloud/live/model/LiveCameraPush.java
new file mode 100644
index 0000000..df15e2b
--- /dev/null
+++ b/foudations/mogo-live/src/main/java/com/mogo/cloud/live/model/LiveCameraPush.java
@@ -0,0 +1,47 @@
+package com.mogo.cloud.live.model;
+
+public class LiveCameraPush {
+
+ private int id; //摄像头id
+ private double lat; //纬度
+ private double lon; //经度
+
+ public LiveCameraPush(int id, double lat, double lon) {
+ this.id = id;
+ this.lat = lat;
+ this.lon = lon;
+ }
+
+ public int getId() {
+ return id;
+ }
+
+ public void setId(int id) {
+ this.id = id;
+ }
+
+ public double getLat() {
+ return lat;
+ }
+
+ public void setLat(double lat) {
+ this.lat = lat;
+ }
+
+ public double getLon() {
+ return lon;
+ }
+
+ public void setLon(double lon) {
+ this.lon = lon;
+ }
+
+ @Override
+ public String toString() {
+ return "LiveCameraPush{" +
+ "id=" + id +
+ ", lat=" + lat +
+ ", lon=" + lon +
+ '}';
+ }
+}
diff --git a/foudations/mogo-live/src/main/java/com/mogo/cloud/live/model/LivePush.java b/foudations/mogo-live/src/main/java/com/mogo/cloud/live/model/LivePush.java
index 0765cd7..9f7d5e6 100644
--- a/foudations/mogo-live/src/main/java/com/mogo/cloud/live/model/LivePush.java
+++ b/foudations/mogo-live/src/main/java/com/mogo/cloud/live/model/LivePush.java
@@ -5,7 +5,6 @@ package com.mogo.cloud.live.model;
*/
public class LivePush {
- private int id; //路口摄像头id
private String sn; //直播车机sn
private String type; //直播类型 0:开启直播 1:关闭直播
private String videoChannel; //C_1 前摄
@@ -13,12 +12,6 @@ public class LivePush {
private double lon; //本机经度
private int bearing; //本机方向角
- public LivePush(int id, double lat, double lon) {
- this.id = id;
- this.lat = lat;
- this.lon = lon;
- }
-
public LivePush(String sn, String type, String videoChannel) {
this.sn = sn;
this.type = type;
@@ -40,14 +33,6 @@ public class LivePush {
this.bearing = bearing;
}
- public int getId() {
- return id;
- }
-
- public void setId(int id) {
- this.id = id;
- }
-
public String getSn() {
return sn;
}
@@ -99,8 +84,7 @@ public class LivePush {
@Override
public String toString() {
return "LivePush{" +
- "id=" + id +
- ", sn='" + sn + '\'' +
+ "sn='" + sn + '\'' +
", type='" + type + '\'' +
", videoChannel='" + videoChannel + '\'' +
", lat=" + lat +
diff --git a/gradle.properties b/gradle.properties
index 96df4a8..ba000e1 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -27,7 +27,7 @@ SNAPSHOT_REPOSITORY_URL=http://nexus.zhidaoauto.com/repository/maven-snapshots/
USERNAME=xintai
PASSWORD=xintai2018
# 编译模式: false - 依赖本地版本, true - 依赖 maven 版本
-RELEASE=true
+RELEASE=false
# AI CLOUD 云平台
# 工具类
MOGO_UTILS_VERSION=1.0.61