Branch Coverage

blib/lib/Image/ExifTool/M2TS.pm
Criterion Covered Total %
branch 91 302 30.1


line true false branch
256 1 0 if ($$dataPt =~ /\x0b\x77..(.)/gs)
272 0 1 if length $$dataPt < 3
292 0 2 unless defined $type
294 0 2 if ($verbose > 1)
300 0 2 if ($type == 1 or $type == 2) { }
0 2 elsif ($type == 3 or $type == 4) { }
0 2 elsif ($type == 6 and $pid == 768) { }
1 1 elsif ($type == 27) { }
1 0 elsif ($type == 129 or $type == 135 or $type == 145) { }
0 0 elsif ($type == 21) { }
0 0 elsif ($type < 0) { }
312 0 0 if ($$dataPt =~ /^LIGOGPSINFO/s)
324 0 1 if ($et->{'OPTIONS'}{'ExtractEmbedded'}) { }
1 0 elsif (not $et->{'OPTIONS'}{'Validate'}) { }
334 0 0 if ($$dataPt =~ /^.{5}\x06\x0e\x2b\x34/s)
336 0 0 if (not $et->{'OPTIONS'}{'ExtractEmbedded'}) { }
0 0 elsif ($et->{'OPTIONS'}{'ExtractEmbedded'} > 2) { }
351 0 0 if ($$dataPt =~ /^(.{164})?(.{24})A[NS][EW]/s) { }
0 0 elsif ($$dataPt =~ /^(V00|A([NS])([EW]))\0/s) { }
0 0 elsif ($$dataPt =~ /^\$(GPSINFO|GSNRINFO),/) { }
0 0 elsif ($$dataPt =~ /\$GPRMC,/) { }
0 0 elsif ($$dataPt =~ /\$GSENSORD,\s*(\d+),\s*(\d+),\s*(\d+),/) { }
0 0 elsif ($$dataPt =~ /^.{44}A\0{3}.{4}([NS])\0{3}.{4}([EW])\0{3}/s and length $$dataPt >= 84) { }
0 0 elsif (length $$dataPt >= 64 and substr($$dataPt, 32, 2) eq '$S') { }
0 0 elsif ($$dataPt =~ /^skip.{4}LIGOGPSINFO\0/s) { }
0 0 elsif ($et->{'FoundGoodGPS'}) { }
383 0 0 if ($2 ne "V00")
389 0 0 substr($dat, 1, 1) eq 'S' ? :
390 0 0 substr($dat, 2, 1) eq 'W' ? :
397 0 0 if $_ >= 2147483648
412 0 0 if ($line =~ /^\$GPSINFO/) { }
0 0 elsif ($line =~ /^\$GSNRINFO/) { }
414 0 0 unless @a > 7
416 0 0 if $lastTime and $a[2] eq $lastTime
458 0 0 $15 >= 70 ? :
463 0 0 if length $11
464 0 0 if length $12
473 0 0 if $_ < 48 or $_ > 57
475 0 0 if ($bad) { }
481 0 0 $7 eq 'N' ? :
482 0 0 $10 eq 'E' ? :
503 0 0 $1 eq 'S' ? :
504 0 0 $2 eq 'W' ? :
517 0 0 unless substr($$dataPt, $n, 2) eq "\$S"
519 0 0 if $last gt $dateTime
523 0 0 if $n > length($$dataPt) - 32
524 0 0 unless substr($$dataPt, $n, 2) eq "\$S"
527 0 0 if $a[2] & 32768
569 0 1 unless $raf->Read($buff, 383) == 383
571 0 1 unless $buff =~ /^(.{0,190}?)\x47(.{187}|.{191})\x47/s
578 0 1 if $start < 0
582 0 1 unless $raf->Read($buff, $readSize) >= $pLen * 4
585 3 0 if substr($buff, $tcLen + $pLen * $j, 1) eq "G"
586 0 0 if $tcLen
594 1 0 $tcLen ? :
595 0 1 if $start
619 0 1 if (($et->Options('ExtractEmbedded') || 0) > 2)
630 0 8 unless (%needPID)
631 0 0 unless defined $startTime
633 0 0 unless (defined $backScan)
636 0 0 if $et->Options("FastScan")
637 0 0 if $verbose
641 0 0 unless $raf->Seek(0, 2)
648 0 0 if ($nMax < int -$maxBack / $pLen) { }
659 0 8 if (defined $backScan) { }
660 0 0 if defined $endTime
662 0 0 if ($pos < 0)
664 0 0 if $backScan <= $maxBack
666 0 0 if $buffLen > $readSize
668 0 0 unless $raf->Seek($backScan, 2)
669 0 0 unless $raf->Read($buff, $buffLen) == $buffLen
674 1 7 if ($pos + $pLen > length $buff)
675 1 0 unless $raf->Read($buff, $readSize) >= $pLen
684 0 7 unless (($prefix & 4278190080) == 1191182336)
685 0 0 unless defined $backScan
696 0 7 if ($verbose > 1)
700 0 0 $pidName{$pid} ? :
701 0 0 if $pLen == 192
703 0 0 $payload_unit_start_indicator ? :
708 1 6 if ($adaptation_field_exists)
710 0 1 if $pos + $len > $pEnd
712 1 0 if ($len > 6)
714 1 0 if ($flags & 16)
721 1 0 unless defined $startTime
729 1 6 unless $payload_data_exists and not defined $backScan
732 3 3 if ($pid == 0 or defined $pmt{$pid}) { }
3 0 elsif (not defined $didPID{$pid}) { }
737 3 0 if ($payload_unit_start_indicator) { }
741 0 3 if $pos >= $pEnd
746 0 0 unless $sectLen{$pid}
749 0 0 if $size > $more
751 0 0 unless $size == $more
760 0 3 if $pos + 8 > $slen
764 2 1 $pid ? :
765 1 2 unless ($table_id == $expectedID)
766 0 1 if $verbose > 1
773 0 2 unless $section_syntax_indicator == 128
775 0 2 if $section_length > 1021
776 0 2 if ($slen < $section_length + 3)
785 0 2 if ($verbose > 1)
787 0 0 if $pid
788 0 0 unless $pid
794 1 1 if ($pid == 0) { }
802 2 0 unless $didPID{$program_map_PID}
803 0 2 if $verbose
808 0 1 if $pos + 4 > $slen
813 0 1 if $verbose
815 0 1 if $pos + $program_info_length > $slen
817 0 1 if ($verbose > 1)
821 0 0 if $j + $descriptor_length > $program_info_length
833 0 0 $stream_type < 127 ? :
0 2 unless $str
836 0 2 if $verbose
837 2 0 if ($str =~ /(Audio|Video)/)
838 2 0 unless ($pidName{$elementary_pid})
842 2 0 unless $didPID{$elementary_pid}
848 0 2 if $pos + $es_info_length > $slen
854 0 3 if $j + $descriptor_length > $es_info_length
857 0 3 if ($verbose > 1)
863 3 0 unless ($didPID{$pid})
864 1 2 if ($descriptor_tag == 129)
877 2 1 if ($payload_unit_start_indicator) { }
878 0 2 if (defined $data{$pid})
884 0 0 unless ($more)
893 0 2 if $pos + 6 > $pEnd
895 0 2 unless ($start_code & 4294967040) == 256
898 0 2 if ($verbose > 1)
903 2 0 unless ($noSyntax{$stream_id})
904 0 2 if $pos + 3 > $pEnd
907 0 2 unless $syntax == 128
911 0 2 if $pos >= $pEnd
917 1 1 if ($pes_packet_length > 8) { }
923 0 1 unless (defined $data{$pid})
925 0 0 unless $gpsPID{$pid}
934 2 1 if (not $pidType{$pid} or $pidType{$pid} == 27) { }
0 1 elsif ($pidType{$pid} == 21) { }
939 0 0 if defined $packLen{$pid} and $saveLen > $packLen{$pid}
943 0 3 if (length $data{$pid} >= $saveLen)
945 0 0 if $more < 0
947 0 0 unless $more or $fromStart{$pid}
950 0 0 if $more
956 2 0 if ($needPID{$pid})
965 0 1 unless defined $endTime
966 1 0 if (defined $startTime and defined $endTime)
967 0 1 if $startTime > $endTime
971 0 1 if ($verbose)
974 0 0 if $needPID{$_} > 0
976 0 0 if (@need) { }
980 0 0 $eof ? :
993 0 0 if ($et->Options("ExtractEmbedded") and $raf->Seek(-8, 2) and $raf->Read($buff, 8) == 8 and $buff =~ /^&&&&/)
998 0 0 if ($len < $raf->Tell and $raf->Seek(-$len, 2) and $raf->Read($buff, $len) == $len)