From de04c9a23e213dac22d13d7a2ee556d49fd41e0a Mon Sep 17 00:00:00 2001 From: donghongyu Date: Thu, 13 Apr 2023 13:05:02 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=8Cdev=5Fsop=5F2.14.4=E3=80=8D=201?= =?UTF-8?q?=E3=80=81=E4=BF=AE=E5=A4=8D=E7=9B=B4=E6=92=AD=E7=8A=B6=E6=80=81?= =?UTF-8?q?=E5=9B=9E=E8=B0=83=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ui/BusPassengerBaseFragment.java | 2 +- .../module/wigets/OCHBorderShadowLayout.java | 2 +- build.gradle | 2 + .../function/hmi/ui/camera/CameraListView.kt | 27 ++---- .../hmi/ui/widget/DriverMonitorView.kt | 82 ++++++++----------- .../main/res/anim/progressbar_drawable.xml | 8 ++ .../main/res/layout/view_driver_monitor.xml | 11 ++- gradle.properties | 18 ++-- 8 files changed, 70 insertions(+), 82 deletions(-) create mode 100644 core/function-impl/mogo-core-function-hmi/src/main/res/anim/progressbar_drawable.xml diff --git a/OCH/mogo-och-bus-passenger/src/main/java/com/mogo/och/bus/passenger/ui/BusPassengerBaseFragment.java b/OCH/mogo-och-bus-passenger/src/main/java/com/mogo/och/bus/passenger/ui/BusPassengerBaseFragment.java index a14085ab59..0f991d1346 100644 --- a/OCH/mogo-och-bus-passenger/src/main/java/com/mogo/och/bus/passenger/ui/BusPassengerBaseFragment.java +++ b/OCH/mogo-och-bus-passenger/src/main/java/com/mogo/och/bus/passenger/ui/BusPassengerBaseFragment.java @@ -41,7 +41,7 @@ public abstract class BusPassengerBaseFragment {// 正在直播 - } - 1 -> {// 直播已停止 - } - 2 -> {// 直播强制结束 - } - } - } - private val trafficCarLiveCallBack = object : ITrafficCarLiveCallBack { override fun onLive(liveSn: String?) { CallerLogger.d("$M_HMI$TAG", "onLive") @@ -291,6 +275,14 @@ class CameraListView : FrameLayout { } } } + + override fun onPlaying() { + + } + + override fun onPlaRequesting() { + + } } fun updateCameraData(cameraInfoList: List?) { @@ -337,7 +329,6 @@ class CameraListView : FrameLayout { if (valueAnimator.isStarted || valueAnimator.isRunning) { valueAnimator.cancel() } - liveStreamManager.setLiveStatusChangeCallback(null) } private fun stopLive() { diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/DriverMonitorView.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/DriverMonitorView.kt index 58afe8435b..4864257121 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/DriverMonitorView.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/DriverMonitorView.kt @@ -15,7 +15,6 @@ import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger import com.mogo.eagle.core.utilcode.mogo.logger.Logger import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant import com.mogo.eagle.core.widget.RoundConstraintLayout -import kotlinx.android.synthetic.main.view_camera_list.view.* import kotlinx.android.synthetic.main.view_driver_monitor.view.* /** @@ -79,12 +78,7 @@ class DriverMonitorView : textureViewDriverMonitor.isOpaque = false - liveStreamManager.setLiveStatusChangeCallback { - textureView - .post { - handleSnLiveStatus(it) - } - } + liveStreamManager.setLivePushStatusChangeCallback { } // TODO SOP演示需求,只有乘客屏幕才会触发这个逻辑 begin // 测试数据 @@ -116,26 +110,26 @@ class DriverMonitorView : fun showLive() { if (!isLived) { - sopShowDriverMap[CallerTelematicManager.getServerToken()]?.let { - Logger.d( - "${SceneConstant.M_HMI}$TAG", - "检查司机直播……isLived=$isLived 当前车上的司机端SN=${sopShowDriverMap[CallerTelematicManager.getServerToken()]}" - ) - CallerLogger.d( - "${SceneConstant.M_HMI}$TAG", - "检查司机直播……isLived=$isLived 当前车上的司机端SN=${sopShowDriverMap[CallerTelematicManager.getServerToken()]}" - ) - MoGoAiCloudTrafficLive.viewDesignativeVehicleLive( - it, - textureViewDriverMonitor, - carLiveCallBack - ) - } -// MoGoAiCloudTrafficLive.viewDesignativeVehicleLive( -// "F803EB2046PZD00190", -// textureViewDriverMonitor, -// carLiveCallBack -// ) +// sopShowDriverMap[CallerTelematicManager.getServerToken()]?.let { +// Logger.d( +// "${SceneConstant.M_HMI}$TAG", +// "检查司机直播……isLived=$isLived 当前车上的司机端SN=${sopShowDriverMap[CallerTelematicManager.getServerToken()]}" +// ) +// CallerLogger.d( +// "${SceneConstant.M_HMI}$TAG", +// "检查司机直播……isLived=$isLived 当前车上的司机端SN=${sopShowDriverMap[CallerTelematicManager.getServerToken()]}" +// ) +// MoGoAiCloudTrafficLive.viewDesignativeVehicleLive( +// it, +// textureViewDriverMonitor, +// carLiveCallBack +// ) +// } + MoGoAiCloudTrafficLive.viewDesignativeVehicleLive( + "F803EB2046PZD00164", + textureViewDriverMonitor, + carLiveCallBack + ) } } @@ -151,32 +145,10 @@ class DriverMonitorView : } } - private fun handleSnLiveStatus(status: Int) { - when (status) { - 0 -> {// 正在直播 - isLived = true - } - - 1 -> {// 直播已停止 - isLived = false - } - - 2 -> {// 直播强制结束 - isLived = false - } - } - refreshView(isLived) - - Logger.d("${SceneConstant.M_HMI}$TAG", "isLived:$isLived") - CallerLogger.d("${SceneConstant.M_HMI}$TAG", "isLived:$isLived") - } - private val carLiveCallBack = object : ITrafficCarLiveCallBack { override fun onLive(liveSn: String?) { Logger.d("${SceneConstant.M_HMI}$TAG", "onLive:$liveSn") CallerLogger.d("${SceneConstant.M_HMI}$TAG", "onLive:$liveSn") - isLived = true - refreshView(isLived) } override fun onFirstFrame() { @@ -199,6 +171,18 @@ class DriverMonitorView : isLived = false refreshView(isLived) } + + override fun onPlaying() { + Logger.e("${SceneConstant.M_HMI}$TAG", "onPlaying……") + isLived = true + refreshView(isLived) + } + + override fun onPlaRequesting() { + Logger.e("${SceneConstant.M_HMI}$TAG", "onPlaRequesting……") + isLived = false + refreshView(isLived) + } } } \ No newline at end of file diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/anim/progressbar_drawable.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/anim/progressbar_drawable.xml new file mode 100644 index 0000000000..3cc7a72640 --- /dev/null +++ b/core/function-impl/mogo-core-function-hmi/src/main/res/anim/progressbar_drawable.xml @@ -0,0 +1,8 @@ + + + \ No newline at end of file diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_driver_monitor.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_driver_monitor.xml index 11cbf18902..43ec64589e 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_driver_monitor.xml +++ b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_driver_monitor.xml @@ -3,7 +3,6 @@ xmlns:app="http://schemas.android.com/apk/res-auto" android:id="@+id/rclContainer" android:layout_width="match_parent" - android:background="#FFF" android:layout_height="match_parent" app:roundLayoutRadius="24dp"> @@ -11,7 +10,6 @@ android:id="@+id/ivNormal" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:src="@drawable/bus_picture_nor" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" @@ -22,6 +20,7 @@ android:id="@+id/textureViewDriverMonitor" android:layout_width="match_parent" android:layout_height="match_parent" + android:visibility="gone" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" @@ -31,7 +30,11 @@ android:id="@+id/liveProgressBar" android:layout_width="90dp" android:layout_height="90dp" - android:indeterminateDrawable="@drawable/icon_loading_live" + android:indeterminate="true" + android:indeterminateBehavior="repeat" + android:indeterminateDuration="2000" + android:indeterminateDrawable="@anim/progressbar_drawable" + android:indeterminateOnly="true" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" @@ -41,7 +44,7 @@ android:id="@+id/tvLoadingHit" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginTop="44dp" + android:layout_marginTop="24dp" android:text="加载中……" android:textColor="#2D3E5F" android:textSize="28dp" diff --git a/gradle.properties b/gradle.properties index 92ee5e1d77..6cc0763e94 100644 --- a/gradle.properties +++ b/gradle.properties @@ -66,23 +66,23 @@ bytex.ASM_API=ASM7 LOGLIB_VERSION=1.5.25 ######## MogoAiCloudSDK Version ######## # 网络请求LOGLIB_VERSION -MOGO_NETWORK_VERSION=1.4.6.4 +MOGO_NETWORK_VERSION=1.4.6.7 # 鉴权 -MOGO_PASSPORT_VERSION=1.4.6.4 +MOGO_PASSPORT_VERSION=1.4.6.7 # 常链接 -MOGO_SOCKET_VERSION=1.4.6.4 +MOGO_SOCKET_VERSION=1.4.6.7 # 数据采集 -MOGO_REALTIME_VERSION=1.4.6.4 +MOGO_REALTIME_VERSION=1.4.6.7 # 探路,道路事件发布,获取 -MOGO_TANLU_VERSION=1.4.6.4 +MOGO_TANLU_VERSION=1.4.6.7 # 直播推流 -MOGO_LIVE_VERSION=1.4.6.4 +MOGO_LIVE_VERSION=1.4.6.7 # 直播拉流 -MOGO_TRAFFICLIVE_VERSION=1.4.6.4 +MOGO_TRAFFICLIVE_VERSION=1.4.6.7 # 定位服务 -MOGO_LOCATION_VERSION=1.4.6.4 +MOGO_LOCATION_VERSION=1.4.6.7 # 远程通讯模块 -MOGO_TELEMATIC_VERSION=1.4.6.4 +MOGO_TELEMATIC_VERSION=1.4.6.7 ######## MogoAiCloudSDK Version ######## # 自研地图 MAP_SDK_VERSION=2.12.0.11