Refacted UDP Socket config and created UAS addon

This commit is contained in:
2026-05-07 03:53:19 -03:00
parent 52edf94b17
commit 6376b7acf0
9 changed files with 225 additions and 45 deletions

View File

@@ -0,0 +1,37 @@
#include "..\script_component.hpp"
params [["_uav", objNull, [objNull]]];
private _defaultVideoUri = "rtsp://irontak.com:554/fpv";
private _activelyControlledUav = if (!isNull player) then {getConnectedUAV player} else {objNull};
private _normalize = {
params ["_rawUrl"];
private _url = trim _rawUrl;
if (_url isEqualTo "") exitWith {""};
if (_url find "://" >= 0) exitWith {_url};
if (_url find "/" >= 0) exitWith {
format ["rtsp://%1", _url]
};
format ["rtp://%1", _url]
};
if (!isNull _uav && {_activelyControlledUav isEqualTo _uav}) then {
private _objectVideoUrl = [_uav] call armatak_fnc_extract_marker_video_url;
private _normalizedObjectVideoUrl = [_objectVideoUrl] call _normalize;
if (_normalizedObjectVideoUrl isNotEqualTo "") exitWith {
_normalizedObjectVideoUrl
};
};
private _sessionVideoUrl = player getVariable [QEGVAR(client,video_feed_url), ""];
private _normalizedSessionVideoUrl = [_sessionVideoUrl] call _normalize;
if (_normalizedSessionVideoUrl isNotEqualTo "") exitWith {
_normalizedSessionVideoUrl
};
_defaultVideoUri