Former-commit-id: f669b6a67f417fd70e456a83f3b1112e898ee2ef
TangShanKaiPing
wanggang 6 years ago
parent 2fb1172e32
commit eaddb73dbd

@ -144,9 +144,9 @@ namespace IoTNode.DeviceServices.Onvif
this.UpdateData(deviceRepo, device, device.CreateData("Record", "否", DeviceDataType.String, "录像")); this.UpdateData(deviceRepo, device, device.CreateData("Record", "否", DeviceDataType.String, "录像"));
this.UpdateData(deviceRepo, device, device.CreateData("ffmpeg.file", file, DeviceDataType.String, "ffmpeg路径", hidden: true)); this.UpdateData(deviceRepo, device, device.CreateData("ffmpeg.file", file, DeviceDataType.String, "ffmpeg路径", hidden: true));
this.UpdateData(deviceRepo, device, device.CreateData("ffmpeg.args", this._cfg["ffmpeg.args"], DeviceDataType.String, "ffmpeg.args", hidden: true)); this.UpdateData(deviceRepo, device, device.CreateData("ffmpeg.args", this._cfg["ffmpeg.args"], DeviceDataType.String, "ffmpeg.args", hidden: true));
this.UpdateData(deviceRepo, device, device.CreateData("rtmp", $"rtmp://{this._cfg["stream.rtmp"]}/live/{ipCamera.Id}", DeviceDataType.String, "rtmp")); //this.UpdateData(deviceRepo, device, device.CreateData("rtmp", $"rtmp://{this._cfg["stream.rtmp"]}/live/{ipCamera.Id}", DeviceDataType.String, "rtmp"));
this.UpdateData(deviceRepo, device, device.CreateData("flv", $"http://{this._cfg["stream.flv"]}/live/{ipCamera.Id}.flv", DeviceDataType.String, "flv")); //this.UpdateData(deviceRepo, device, device.CreateData("flv", $"http://{this._cfg["stream.flv"]}/live/{ipCamera.Id}.flv", DeviceDataType.String, "flv"));
this.UpdateData(deviceRepo, device, device.CreateData("hls", $"http://{this._cfg["stream.hls"]}/live/{ipCamera.Id}.m3u8", DeviceDataType.String, "hls")); //this.UpdateData(deviceRepo, device, device.CreateData("hls", $"http://{this._cfg["stream.hls"]}/live/{ipCamera.Id}.m3u8", DeviceDataType.String, "hls"));
} }
var profiles = this._onvifDeviceManagement.GetProfiles(ipCamera.DeviceUrl, ipCamera.MediaUrl); var profiles = this._onvifDeviceManagement.GetProfiles(ipCamera.DeviceUrl, ipCamera.MediaUrl);
var needAuth = false; var needAuth = false;
@ -318,7 +318,7 @@ namespace IoTNode.DeviceServices.Onvif
var rtspUrl = $"rtsp://{(needAuth ? $"{camera.UserName}:{camera.Password}@" : "")}{streamUri.Substring(7)}"; var rtspUrl = $"rtsp://{(needAuth ? $"{camera.UserName}:{camera.Password}@" : "")}{streamUri.Substring(7)}";
var fileName = $"ffmpeg-{Helper.Instance.GetRunTime()}{(RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? ".exe" : "")}"; var fileName = $"ffmpeg-{Helper.Instance.GetRunTime()}{(RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? ".exe" : "")}";
var file = camera.GetData("ffmpeg.file")?.Value; var file = camera.GetData("ffmpeg.file")?.Value;
var rtmp = camera.Data.FirstOrDefault(o => o.Key == "rtmp").Value; var rtmp = $"rtmp://{this._cfg["stream.rtmp"]}/live/{camera.Number}"; //camera.Data.FirstOrDefault(o => o.Key == "rtmp").Value;
Console.WriteLine(file); Console.WriteLine(file);
var arguments = camera.Data.FirstOrDefault(o => o.Key == "ffmpeg.args").Value; var arguments = camera.Data.FirstOrDefault(o => o.Key == "ffmpeg.args").Value;
Process process = null; Process process = null;

@ -35,7 +35,7 @@ namespace IoTNode
new EFConfigurationValue { Id = "server.urls", Value= "http://*:8002" }, new EFConfigurationValue { Id = "server.urls", Value= "http://*:8002" },
new EFConfigurationValue { Id = "notify:enabled", Value= "true"}, new EFConfigurationValue { Id = "notify:enabled", Value= "true"},
new EFConfigurationValue { Id = "notify:host", Value= $"{host}:8011"}, new EFConfigurationValue { Id = "notify:host", Value= $"{host}:8011"},
new EFConfigurationValue { Id = "timer.seconds", Value="600"}, new EFConfigurationValue { Id = "timer.seconds", Value="300"},
new EFConfigurationValue { Id = "onvif.timer", Value="1"}, new EFConfigurationValue { Id = "onvif.timer", Value="1"},
new EFConfigurationValue { Id = "onvif.speed", Value="0.2"}, new EFConfigurationValue { Id = "onvif.speed", Value="0.2"},
new EFConfigurationValue { Id = "camera.usr", Value="admin"}, new EFConfigurationValue { Id = "camera.usr", Value="admin"},

@ -258,8 +258,8 @@
}, },
computed: { computed: {
url: function () { url: function () {
//return location.protocol + '//' + location.hostname + location.pathname + 'music.flv'; return location.protocol + '//' + location.hostname + '/live/' + this.device.number + '.flv';
return getDeviceDataValue(this.device, 'flv'); //return getDeviceDataValue(this.device, 'flv');
}, },
isFlvSupported: function () { isFlvSupported: function () {
return flvjs.isSupported(); return flvjs.isSupported();

Loading…
Cancel
Save