Branch Coverage

blib/lib/Net/SIP/Simple/RTP.pm
Criterion Covered Total %
branch 61 108 56.4


line true false branch
46 30 0 if UNIVERSAL::isa($sock, 'ARRAY')
48 30 0 if UNIVERSAL::isa($s_sock, 'ARRAY')
51 29 1 if ref $addr
58 1503 1801 unless my($buf, $mpt, $seq, $tstamp, $ssrc, $csrc) = _receive_rtp($sock, $writeto, $targs, $didit, $channel)
64 50 1751 unless $s_sock and $remote
67 0 1751 if (@pkt and $pkt[0] ne '')
73 0 1751 if $delay < 0
94 30 0 if $rb
102 0 0 if ($$didit) { }
154 14 0 if ($sock)
155 14 0 if UNIVERSAL::isa($sock, 'ARRAY')
160 2924 3407 unless defined $buf
183 14 0 if ref $addr
184 14 0 if ($addr and my $s_sock = $ssocks->[$i])
185 14 0 if UNIVERSAL::isa($s_sock, 'ARRAY')
204 14 0 if ($sock)
206 14 0 if $rb
208 14 0 if $timer
216 0 0 if ($$didit) { }
249 4427 5208 if not $from && defined $buf or $buf eq ''
263 0 5208 if ($version != 2)
272 0 5208 $vpxcc & 16 ? :
273 0 5208 if $xh
276 0 5208 $vpxcc & 32 ? :
277 0 5208 $padding ? :
281 0 5208 if ($targs->{'ssrc'} and $targs->{'ssrc'} != $ssrc)
285 0 5188 if (defined $targs->{'rseq'} and $seq <= $targs->{'rseq'} and $targs->{'rseq'} - $seq < 60000)
292 1801 3407 if (ref $writeto) { }
0 3407 elsif ($writeto) { }
298 0 0 unless ($fd)
299 0 0 unless open $fd, '>', $writeto
305 4208 1000 if (my $xt = $targs->{'dtmf_xtract'})
307 72 4136 if (my($event, $duration) = &$sub($packet))
313 1801 3407 wantarray ? :
343 1307 2213 if (@pkt and $pkt[0] ne '')
353 2213 0 if (ref $readfrom) { }
356 12 2201 unless ($buf)
358 12 0 if $timer
362 0 2201 if ref $buf
368 0 0 unless ($fd)
369 0 0 if $targs->{'repeat'} < 0
370 0 0 if ($targs->{'repeat'} == 0)
373 0 0 if $timer
378 0 0 unless open $fd, '<', $readfrom
382 0 0 if read($fd, $buf, $size) == $size
390 0 2201 if not defined $buf or $buf eq ''
400 2201 0 unless defined $rtp_event
401 2201 0 unless defined $payload_type
429 3856 1415 unless $dtmfs and @$dtmfs
433 1487 12 if (my $duration = $dtmf->{'duration'})
436 48 36 defined $dtmf->{'event'} ? :
1403 84 $dtmf->{'sub'} ? :
442 1403 84 if @pkt
445 12 84 if (my $cb = $dtmf->{'cb_final'})