[2.13.0-arhc-opt] move monitoring to biz
This commit is contained in:
@@ -180,7 +180,6 @@ ext {
|
||||
mogo_core_function_hmi : "com.mogo.eagle.core.function.impl:hmi:${MOGO_CORE_FUNCTION_HMI_VERSION}",
|
||||
mogo_core_function_map : "com.mogo.eagle.core.function.impl:map:${MOGO_CORE_FUNCTION_MAP_VERSION}",
|
||||
mogo_core_function_main : "com.mogo.eagle.core.function.impl:main:${MOGO_CORE_FUNCTION_MAIN_VERSION}",
|
||||
mogo_core_function_monitoring: "com.mogo.eagle.core.function.impl:monitoring:${MOGO_CORE_FUNCTION_MONITORING_VERSION}",
|
||||
mogo_core_function_obu_mogo : "com.mogo.eagle.core.function.impl:obu-mogo:${MOGO_CORE_FUNCTION_OBU_MOGO_VERSION}",
|
||||
mogo_core_function_smp : "com.mogo.eagle.core.function.impl:smp:${MOGO_CORE_FUNCTION_SMP_VERSION}",
|
||||
mogo_core_function_v2x : "com.mogo.eagle.core.function.impl:v2x:${MOGO_CORE_FUNCTION_V2X_VERSION}",
|
||||
|
||||
@@ -1,22 +1,26 @@
|
||||
package com.mogo.eagle.function.biz.push
|
||||
package com.mogo.eagle.function.biz
|
||||
|
||||
import android.content.Context
|
||||
import com.alibaba.android.arouter.facade.annotation.Route
|
||||
import com.mogo.eagle.core.data.camera.CameraEntity
|
||||
import com.mogo.eagle.core.data.constants.MogoServicePaths
|
||||
import com.mogo.eagle.core.function.api.biz.IMoGoFuncBizProvider
|
||||
import com.mogo.eagle.core.function.api.biz.IMoGoNoticeNetCallBack
|
||||
import com.mogo.eagle.function.biz.push.dispatch.DispatchAutoPilotManager.Companion.dispatchAutoPilotManager
|
||||
import com.mogo.eagle.function.biz.push.notice.NoticeSocketManager.Companion.noticeSocketManager
|
||||
import com.mogo.eagle.function.biz.push.notice.network.NoticeNetWorkManager
|
||||
import com.mogo.eagle.function.biz.dispatch.DispatchAutoPilotManager.Companion.dispatchAutoPilotManager
|
||||
import com.mogo.eagle.function.biz.monitoring.CronTaskManager.Companion.cronTaskManager
|
||||
import com.mogo.eagle.function.biz.notice.NoticeSocketManager.Companion.noticeSocketManager
|
||||
import com.mogo.eagle.function.biz.notice.network.NoticeNetWorkManager
|
||||
|
||||
@Route(path = MogoServicePaths.PATH_FUNC_BIZ)
|
||||
class FuncBizProvider : IMoGoFuncBizProvider {
|
||||
|
||||
override val functionName: String
|
||||
get() = "FuncBiz"
|
||||
|
||||
override fun init(context: Context) {
|
||||
noticeSocketManager.init(context)
|
||||
dispatchAutoPilotManager.init(context)
|
||||
cronTaskManager.startCronTask()
|
||||
}
|
||||
|
||||
override fun feedBackNoticeTraffic(infoId: String, sn: String, accept: Int) {
|
||||
@@ -39,8 +43,24 @@ class FuncBizProvider : IMoGoFuncBizProvider {
|
||||
dispatchAutoPilotManager.testDispatch(sceneType)
|
||||
}
|
||||
|
||||
override val getCameraList: List<CameraEntity>
|
||||
get() = cronTaskManager.getCameraList()
|
||||
|
||||
override fun openCameraStream(cameraIp: String) {
|
||||
cronTaskManager.reqOpenCameraStream(cameraIp)
|
||||
}
|
||||
|
||||
override fun openCameraStream(cameraIp: String, success: (String) -> Unit, error: (Throwable) -> Unit) {
|
||||
cronTaskManager.reqOpenCameraStream(cameraIp, success, error)
|
||||
}
|
||||
|
||||
override fun closeCameraLive() {
|
||||
cronTaskManager.clear()
|
||||
}
|
||||
|
||||
override fun onDestroy() {
|
||||
noticeSocketManager.release()
|
||||
dispatchAutoPilotManager.release()
|
||||
cronTaskManager.release()
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.mogo.eagle.function.biz.push.dispatch
|
||||
package com.mogo.eagle.function.biz.dispatch
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.content.Context
|
||||
import android.os.Handler
|
||||
import android.os.Message
|
||||
@@ -22,10 +21,10 @@ import com.mogo.eagle.core.function.call.hmi.CallerHmiListenerManager
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant
|
||||
import com.mogo.eagle.function.biz.push.dispatch.network.DispatchServiceModel.Companion.DISPATCH_RESULT_AFFIRM
|
||||
import com.mogo.eagle.function.biz.push.dispatch.network.DispatchServiceModel.Companion.DISPATCH_RESULT_MANUAL_CANCEL
|
||||
import com.mogo.eagle.function.biz.push.dispatch.network.DispatchServiceModel.Companion.DISPATCH_RESULT_TIMER_CANCEL
|
||||
import com.mogo.eagle.function.biz.push.dispatch.network.DispatchServiceModel.Companion.dispatchServiceModel
|
||||
import com.mogo.eagle.function.biz.dispatch.network.DispatchServiceModel.Companion.DISPATCH_RESULT_AFFIRM
|
||||
import com.mogo.eagle.function.biz.dispatch.network.DispatchServiceModel.Companion.DISPATCH_RESULT_MANUAL_CANCEL
|
||||
import com.mogo.eagle.function.biz.dispatch.network.DispatchServiceModel.Companion.DISPATCH_RESULT_TIMER_CANCEL
|
||||
import com.mogo.eagle.function.biz.dispatch.network.DispatchServiceModel.Companion.dispatchServiceModel
|
||||
import mogo.telematics.pad.MessagePad
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.mogo.eagle.function.biz.push.dispatch.network
|
||||
package com.mogo.eagle.function.biz.dispatch.network
|
||||
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig
|
||||
import com.mogo.commons.constants.HostConst
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.mogo.eagle.function.biz.push.dispatch.network
|
||||
package com.mogo.eagle.function.biz.dispatch.network
|
||||
|
||||
import com.mogo.eagle.core.data.BaseData
|
||||
import io.reactivex.Observable
|
||||
@@ -1,15 +1,15 @@
|
||||
package com.mogo.eagle.core.function.monitoring
|
||||
package com.mogo.eagle.function.biz.monitoring
|
||||
|
||||
import android.content.Context
|
||||
import android.os.Handler
|
||||
import android.os.Looper
|
||||
import android.os.Message
|
||||
import com.mogo.commons.constants.HostConst
|
||||
import com.mogo.commons.utils.RetryWithDelay
|
||||
import com.mogo.eagle.core.data.camera.CameraEntity
|
||||
import com.mogo.eagle.core.data.camera.ReqLiveCarBean
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapLocationListenerManager
|
||||
import com.mogo.eagle.core.function.monitoring.net.CameraListServices
|
||||
import com.mogo.eagle.function.biz.monitoring.net.ICameraListServices
|
||||
import com.mogo.eagle.core.network.MoGoRetrofitFactory
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_MONITOR
|
||||
@@ -18,11 +18,15 @@ import io.reactivex.android.schedulers.AndroidSchedulers
|
||||
import io.reactivex.disposables.Disposable
|
||||
import io.reactivex.schedulers.Schedulers
|
||||
|
||||
class CronTaskManager(private var context: Context?) {
|
||||
class CronTaskManager {
|
||||
|
||||
companion object {
|
||||
private const val TAG = "CronTaskManager"
|
||||
private const val CRON_TASK_TYPE = 1011
|
||||
|
||||
val cronTaskManager by lazy(LazyThreadSafetyMode.SYNCHRONIZED){
|
||||
CronTaskManager()
|
||||
}
|
||||
}
|
||||
|
||||
// 请求路侧摄像头
|
||||
@@ -57,7 +61,7 @@ class CronTaskManager(private var context: Context?) {
|
||||
private fun requestCameraList() {
|
||||
// 衡阳可直播的摄像头有限,先写死roadId便于调试
|
||||
disposable = MoGoRetrofitFactory.getInstance(HostConst.CAMERA_STREAM_HOST)
|
||||
.create(CameraListServices::class.java)
|
||||
.create(ICameraListServices::class.java)
|
||||
.getCameraList("10849")
|
||||
.subscribeOn(Schedulers.io())
|
||||
.map { cameraListInfo ->
|
||||
@@ -88,7 +92,7 @@ class CronTaskManager(private var context: Context?) {
|
||||
private fun requestDeviceList() {
|
||||
CallerMapLocationListenerManager.getCurrentLocation()?.let { location ->
|
||||
disposable = MoGoRetrofitFactory.getInstance(HostConst.CITY_HOST)
|
||||
.create(CameraListServices::class.java)
|
||||
.create(ICameraListServices::class.java)
|
||||
.getDeviceList(location.longitude, location.latitude, 500)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.map { cameraListInfo ->
|
||||
@@ -122,7 +126,7 @@ class CronTaskManager(private var context: Context?) {
|
||||
private fun requestCarCameraList() {
|
||||
CallerMapLocationListenerManager.getCurrentLocation()?.let { location ->
|
||||
carDisposable = MoGoRetrofitFactory.getInstance(HostConst.CITY_HOST)
|
||||
.create(CameraListServices::class.java)
|
||||
.create(ICameraListServices::class.java)
|
||||
.getCarCameraList(ReqLiveCarBean(location.longitude, location.latitude))
|
||||
.subscribeOn(Schedulers.io())
|
||||
.map { liveCarCameraInfo ->
|
||||
@@ -161,7 +165,7 @@ class CronTaskManager(private var context: Context?) {
|
||||
if (!it.isDisposed) it.dispose()
|
||||
}
|
||||
streamDisposable = MoGoRetrofitFactory.getInstance(HostConst.OPEN_CAMERA_STREAM_HOST)
|
||||
.create(CameraListServices::class.java)
|
||||
.create(ICameraListServices::class.java)
|
||||
.openCameraStream(cameraIp)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
@@ -190,7 +194,7 @@ class CronTaskManager(private var context: Context?) {
|
||||
if (!it.isDisposed) it.dispose()
|
||||
}
|
||||
streamDisposable = MoGoRetrofitFactory.getInstance(HostConst.CITY_HOST)
|
||||
.create(CameraListServices::class.java)
|
||||
.create(ICameraListServices::class.java)
|
||||
.reqOpenCameraStream(cameraIp)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
@@ -219,7 +223,7 @@ class CronTaskManager(private var context: Context?) {
|
||||
if (!it.isDisposed) it.dispose()
|
||||
}
|
||||
streamDisposable2 = MoGoRetrofitFactory.getInstance(HostConst.CITY_HOST)
|
||||
.create(CameraListServices::class.java)
|
||||
.create(ICameraListServices::class.java)
|
||||
.reqOpenCameraStreamWithRetry(cameraIp)
|
||||
.flatMap {
|
||||
if (it.code != 200 && it.code != 0) {
|
||||
@@ -268,8 +272,7 @@ class CronTaskManager(private var context: Context?) {
|
||||
}
|
||||
}
|
||||
|
||||
fun onDestroy() {
|
||||
context = null
|
||||
fun release() {
|
||||
disposable?.dispose()
|
||||
carDisposable?.dispose()
|
||||
streamDisposable?.let {
|
||||
@@ -1,11 +1,11 @@
|
||||
package com.mogo.eagle.core.function.monitoring.net
|
||||
package com.mogo.eagle.function.biz.monitoring.net
|
||||
|
||||
import com.mogo.eagle.core.data.camera.*
|
||||
import io.reactivex.Observable
|
||||
import io.reactivex.Single
|
||||
import retrofit2.http.*
|
||||
|
||||
interface CameraListServices {
|
||||
interface ICameraListServices {
|
||||
@GET("/yycp-smartTransportationAiCloud-service/eagle/device/list")
|
||||
fun getCameraList(@Query("roadId") roadId: String?): Single<CameraListInfo?>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.mogo.eagle.function.biz.push.notice
|
||||
package com.mogo.eagle.function.biz.notice
|
||||
|
||||
import android.content.Context
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.d
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.mogo.eagle.function.biz.push.notice.network;
|
||||
package com.mogo.eagle.function.biz.notice.network;
|
||||
|
||||
import com.mogo.eagle.core.data.BaseData;
|
||||
import com.mogo.eagle.core.data.notice.NoticeNormalDetail;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.mogo.eagle.function.biz.push.notice.network;
|
||||
package com.mogo.eagle.function.biz.notice.network;
|
||||
|
||||
import android.util.ArrayMap;
|
||||
|
||||
@@ -92,7 +92,6 @@ dependencies {
|
||||
api rootProject.ext.dependencies.mogo_core_function_bindingcar
|
||||
api rootProject.ext.dependencies.mogo_core_function_map
|
||||
api rootProject.ext.dependencies.mogo_core_function_v2x
|
||||
api rootProject.ext.dependencies.mogo_core_function_monitoring
|
||||
api rootProject.ext.dependencies.mogo_core_function_devatools
|
||||
api rootProject.ext.dependencies.mogo_core_function_call
|
||||
|
||||
@@ -109,7 +108,6 @@ dependencies {
|
||||
api project(':core:function-impl:mogo-core-function-obu-mogo')
|
||||
api project(':core:function-impl:mogo-core-function-map')
|
||||
api project(':core:function-impl:mogo-core-function-v2x')
|
||||
api project(':core:function-impl:mogo-core-function-monitoring')
|
||||
api project(':core:function-impl:mogo-core-function-devatools')
|
||||
api project(':core:function-impl:mogo-core-function-chat')
|
||||
api project(':core:function-impl:mogo-core-function-bindingcar')
|
||||
|
||||
@@ -59,11 +59,11 @@ import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotRecordListenerManager
|
||||
import com.mogo.eagle.core.function.call.bindingcar.CallerBindingcarManager
|
||||
import com.mogo.eagle.core.function.call.biz.CallerFuncBizManager
|
||||
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
||||
import com.mogo.eagle.core.function.call.map.*
|
||||
import com.mogo.eagle.core.function.call.map.CallerVisualAngleManager.Scene.Turning
|
||||
import com.mogo.eagle.core.function.call.monitor.CallerMonitorManager
|
||||
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.function.hmi.notification.WarningFloat
|
||||
@@ -211,7 +211,7 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
|
||||
|
||||
ivCameraIcon?.setOnClickListener {
|
||||
if (cameraViewFloat == null) {
|
||||
showCameraList(CallerMonitorManager.getCameraList())
|
||||
showCameraList(CallerFuncBizManager.bizProvider.getCameraList)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1304,7 +1304,7 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
|
||||
dismissFloatView()
|
||||
// 丢弃开启摄像头推流请求,同时monitor回调hmi的startRoadCameraLive()
|
||||
// 也做了cameraListView的非空判断
|
||||
CallerMonitorManager.disposeCameraStream()
|
||||
CallerFuncBizManager.bizProvider.closeCameraLive()
|
||||
}
|
||||
|
||||
override fun onShowLive(isShow: Boolean) {
|
||||
@@ -1315,7 +1315,7 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
|
||||
}
|
||||
|
||||
override fun refreshCameraList() {
|
||||
cameraListView?.refreshCameraList(CallerMonitorManager.getCameraList())
|
||||
cameraListView?.refreshCameraList(CallerFuncBizManager.bizProvider.getCameraList)
|
||||
}
|
||||
})
|
||||
cameraViewFloat = WarningFloat.with(it)
|
||||
|
||||
@@ -21,7 +21,7 @@ import com.mogo.cloud.passport.MoGoAiCloudClientConfig
|
||||
import com.mogo.cloud.trafficlive.api.ITrafficCarLiveCallBack
|
||||
import com.mogo.cloud.trafficlive.api.MoGoAiCloudTrafficLive
|
||||
import com.mogo.eagle.core.data.camera.CameraEntity
|
||||
import com.mogo.eagle.core.function.call.monitor.CallerMonitorManager
|
||||
import com.mogo.eagle.core.function.call.biz.CallerFuncBizManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_HMI
|
||||
@@ -107,7 +107,7 @@ class CameraListView : FrameLayout {
|
||||
gsyVideoPlay(cameraEntity.flvUrl!!)
|
||||
} else if (!cameraEntity.ip.isNullOrEmpty()) {
|
||||
CallerLogger.d("$M_HMI$TAG", "打开推流的摄像头ip为:${cameraEntity.ip}")
|
||||
CallerMonitorManager.openCameraStream(cameraEntity.ip!!)
|
||||
CallerFuncBizManager.bizProvider.openCameraStream(cameraEntity.ip!!)
|
||||
} else {
|
||||
CallerLogger.e("$M_HMI$TAG", "摄像头视频播放地址和ip均为空")
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ import android.view.View
|
||||
import androidx.core.content.ContextCompat
|
||||
import androidx.lifecycle.LifecycleObserver
|
||||
import com.mogo.eagle.core.data.map.Infrastructure
|
||||
import com.mogo.eagle.core.function.call.monitor.CallerMonitorManager
|
||||
import com.mogo.eagle.core.function.call.biz.CallerFuncBizManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant
|
||||
@@ -88,7 +88,7 @@ class RoadVideoDialog(context: Context) : BaseFloatDialog(context), LifecycleObs
|
||||
private fun playVideo(ip: String) {
|
||||
roadVideoPB.visibility = View.VISIBLE
|
||||
tvCameraDesc.visibility = View.GONE
|
||||
CallerMonitorManager.openCameraStream(ip, { flvUrl ->
|
||||
CallerFuncBizManager.bizProvider.openCameraStream(ip, { flvUrl ->
|
||||
gsyVideoPlay(flvUrl)
|
||||
}) {
|
||||
roadVideoPB.visibility = View.GONE
|
||||
|
||||
@@ -231,8 +231,6 @@ public abstract class MainMoGoApplication extends AbsMogoApplication {
|
||||
|
||||
// OBU 模块
|
||||
MogoModulePaths.addModuleFunctionServer(new MogoModule(MogoServicePaths.PATH_V2X_OBU_MOGO, "IMoGoObuProvider"));
|
||||
// 超视距,路测、行车记录仪监控
|
||||
MogoModulePaths.addModuleFunctionServer(new MogoModule(MogoServicePaths.PATH_AI_MONITORING, "IMoGoMonitoringProvider"));
|
||||
// 云公告发布
|
||||
MogoModulePaths.addModuleFunctionServer(new MogoModule(MogoServicePaths.PATH_FUNC_BIZ, "IMoGoNoticeProvider"));
|
||||
// 车聊聊,IM
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
/build
|
||||
@@ -1,68 +0,0 @@
|
||||
plugins {
|
||||
id 'com.android.library'
|
||||
id 'kotlin-android'
|
||||
id 'kotlin-android-extensions'
|
||||
id 'kotlin-kapt'
|
||||
id 'com.alibaba.arouter'
|
||||
}
|
||||
android {
|
||||
compileSdkVersion rootProject.ext.android.compileSdkVersion
|
||||
// buildToolsVersion rootProject.ext.android.buildToolsVersion
|
||||
defaultConfig {
|
||||
minSdkVersion rootProject.ext.android.minSdkVersion
|
||||
targetSdkVersion rootProject.ext.android.targetSdkVersion
|
||||
versionCode Integer.valueOf(VERSION_CODE)
|
||||
versionName getValueFromRootProperties("${project.name.replace("-", "_").toUpperCase()}_VERSION")
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
consumerProguardFiles 'consumer-rules.pro'
|
||||
//ARouter apt 参数
|
||||
kapt {
|
||||
useBuildCache = false
|
||||
arguments {
|
||||
arg("AROUTER_MODULE_NAME", project.getName())
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||
implementation rootProject.ext.dependencies.kotlinstdlibjdk7
|
||||
implementation rootProject.ext.dependencies.androidxccorektx
|
||||
implementation rootProject.ext.dependencies.androidxappcompat
|
||||
implementation rootProject.ext.dependencies.androidxconstraintlayout
|
||||
implementation rootProject.ext.dependencies.arouter
|
||||
implementation rootProject.ext.dependencies.rxandroid
|
||||
|
||||
kapt rootProject.ext.dependencies.aroutercompiler
|
||||
|
||||
if (Boolean.valueOf(USE_MAVEN_PACKAGE)) {
|
||||
implementation rootProject.ext.dependencies.mogo_core_utils
|
||||
implementation rootProject.ext.dependencies.mogo_core_res
|
||||
implementation rootProject.ext.dependencies.mogo_core_data
|
||||
implementation rootProject.ext.dependencies.mogo_core_function_call
|
||||
} else {
|
||||
implementation project(':core:mogo-core-utils')
|
||||
implementation project(':core:mogo-core-res')
|
||||
implementation project(':core:mogo-core-data')
|
||||
implementation project(':core:mogo-core-function-call')
|
||||
implementation project(":foudations:mogo-commons")
|
||||
}
|
||||
}
|
||||
|
||||
apply from: new File(rootProject.rootDir, "gradle/upload.gradle").toString()
|
||||
@@ -1,3 +0,0 @@
|
||||
GROUP=com.mogo.eagle.core.function.impl
|
||||
POM_ARTIFACT_ID=monitoring
|
||||
VERSION_CODE=1
|
||||
@@ -1,21 +0,0 @@
|
||||
# Add project specific ProGuard rules here.
|
||||
# You can control the set of applied configuration files using the
|
||||
# proguardFiles setting in build.gradle.
|
||||
#
|
||||
# For more details, see
|
||||
# http://developer.android.com/guide/developing/tools/proguard.html
|
||||
|
||||
# If your project uses WebView with JS, uncomment the following
|
||||
# and specify the fully qualified class name to the JavaScript interface
|
||||
# class:
|
||||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
||||
# public *;
|
||||
#}
|
||||
|
||||
# Uncomment this to preserve the line number information for
|
||||
# debugging stack traces.
|
||||
#-keepattributes SourceFile,LineNumberTable
|
||||
|
||||
# If you keep the line number information, uncomment this to
|
||||
# hide the original source file name.
|
||||
#-renamesourcefileattribute SourceFile
|
||||
@@ -1,5 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.mogo.eagle.core.function.monitoring">
|
||||
|
||||
</manifest>
|
||||
@@ -1,173 +0,0 @@
|
||||
package com.mogo.eagle.core.function.live;
|
||||
|
||||
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_MONITOR;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.text.TextUtils;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.widget.ProgressBar;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.constraintlayout.widget.ConstraintLayout;
|
||||
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.eagle.core.function.monitoring.R;
|
||||
import com.mogo.eagle.core.widget.LiveRoundLayout;
|
||||
import com.tencent.rtmp.ITXLivePlayListener;
|
||||
import com.tencent.rtmp.TXLiveConstants;
|
||||
import com.tencent.rtmp.TXLivePlayConfig;
|
||||
import com.tencent.rtmp.TXLivePlayer;
|
||||
import com.tencent.rtmp.ui.TXCloudVideoView;
|
||||
|
||||
/**
|
||||
* V2XLiveGSYVideoView
|
||||
*/
|
||||
public class CameraLiveGSYVideoView extends LiveRoundLayout {
|
||||
private static final String TAG = "CameraLiveGSYVideoView";
|
||||
private TXCloudVideoView mTxcVideoView;
|
||||
private ProgressBar mLoading;
|
||||
private TXLivePlayer mLivePlayer;
|
||||
private ConstraintLayout mClLoadError;
|
||||
private TextView mTvRefreshButton;
|
||||
|
||||
private String mLiveUrl;
|
||||
|
||||
|
||||
public CameraLiveGSYVideoView(Context context) {
|
||||
this(context, null);
|
||||
}
|
||||
|
||||
public CameraLiveGSYVideoView(Context context, AttributeSet attrs) {
|
||||
this(context, attrs, 0);
|
||||
}
|
||||
|
||||
public CameraLiveGSYVideoView(Context context, AttributeSet attrs, int defStyleAttr) {
|
||||
super(context, attrs, defStyleAttr);
|
||||
initView(context);
|
||||
|
||||
}
|
||||
|
||||
private void initView(Context context) {
|
||||
LayoutInflater.from(context)
|
||||
.inflate(R.layout.camera_view_video_layout_normal, this);
|
||||
//mPlayerView 即 step1 中添加的界面 view
|
||||
mTxcVideoView = findViewById(R.id.txcVideoView);
|
||||
//创建 player 对象
|
||||
mLivePlayer = new TXLivePlayer(context);
|
||||
//关键 player 对象与界面 view
|
||||
mLivePlayer.setPlayerView(mTxcVideoView);
|
||||
mLivePlayer.setMute(true);
|
||||
|
||||
TXLivePlayConfig txLivePlayConfig = new TXLivePlayConfig();
|
||||
// 增加重试次数
|
||||
txLivePlayConfig.setConnectRetryCount(30);
|
||||
mLivePlayer.setConfig(txLivePlayConfig);
|
||||
|
||||
mLivePlayer.enableHardwareDecode(true);
|
||||
|
||||
mLoading = findViewById(R.id.loading);
|
||||
// mLoading.getIndeterminateDrawable().setColorFilter(ContextCompat.getColor(context, R.color.module_live_video_progress_bar_loading_color), PorterDuff.Mode.MULTIPLY);
|
||||
|
||||
mClLoadError = findViewById(R.id.clLoadError);
|
||||
mTvRefreshButton = findViewById(R.id.tvRefreshButton);
|
||||
mTvRefreshButton.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
mLoading.setVisibility(VISIBLE);
|
||||
mClLoadError.setVisibility(GONE);
|
||||
if (mLiveUrl != null) {
|
||||
startLive(mLiveUrl);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 开始直播
|
||||
*
|
||||
* @param liveUrl 要直播的车机,如果没有直播的地址需要重新获取最新的直播地址
|
||||
*/
|
||||
public void startLive(String liveUrl) {
|
||||
// 进行直播播放
|
||||
if (mLivePlayer != null) {
|
||||
if (!TextUtils.isEmpty(liveUrl)) {
|
||||
mLiveUrl = liveUrl;
|
||||
playLiveVideo(liveUrl);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 播放直播流,且开始心跳
|
||||
*/
|
||||
private void playLiveVideo(String liveUrl) {
|
||||
try {
|
||||
if (mLivePlayer != null) {
|
||||
mLivePlayer.startPlay(liveUrl, TXLivePlayer.PLAY_TYPE_LIVE_RTMP);
|
||||
mLivePlayer.setPlayListener(new ITXLivePlayListener() {
|
||||
@Override
|
||||
public void onPlayEvent(int event, Bundle bundle) {
|
||||
CallerLogger.INSTANCE.d(M_MONITOR + TAG,
|
||||
"直播信息= " +
|
||||
"\n播放器:onPlayEvent==" + event +
|
||||
"\nbundle===" + bundle +
|
||||
"liveUrl = " + liveUrl);
|
||||
if (event == TXLiveConstants.PLAY_EVT_PLAY_LOADING) {
|
||||
mLoading.setVisibility(VISIBLE);
|
||||
mClLoadError.setVisibility(GONE);
|
||||
} else if (event == TXLiveConstants.PLAY_EVT_PLAY_BEGIN) {
|
||||
mLoading.setVisibility(GONE);
|
||||
mClLoadError.setVisibility(GONE);
|
||||
} else if (event < 0) {
|
||||
stopLive(mLiveUrl);
|
||||
mLoading.setVisibility(GONE);
|
||||
mClLoadError.setVisibility(VISIBLE);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNetStatus(Bundle bundle) {
|
||||
CallerLogger.INSTANCE.d(M_MONITOR + TAG, "播放器:onNetStatus===bundle===" + bundle);
|
||||
}
|
||||
});
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
CallerLogger.INSTANCE.e(M_MONITOR + TAG, "播放器:onNetStatus e = " + e);
|
||||
mLoading.setVisibility(GONE);
|
||||
mClLoadError.setVisibility(VISIBLE);
|
||||
}
|
||||
}
|
||||
|
||||
public void stopLive(String liveUrl) {
|
||||
try {
|
||||
CallerLogger.INSTANCE.d(M_MONITOR + TAG, "心跳:关闭直播...");
|
||||
// 暂停
|
||||
mLivePlayer.pause();
|
||||
// true 代表清除最后一帧画面
|
||||
mLivePlayer.stopPlay(true);
|
||||
mTxcVideoView.onDestroy();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onAttachedToWindow() {
|
||||
super.onAttachedToWindow();
|
||||
if (mLiveUrl != null) {
|
||||
startLive(mLiveUrl);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDetachedFromWindow() {
|
||||
stopLive(mLiveUrl);
|
||||
mLoading.setVisibility(VISIBLE);
|
||||
super.onDetachedFromWindow();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,91 +0,0 @@
|
||||
package com.mogo.eagle.core.function.live;
|
||||
|
||||
import android.view.View;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.mogo.cloud.socket.entity.SocketDownData;
|
||||
import com.mogo.eagle.core.function.live.impl.AbsCameraScenario;
|
||||
|
||||
/**
|
||||
* 路边摄像头直播控制 V2XPushLiveCarScenario
|
||||
*/
|
||||
public class CameraLiveManager extends AbsCameraScenario<SocketDownData.CloudRoadDataProto> {
|
||||
private static final String TAG = "CameraLiveManager";
|
||||
private static CameraLiveManager mCameraLiveManager;
|
||||
private boolean isShowWindow;
|
||||
|
||||
private CameraLiveManager() {
|
||||
}
|
||||
|
||||
public static CameraLiveManager getInstance() {
|
||||
if (mCameraLiveManager == null) {
|
||||
synchronized (CameraLiveManager.class) {
|
||||
if (mCameraLiveManager == null) {
|
||||
mCameraLiveManager = new CameraLiveManager();
|
||||
mCameraLiveManager.setV2XWindow(new PushCameraLiveWindow());
|
||||
}
|
||||
}
|
||||
}
|
||||
return mCameraLiveManager;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init(@Nullable SocketDownData.CloudRoadDataProto cloudRoadData) {
|
||||
if (isShowWindow) {
|
||||
close();
|
||||
}
|
||||
|
||||
setmCloudRoadData(cloudRoadData);
|
||||
show();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void show() {
|
||||
showWindow();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void showWindow() {
|
||||
if (getV2XWindow() != null) {
|
||||
// ViewGroup.LayoutParams layoutParams =
|
||||
// new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,
|
||||
// (int) AbsMogoApplication.getApp().getResources()
|
||||
// .getDimension(R.dimen.module_video_window_height_content));
|
||||
// TODO 这里需要替换展示方式
|
||||
// MogoApisHandler.getInstance().getApis().getTopViewManager()
|
||||
// .addViewNoLinkage(getV2XWindow().getView(), layoutParams, this);
|
||||
// getV2XWindow().show(getmCloudRoadData());
|
||||
isShowWindow = true;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void closeWindow() {
|
||||
if (getV2XWindow() != null) {
|
||||
getV2XWindow().close();
|
||||
}
|
||||
isShowWindow = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void showButton() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void closeButton() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawPOI() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clearPOI() {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
package com.mogo.eagle.core.function.live;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
|
||||
public class ExtensionServiceManager {
|
||||
private static boolean isInit;
|
||||
private static Context mContext;
|
||||
|
||||
private ExtensionServiceManager() {
|
||||
|
||||
}
|
||||
|
||||
public static void init(final Context context) {
|
||||
if (!isInit) {
|
||||
isInit = true;
|
||||
mContext = context;
|
||||
}
|
||||
}
|
||||
|
||||
public static Context getContext() {
|
||||
return mContext;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -1,117 +0,0 @@
|
||||
package com.mogo.eagle.core.function.live;
|
||||
|
||||
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_MONITOR;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Handler;
|
||||
import android.text.TextUtils;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.RelativeLayout;
|
||||
|
||||
import com.mogo.cloud.socket.entity.SocketDownData;
|
||||
import com.mogo.eagle.core.utilcode.mogo.glide.GlideImageLoader;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.eagle.core.function.live.impl.ICameraWindow;
|
||||
import com.mogo.eagle.core.function.monitoring.R;
|
||||
import com.mogo.eagle.core.utilcode.mogo.imageloader.MogoImageView;
|
||||
|
||||
|
||||
/**
|
||||
* 点击摄像头 marker
|
||||
* vr路边摄像头弹窗 V2XPushLiveCarWindow
|
||||
*/
|
||||
public class PushCameraLiveWindow extends RelativeLayout implements ICameraWindow<SocketDownData.CloudRoadDataProto> {
|
||||
private static final String TAG = "PushCameraLiveWindow";
|
||||
private CameraLiveGSYVideoView mLiveGSYVideoView;
|
||||
private MogoImageView mIvReportHead;
|
||||
private ImageView pushVideoClose;
|
||||
|
||||
// 直播30秒自动关闭
|
||||
private static final Handler handlerV2XEvent = new Handler();
|
||||
private static Runnable runnableV2XEvent;
|
||||
|
||||
public PushCameraLiveWindow() {
|
||||
this(ExtensionServiceManager.getContext(), null);
|
||||
}
|
||||
|
||||
public PushCameraLiveWindow(Context context) {
|
||||
this(context, null);
|
||||
}
|
||||
|
||||
public PushCameraLiveWindow(Context context, AttributeSet attrs) {
|
||||
this(context, attrs, 0);
|
||||
}
|
||||
|
||||
public PushCameraLiveWindow(Context context, AttributeSet attrs, int defStyleAttr) {
|
||||
super(context, attrs, defStyleAttr);
|
||||
initView(context);
|
||||
}
|
||||
|
||||
public void initView(Context context) {
|
||||
CallerLogger.INSTANCE.w(M_MONITOR + TAG, "initView 。。。。。");
|
||||
LayoutInflater.from(context).inflate(R.layout.camera_push_live_video, this);
|
||||
// 详情列表
|
||||
mLiveGSYVideoView = findViewById(R.id.videoPlayer);
|
||||
mIvReportHead = findViewById(R.id.ivReportHead);
|
||||
pushVideoClose = findViewById(R.id.pushVideoClose);
|
||||
pushVideoClose.setOnClickListener(v -> {
|
||||
//TODO 移除窗体
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 展示直播Windows
|
||||
*/
|
||||
@Override
|
||||
public void show(SocketDownData.CloudRoadDataProto entity) {
|
||||
if (entity != null) {
|
||||
CallerLogger.INSTANCE.w(M_MONITOR + TAG, "更新直播信息 show entity = " + entity);
|
||||
if (!TextUtils.isEmpty(entity.getRtmpUrl())) {
|
||||
CallerLogger.INSTANCE.w(M_MONITOR + TAG, "entity.getRtmpUrl() = " + entity.getRtmpUrl());
|
||||
mIvReportHead.setVisibility(INVISIBLE);
|
||||
GlideImageLoader.getInstance().displayImage(entity.getRtmpUrl(),
|
||||
mIvReportHead);
|
||||
mLiveGSYVideoView.startLive(entity.getRtmpUrl());
|
||||
}
|
||||
|
||||
countDownV2XEvent();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public View getView() {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void close() {
|
||||
// 停止倒计时
|
||||
if (runnableV2XEvent != null) {
|
||||
handlerV2XEvent.removeCallbacks(runnableV2XEvent);
|
||||
runnableV2XEvent = null;
|
||||
}
|
||||
//TODO 移除窗体
|
||||
}
|
||||
|
||||
/**
|
||||
* 窗体倒计时
|
||||
*/
|
||||
public void countDownV2XEvent() {
|
||||
// 倒计时
|
||||
if (runnableV2XEvent == null) {
|
||||
runnableV2XEvent = () -> {
|
||||
// CallerLogger.INSTANCE.d(MODULE_NAME, "V2X=== Window 30秒倒计时结束。。。");
|
||||
//TODO 移除窗体
|
||||
};
|
||||
} else {
|
||||
handlerV2XEvent.removeCallbacks(runnableV2XEvent);
|
||||
}
|
||||
|
||||
CallerLogger.INSTANCE.d(M_MONITOR + TAG, "V2X=== Window 展示开始倒计时:");
|
||||
handlerV2XEvent.postDelayed(runnableV2XEvent, 20000);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
package com.mogo.eagle.core.function.live;
|
||||
|
||||
/**
|
||||
* @author lixiaopeng
|
||||
* @description
|
||||
* @since 2020/12/13
|
||||
*/
|
||||
public class PushDataType {
|
||||
/**
|
||||
* Push 摄像头事件场景 VR
|
||||
*/
|
||||
public static final String TYPE_PUSH_CAMERA_DATA = "TYPE_PUSH_CAMERA_DATA";
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
package com.mogo.eagle.core.function.live.impl;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.mogo.cloud.socket.entity.SocketDownData;
|
||||
|
||||
|
||||
public abstract class AbsCameraScenario<T> implements ICameraScenario {
|
||||
protected String TAG = "AbsCameraScenario";
|
||||
private ICameraWindow mV2XWindow;
|
||||
private SocketDownData.CloudRoadDataProto mCloudRoadData;
|
||||
|
||||
public abstract void init(@Nullable SocketDownData.CloudRoadDataProto cloudRoadData);
|
||||
|
||||
@Override
|
||||
public void close() {
|
||||
closeButton();
|
||||
closeWindow();
|
||||
clearPOI();
|
||||
}
|
||||
|
||||
public ICameraWindow getV2XWindow() {
|
||||
return mV2XWindow;
|
||||
}
|
||||
|
||||
public void setV2XWindow(@Nullable ICameraWindow mV2XWindow) {
|
||||
this.mV2XWindow = mV2XWindow;
|
||||
}
|
||||
|
||||
public SocketDownData.CloudRoadDataProto getmCloudRoadData() {
|
||||
return mCloudRoadData;
|
||||
}
|
||||
|
||||
public void setmCloudRoadData(SocketDownData.CloudRoadDataProto mCloudRoadData) {
|
||||
this.mCloudRoadData = mCloudRoadData;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,46 +0,0 @@
|
||||
package com.mogo.eagle.core.function.live.impl;
|
||||
|
||||
|
||||
public interface ICameraScenario {
|
||||
|
||||
/**
|
||||
* 展示场景
|
||||
*/
|
||||
void show();
|
||||
|
||||
/**
|
||||
* 关闭场景
|
||||
*/
|
||||
void close();
|
||||
|
||||
/**
|
||||
* 展示Window
|
||||
*/
|
||||
void showWindow();
|
||||
|
||||
/**
|
||||
* 关闭Window
|
||||
*/
|
||||
void closeWindow();
|
||||
|
||||
/**
|
||||
* 展示按钮
|
||||
*/
|
||||
void showButton();
|
||||
|
||||
/**
|
||||
* 关闭按钮
|
||||
*/
|
||||
void closeButton();
|
||||
|
||||
/**
|
||||
* 绘制POI
|
||||
*/
|
||||
void drawPOI();
|
||||
|
||||
/**
|
||||
* 清除POI
|
||||
*/
|
||||
void clearPOI();
|
||||
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
package com.mogo.eagle.core.function.live.impl;
|
||||
|
||||
import android.view.View;
|
||||
|
||||
public interface ICameraWindow<T> {
|
||||
|
||||
/**
|
||||
* 展示1/2窗口
|
||||
*/
|
||||
void show(T entity);
|
||||
|
||||
/**
|
||||
* 关闭1/2窗口
|
||||
*/
|
||||
void close();
|
||||
|
||||
/**
|
||||
* 返回窗体
|
||||
*
|
||||
* @return 当前窗体
|
||||
*/
|
||||
View getView();
|
||||
}
|
||||
@@ -1,42 +0,0 @@
|
||||
package com.mogo.eagle.core.function.monitoring
|
||||
|
||||
import android.content.Context
|
||||
import com.alibaba.android.arouter.facade.annotation.Route
|
||||
import com.mogo.eagle.core.data.constants.MogoServicePaths
|
||||
import com.mogo.eagle.core.function.api.monitoring.IMoGoMonitoringProvider
|
||||
import com.mogo.eagle.core.data.camera.CameraEntity
|
||||
|
||||
/**
|
||||
* @author xiaoyuzhou
|
||||
* @date 2021/10/29 11:09 上午
|
||||
*/
|
||||
@Route(path = MogoServicePaths.PATH_AI_MONITORING)
|
||||
class MoGoMonitoringProvider : IMoGoMonitoringProvider {
|
||||
override var functionName = "MoGoMonitoringProvider"
|
||||
private var mCronTaskManager: CronTaskManager? = null
|
||||
override fun init(context: Context) {
|
||||
mCronTaskManager = CronTaskManager(context)
|
||||
mCronTaskManager!!.startCronTask()
|
||||
}
|
||||
|
||||
override val cameraList: List<CameraEntity>
|
||||
get() = mCronTaskManager!!.getCameraList()
|
||||
|
||||
override fun openCameraStream(cameraIp: String) {
|
||||
// 现在不用华哥接口,改用卫明的打开视频推流接口
|
||||
// mCronTaskManager.requestOpenCamera(cameraIp);
|
||||
mCronTaskManager!!.reqOpenCameraStream(cameraIp)
|
||||
}
|
||||
|
||||
override fun openCameraStream(cameraIp: String, success: (String) -> Unit, error: (Throwable) -> Unit) {
|
||||
mCronTaskManager!!.reqOpenCameraStream(cameraIp, success, error)
|
||||
}
|
||||
|
||||
override fun disposeCameraStream() {
|
||||
mCronTaskManager!!.clear()
|
||||
}
|
||||
|
||||
override fun onDestroy() {
|
||||
mCronTaskManager!!.onDestroy()
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 163 B |
Binary file not shown.
|
Before Width: | Height: | Size: 163 B |
Binary file not shown.
|
Before Width: | Height: | Size: 5.1 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 6.2 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 163 B |
Binary file not shown.
|
Before Width: | Height: | Size: 5.1 KiB |
@@ -1,14 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"
|
||||
>
|
||||
|
||||
<gradient
|
||||
android:angle="180"
|
||||
android:endColor="#3E7FFC"
|
||||
android:startColor="#5CC1FF" />
|
||||
|
||||
<corners
|
||||
android:bottomLeftRadius="@dimen/dp_20"
|
||||
/>
|
||||
</shape>
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
|
||||
|
||||
<gradient
|
||||
android:angle="180"
|
||||
android:endColor="#50526E"
|
||||
android:startColor="#333F4057" />
|
||||
<corners android:bottomRightRadius="@dimen/dp_20"/>
|
||||
|
||||
</shape>
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<corners android:radius="@dimen/dp_20" />
|
||||
<solid android:color="#3F4057" />
|
||||
</shape>
|
||||
|
||||
@@ -1,38 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<!-- 边 -->
|
||||
<item>
|
||||
<shape android:shape="rectangle">
|
||||
<padding
|
||||
android:bottom="2dp"
|
||||
android:left="2dp"
|
||||
android:right="2dp"
|
||||
android:top="3dp" />
|
||||
<solid android:color="#00000000" />
|
||||
<corners android:radius="@dimen/dp_26" />
|
||||
</shape>
|
||||
</item>
|
||||
<item>
|
||||
<shape android:shape="rectangle">
|
||||
<padding
|
||||
android:bottom="2dp"
|
||||
android:left="2dp"
|
||||
android:right="2dp"
|
||||
android:top="2dp" />
|
||||
<solid android:color="#00000000" />
|
||||
<corners android:radius="@dimen/dp_26" />
|
||||
</shape>
|
||||
</item>
|
||||
<!-- 中心背景 -->
|
||||
<item>
|
||||
<shape android:shape="rectangle">
|
||||
<corners android:radius="@dimen/dp_26" />
|
||||
<gradient
|
||||
android:angle="135"
|
||||
android:endColor="#3F4057"
|
||||
android:startColor="#5E6079"
|
||||
android:type="linear"
|
||||
android:useLevel="true" />
|
||||
</shape>
|
||||
</item>
|
||||
</layer-list>
|
||||
@@ -1,9 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:width="328dp" android:height="98dp">
|
||||
<shape android:shape="rectangle">
|
||||
<gradient android:angle="360" android:endColor="#ff616381" android:startColor="#ff48495e" />
|
||||
<corners android:radius="@dimen/dp_20" />
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
||||
@@ -1,36 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/v2x_alert_window_bg"
|
||||
android:clipToPadding="false">
|
||||
|
||||
<com.mogo.eagle.core.function.live.CameraLiveGSYVideoView
|
||||
android:id="@+id/videoPlayer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_300"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:roundLayoutRadius="@dimen/dp_30" />
|
||||
|
||||
<com.mogo.eagle.core.utilcode.mogo.imageloader.MogoImageView
|
||||
android:id="@+id/ivReportHead"
|
||||
android:layout_width="@dimen/dp_80"
|
||||
android:layout_height="@dimen/dp_80"
|
||||
android:layout_marginEnd="@dimen/dp_31"
|
||||
android:layout_marginBottom="@dimen/dp_14"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/videoPlayer"
|
||||
app:layout_constraintEnd_toEndOf="@+id/videoPlayer"
|
||||
app:miv_borderColor="#4cffffff"
|
||||
app:miv_failureHolder="@drawable/icon_default_user_head"
|
||||
app:miv_overlayImageId="@drawable/icon_default_user_head"
|
||||
app:miv_placeHolder="@drawable/icon_default_user_head"
|
||||
app:miv_shape="circle"
|
||||
app:miv_shapeBorderWidth="@dimen/dp_4"
|
||||
tools:visibility="invisible" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -1,22 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/rlRoadEventDetail"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_300"
|
||||
android:clipToPadding="false">
|
||||
|
||||
<include
|
||||
android:id="@+id/liveVideo"
|
||||
layout="@layout/camera_item_v2x_live_video"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/pushVideoClose"
|
||||
android:layout_width="@dimen/dp_82"
|
||||
android:layout_height="@dimen/dp_82"
|
||||
android:layout_marginLeft="@dimen/dp_20"
|
||||
android:layout_marginTop="@dimen/dp_20"
|
||||
android:src="@drawable/module_common_close_selector" />
|
||||
</RelativeLayout>
|
||||
@@ -1,68 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<com.mogo.eagle.core.widget.LiveRoundLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<com.tencent.rtmp.ui.TXCloudVideoView
|
||||
android:id="@+id/txcVideoView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center" />
|
||||
|
||||
<androidx.core.widget.ContentLoadingProgressBar
|
||||
android:id="@+id/loading"
|
||||
style="?android:attr/progressBarStyleSmall"
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="36dp"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_centerVertical="true" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/clLoadError"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivErrorIcon"
|
||||
android:layout_width="@dimen/dp_66"
|
||||
android:layout_height="@dimen/dp_66"
|
||||
android:src="@drawable/icon_live_load_error"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvErrorContent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_20"
|
||||
android:text="直播获取失败"
|
||||
android:textColor="@color/v2x_FFF_333"
|
||||
android:textSize="@dimen/dp_20"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/ivErrorIcon"
|
||||
app:layout_constraintStart_toEndOf="@+id/ivErrorIcon"
|
||||
app:layout_constraintTop_toTopOf="@+id/ivErrorIcon" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvRefreshButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_40"
|
||||
android:background="@drawable/v2x_refresh_button_bg"
|
||||
android:paddingStart="@dimen/dp_135"
|
||||
android:paddingTop="@dimen/dp_25"
|
||||
android:paddingEnd="@dimen/dp_135"
|
||||
android:paddingBottom="@dimen/dp_25"
|
||||
android:text="重试"
|
||||
android:textColor="@color/v2x_FFF_333"
|
||||
android:textSize="@dimen/dp_20"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/ivErrorIcon" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</com.mogo.eagle.core.widget.LiveRoundLayout>
|
||||
@@ -1,48 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="@dimen/dp_790"
|
||||
android:layout_height="@dimen/dp_440"
|
||||
android:background="@drawable/shape_round_gray"
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_56"
|
||||
android:layout_marginTop="@dimen/dp_134"
|
||||
android:text="是否退出导航?"
|
||||
android:textColor="#FFF"
|
||||
android:textSize="@dimen/dp_40"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
/>
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_dialog_ok"
|
||||
android:layout_width="@dimen/dp_395"
|
||||
android:layout_height="@dimen/dp_128"
|
||||
android:background="@drawable/shape_react_blue_grident"
|
||||
android:gravity="center"
|
||||
android:text="确认"
|
||||
android:textColor="#FFF"
|
||||
android:textSize="@dimen/dp_40"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_dialog_cancel"
|
||||
android:layout_width="@dimen/dp_395"
|
||||
android:layout_height="@dimen/dp_128"
|
||||
android:background="@drawable/shape_react_gray_grident"
|
||||
android:gravity="center"
|
||||
android:text="取消"
|
||||
android:textColor="#FFF"
|
||||
android:textSize="@dimen/dp_40"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
/>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<color name="v2x_FFF_333">#FFFFFF</color>
|
||||
|
||||
<color name="module_switch_map_bg">#323C6F</color>
|
||||
</resources>
|
||||
@@ -1,4 +0,0 @@
|
||||
<resources>
|
||||
<string name="app_name">mogo-module-extensions</string>
|
||||
|
||||
</resources>
|
||||
@@ -1,13 +1,11 @@
|
||||
package com.mogo.eagle.core.function.api.biz
|
||||
|
||||
import com.mogo.eagle.core.data.camera.CameraEntity
|
||||
import com.mogo.eagle.core.function.api.base.IMoGoFunctionServerProvider
|
||||
|
||||
/**
|
||||
* @author Jing
|
||||
* @description
|
||||
* @since: 10/27/21
|
||||
*/
|
||||
interface IMoGoFuncBizProvider : IMoGoFunctionServerProvider {
|
||||
|
||||
/*----------------------------------------Notice----------------------------------------*/
|
||||
/**
|
||||
* 是否接受交通事故任务
|
||||
* @param infoId
|
||||
@@ -24,6 +22,7 @@ interface IMoGoFuncBizProvider : IMoGoFunctionServerProvider {
|
||||
*/
|
||||
fun requestAccidentInfo(infoId: String, sn: String, callBack: IMoGoNoticeNetCallBack)
|
||||
|
||||
/*----------------------------------------Dispatch----------------------------------------*/
|
||||
/**
|
||||
* 调度确认
|
||||
*/
|
||||
@@ -39,4 +38,17 @@ interface IMoGoFuncBizProvider : IMoGoFunctionServerProvider {
|
||||
* 调度测试
|
||||
*/
|
||||
fun testDispatch(sceneType: Int)
|
||||
|
||||
/*----------------------------------------Monitoring----------------------------------------*/
|
||||
|
||||
val getCameraList: List<CameraEntity>
|
||||
|
||||
fun openCameraStream(cameraIp: String)
|
||||
|
||||
fun openCameraStream(cameraIp: String, success: (String) -> Unit, error: (Throwable) -> Unit)
|
||||
/**
|
||||
* 防止回调摄像头列表View的相关调用
|
||||
*/
|
||||
fun closeCameraLive()
|
||||
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
package com.mogo.eagle.core.function.api.monitoring
|
||||
|
||||
import com.mogo.eagle.core.function.api.base.IMoGoFunctionServerProvider
|
||||
import com.mogo.eagle.core.data.camera.CameraEntity
|
||||
|
||||
/**
|
||||
* @author xiaoyuzhou
|
||||
* @date 2021/10/29 10:35 上午
|
||||
* 超视距功能,路测摄像头,前车摄像头监控
|
||||
*/
|
||||
interface IMoGoMonitoringProvider : IMoGoFunctionServerProvider {
|
||||
val cameraList: List<CameraEntity>?
|
||||
fun openCameraStream(cameraIp: String)
|
||||
fun openCameraStream(cameraIp: String, success: (String) -> Unit, error: (Throwable) -> Unit)
|
||||
/**
|
||||
* 防止回调摄像头列表View的相关调用
|
||||
*/
|
||||
fun disposeCameraStream()
|
||||
}
|
||||
@@ -13,5 +13,4 @@ object CallerFuncBizManager : CallerBase<Any>() {
|
||||
val bizProvider: IMoGoFuncBizProvider
|
||||
get() = getApiInstance(IMoGoFuncBizProvider::class.java, MogoServicePaths.PATH_FUNC_BIZ)
|
||||
|
||||
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
package com.mogo.eagle.core.function.call.monitor
|
||||
|
||||
import com.mogo.eagle.core.data.camera.CameraEntity
|
||||
import com.mogo.eagle.core.data.constants.MogoServicePaths
|
||||
import com.mogo.eagle.core.function.api.monitoring.IMoGoMonitoringProvider
|
||||
import com.mogo.eagle.core.function.call.base.CallerBase
|
||||
|
||||
object CallerMonitorManager {
|
||||
private val providerApi: IMoGoMonitoringProvider
|
||||
get() = CallerBase.getApiInstance(
|
||||
IMoGoMonitoringProvider::class.java,
|
||||
MogoServicePaths.PATH_AI_MONITORING)
|
||||
|
||||
fun getCameraList(): List<CameraEntity>? {
|
||||
return providerApi.cameraList
|
||||
}
|
||||
|
||||
fun openCameraStream(cameraIp: String) {
|
||||
providerApi.openCameraStream(cameraIp)
|
||||
}
|
||||
|
||||
fun openCameraStream(cameraIp: String, success: (String) -> Unit, error: (Throwable) -> Unit) {
|
||||
providerApi.openCameraStream(cameraIp, success, error)
|
||||
}
|
||||
|
||||
fun disposeCameraStream() {
|
||||
providerApi.disposeCameraStream()
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.mogo.eagle.core.function.monitoring;
|
||||
package com.mogo.commons.utils;
|
||||
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
@@ -100,7 +100,6 @@ versionName=2.13.0
|
||||
MOGO_CORE_FUNCTION_HMI_VERSION=0.0.58.10
|
||||
MOGO_CORE_FUNCTION_MAIN_VERSION=0.0.58.10
|
||||
MOGO_CORE_FUNCTION_MAP_VERSION=0.0.58.10
|
||||
MOGO_CORE_FUNCTION_MONITORING_VERSION=0.0.58.10
|
||||
MOGO_CORE_FUNCTION_OBU_MOGO_VERSION=0.0.58.10
|
||||
MOGO_CORE_FUNCTION_SMP_VERSION=0.0.58.10
|
||||
MOGO_CORE_FUNCTION_V2X_VERSION=0.0.58.10
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
:core:function-impl:mogo-core-function-obu-mogo
|
||||
:core:function-impl:mogo-core-function-hmi
|
||||
:core:function-impl:mogo-core-function-map
|
||||
:core:function-impl:mogo-core-function-monitoring
|
||||
:core:function-impl:mogo-core-function-v2x
|
||||
:core:function-impl:mogo-core-function-chat
|
||||
:core:function-impl:mogo-core-function-devatools
|
||||
|
||||
@@ -30,8 +30,6 @@ include ':core:function-impl:mogo-core-function-map'
|
||||
include ':core:function-impl:mogo-core-function-v2x'
|
||||
// 自研OBU业务
|
||||
include ':core:function-impl:mogo-core-function-obu-mogo'
|
||||
// 行车超视距服务,路测摄像头、前车摄像头
|
||||
include ':core:function-impl:mogo-core-function-monitoring'
|
||||
// 绑定车机
|
||||
include ':core:function-impl:mogo-core-function-bindingcar'
|
||||
// 车聊聊业务
|
||||
|
||||
Reference in New Issue
Block a user