mirror of
https://github.com/kerberos-io/agent.git
synced 2025-09-27 04:26:33 +08:00
Add Liveview chunking configuration and update WebRTC SDP handling
This commit is contained in:
@@ -392,6 +392,11 @@ func OverrideWithEnvironmentVariables(configuration *models.Configuration) {
|
|||||||
configuration.Config.MQTTPassword = value
|
configuration.Config.MQTTPassword = value
|
||||||
break
|
break
|
||||||
|
|
||||||
|
/* MQTT chunking of low-resolution images into multiple messages */
|
||||||
|
case "AGENT_LIVEVIEW_CHUNKING":
|
||||||
|
configuration.Config.LiveviewChunking = value
|
||||||
|
break
|
||||||
|
|
||||||
/* Real-time streaming of keyframes to a MQTT topic */
|
/* Real-time streaming of keyframes to a MQTT topic */
|
||||||
case "AGENT_REALTIME_PROCESSING":
|
case "AGENT_REALTIME_PROCESSING":
|
||||||
configuration.Config.RealtimeProcessing = value
|
configuration.Config.RealtimeProcessing = value
|
||||||
|
@@ -47,6 +47,7 @@ type Config struct {
|
|||||||
ConditionURI string `json:"condition_uri" bson:"condition_uri"`
|
ConditionURI string `json:"condition_uri" bson:"condition_uri"`
|
||||||
Encryption *Encryption `json:"encryption,omitempty" bson:"encryption,omitempty"`
|
Encryption *Encryption `json:"encryption,omitempty" bson:"encryption,omitempty"`
|
||||||
Signing *Signing `json:"signing,omitempty" bson:"signing,omitempty"`
|
Signing *Signing `json:"signing,omitempty" bson:"signing,omitempty"`
|
||||||
|
LiveviewChunking string `json:"liveview_chunking,omitempty" bson:"liveview_chunking,omitempty"`
|
||||||
RealtimeProcessing string `json:"realtimeprocessing,omitempty" bson:"realtimeprocessing,omitempty"`
|
RealtimeProcessing string `json:"realtimeprocessing,omitempty" bson:"realtimeprocessing,omitempty"`
|
||||||
RealtimeProcessingTopic string `json:"realtimeprocessing_topic" bson:"realtimeprocessing_topic"`
|
RealtimeProcessingTopic string `json:"realtimeprocessing_topic" bson:"realtimeprocessing_topic"`
|
||||||
}
|
}
|
||||||
|
@@ -281,7 +281,8 @@ func InitializeWebRTCConnection(configuration *models.Configuration, communicati
|
|||||||
candateBinary, err := json.Marshal(candateJSON)
|
candateBinary, err := json.Marshal(candateJSON)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
valueMap["candidate"] = string(candateBinary)
|
valueMap["candidate"] = string(candateBinary)
|
||||||
valueMap["sdp"] = []byte(base64.StdEncoding.EncodeToString([]byte(answer.SDP)))
|
// SDP is not needed to be send..
|
||||||
|
//valueMap["sdp"] = []byte(base64.StdEncoding.EncodeToString([]byte(answer.SDP)))
|
||||||
valueMap["session_id"] = handshake.SessionID
|
valueMap["session_id"] = handshake.SessionID
|
||||||
} else {
|
} else {
|
||||||
log.Log.Info("webrtc.main.InitializeWebRTCConnection(): something went wrong while marshalling candidate: " + err.Error())
|
log.Log.Info("webrtc.main.InitializeWebRTCConnection(): something went wrong while marshalling candidate: " + err.Error())
|
||||||
|
Reference in New Issue
Block a user