bipbip 0.6.19 → 0.6.20
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/bipbip/plugin/janus_rtpbroadcast.rb +6 -6
- data/lib/bipbip/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5172b62b72e5a295a8e1c207e542a1c85bc895be
|
4
|
+
data.tar.gz: d84c068a561ca1fbc40ac41e3ef8ceb392f1dd24
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c25d82cac3eb33051656668e088b941ac35b56216318e3dcdb769a3c80be37a5a498afe022e1da35bb89e357afec2151ae237ace16213720e7e09a8b99385755
|
7
|
+
data.tar.gz: 39907caf4fd5323536ca36393fcc70e2e31631a22afd5531c07185ca6646a480fdd5421b254d133acdb92e63d2301809aadd1e942dec19fb2e3dfdac021c1b9a
|
@@ -23,20 +23,20 @@ module Bipbip
|
|
23
23
|
mountpoints = data['data']['list']
|
24
24
|
streams = mountpoints.map { |mp| mp['streams'] }.flatten
|
25
25
|
|
26
|
-
packet_loss_audio_avg = streams.count != 0 ? streams.map { |s| s['stats']['audio']['packet-loss'] }.reduce(0, :+) / streams.count : 0
|
27
|
-
packet_loss_video_avg = streams.count != 0 ? streams.map { |s| s['stats']['video']['packet-loss'] }.reduce(0, :+) / streams.count : 0
|
26
|
+
packet_loss_audio_avg = streams.count != 0 ? streams.map { |s| s['stats']['audio']['packet-loss'] || 0 }.reduce(0, :+) / streams.count : 0
|
27
|
+
packet_loss_video_avg = streams.count != 0 ? streams.map { |s| s['stats']['video']['packet-loss'] || 0 }.reduce(0, :+) / streams.count : 0
|
28
28
|
|
29
29
|
{
|
30
30
|
'mountpoint_count' => mountpoints.count,
|
31
31
|
'stream_count' => streams.count,
|
32
32
|
'streams_listener_count' => streams.map { |s| s['webrtc-endpoint']['listeners'] }.reduce(0, :+),
|
33
33
|
'streams_waiter_count' => streams.map { |s| s['webrtc-endpoint']['waiters'] }.reduce(0, :+),
|
34
|
-
'streams_bandwidth' => streams.map { |s| s['stats']['video']['bitrate'] + s['stats']['audio']['bitrate'] }.reduce(0, :+),
|
34
|
+
'streams_bandwidth' => streams.map { |s| (s['stats']['video']['bitrate'] || 0) + (s['stats']['audio']['bitrate'] || 0) }.reduce(0, :+),
|
35
35
|
'streams_zero_fps_count' => streams.count { |s| s['frame']['fps'] == 0 },
|
36
|
-
'streams_zero_bitrate_count' => streams.count { |s| s['stats']['video']['bitrate']
|
37
|
-
'streams_packet_loss_audio_max' => streams.map { |s| s['stats']['audio']['packet-loss'] * 100 }.max,
|
36
|
+
'streams_zero_bitrate_count' => streams.count { |s| s['stats']['video']['bitrate'].nil? || s['stats']['video']['bitrate'] == 0 },
|
37
|
+
'streams_packet_loss_audio_max' => streams.map { |s| (s['stats']['audio']['packet-loss'] || 0) * 100 }.max,
|
38
38
|
'streams_packet_loss_audio_avg' => packet_loss_audio_avg * 100,
|
39
|
-
'streams_packet_loss_video_max' => streams.map { |s| s['stats']['video']['packet-loss'] * 100 }.max,
|
39
|
+
'streams_packet_loss_video_max' => streams.map { |s| (s['stats']['video']['packet-loss'] || 0) * 100 }.max,
|
40
40
|
'streams_packet_loss_video_avg' => packet_loss_video_avg * 100
|
41
41
|
}
|
42
42
|
end
|
data/lib/bipbip/version.rb
CHANGED