|
@@ -14,6 +14,22 @@ function ntvMsg(msg){
|
14
|
14
|
|
15
|
15
|
return msg;
|
16
|
16
|
}
|
|
17
|
+
|
|
18
|
+//获取正在直播的ssrc列表
|
|
19
|
+function getSsrcs(req, res) {
|
|
20
|
+ let result = { code: 0, err_desc: 'OK' };
|
|
21
|
+ var arr = [];
|
|
22
|
+ this.ssrcs.forEach(function (obj, ssrc) {
|
|
23
|
+ obj.ssrc = ssrc;
|
|
24
|
+ arr.push(obj);
|
|
25
|
+ });
|
|
26
|
+ result.code = 0;
|
|
27
|
+ result.data = {};
|
|
28
|
+ result.data.count=arr.length;
|
|
29
|
+ result.data.items = arr;
|
|
30
|
+ res.json(result);
|
|
31
|
+}
|
|
32
|
+
|
17
|
33
|
//获取所有SIP会话
|
18
|
34
|
function getSessions(req, res, next) {
|
19
|
35
|
let result = { code: 0, err_desc: 'OK' ,data:{}};
|
|
@@ -298,4 +314,4 @@ function _prefixInteger(num, m) {
|
298
|
314
|
return (Array(m).join(0) + num).slice(-m);
|
299
|
315
|
}
|
300
|
316
|
|
301
|
|
-module.exports = { getCatalog: getCatalog, realplay: realplay, getSessions: getSessions, playback: playback, ptzControl: ptzControl, playControl: playControl, recordQuery: recordQuery, closeStream: closeStream }
|
|
317
|
+module.exports = { getSsrcs: getSsrcs, getCatalog: getCatalog, realplay: realplay, getSessions: getSessions, playback: playback, ptzControl: ptzControl, playControl: playControl, recordQuery: recordQuery, closeStream: closeStream }
|