Branch Coverage

blib/lib/MP4/Info.pm
Criterion Covered Total %
branch 96 200 48.0


line true false branch
94 0 5 unless my $tags = get_mp4tag($file)
107 0 313 unless my $type = ref $self
111 0 313 unless (exists $$self{'_permitted'}{uc $name})
146 1 0 if $val == 0 or $val == 1
190 0 12 parse_file($file, \%tags) ? :
233 0 5 parse_file($file, \%tags) ? :
347 0 17 unless (defined $file and $file ne '')
353 0 17 if (ref $file) { }
360 0 17 unless (open $fh, "< $file\000")
370 0 17 if (read($fh, $header, 8) != 8 or lc substr($header, 4) ne 'ftyp')
382 0 17 if $err
385 6 11 unless defined $$tags{'CPIL'}
388 17 0 if defined $$tags{'NAM'}
389 17 0 if defined $$tags{'ART'}
390 14 3 if defined $$tags{'ALB'}
391 14 3 if defined $$tags{'DAY'}
392 14 3 if defined $$tags{'CMT'}
393 14 3 if defined $$tags{'GNRE'}
394 14 3 if defined $$tags{'TRKN'}
398 17 0 if defined $$tags{'FREQUENCY'}
399 0 17 defined $$tags{'CPRT'} ? :
400 17 0 unless defined $$tags{'ENCRYPTED'}
403 17 0 if (defined $$tags{'SIZE'} and $$tags{'SIZE'} and defined $$tags{'SECS'} and $$tags{'MM'} + $$tags{'SS'} + $$tags{'MS'})
409 8 9 if ($$tags{'MEAN'} and ref $$tags{'MEAN'} eq 'ARRAY')
442 0 703 if $err
444 0 185 if (tell $fh != $end)
460 0 703 if (read($fh, $header, 8) != 8)
467 0 703 if ($size == 0) { }
0 703 elsif ($size == 1) { }
479 0 0 if (read($fh, $header, 8) != 8)
486 0 0 if ($size > $parentsize)
496 0 703 if ($size > $parentsize)
504 0 703 if ($size < 0)
512 0 703 if $debug
514 194 509 if (defined $data_atoms{$id}) { }
94 415 elsif (defined $other_atoms{$id}) { }
134 281 elsif ($container_atoms{$id}) { }
543 0 17 if (read($fh, $data, $size) != $size)
560 17 3 unless defined $$tags{'SIZE'}
589 0 17 if ($size < 32)
594 0 17 if (read($fh, $data, $size) != $size)
601 17 0 if ($version == 0) { }
0 0 elsif ($version == 1) { }
608 0 0 if $debug
617 0 17 if $debug
638 0 23 if ($size < 44)
643 0 23 if (read($fh, $data, $size) != $size)
650 0 23 if $debug
655 0 6 if ($data_format eq 'mp4a' or $data_format eq 'alac' or $data_format eq 'drms' or $data_format eq 'samr' or $data_format eq 'sawb' or $data_format eq 'sawp' or $data_format eq 'enca')
670 0 17 if $debug
673 0 23 if $data_format eq 'drms' or substr($data_format, 0, 3) eq 'enc'
690 0 0 if (read($fh, $data, $size) != $size)
695 0 0 unless $size > 26
698 0 0 if ($u1 eq 'USMT')
701 0 0 if $debug
702 0 0 unless $pspsize == $size - 16
703 0 0 if ($pspid eq 'MTDT')
710 0 0 if $debug
711 0 0 if ($btype == 1 and $bsize > 12 and $ptype == 1 and not defined $$tags{'NAM'}) { }
0 0 elsif ($btype == 4 and $bsize > 12 and $ptype == 1) { }
737 0 194 if (read($fh, $data, $size) != $size)
745 9 185 if ($id eq 'TITL' or $id eq 'DSCP' or $id eq 'CPRT' or $id eq 'PERF' or $id eq 'AUTH' or $id eq 'GNRE')
753 0 9 if ($ver == 0)
755 0 0 unless $size > 7
760 0 0 if ($id eq 'TITL') { }
0 0 elsif ($id eq 'DSCP') { }
0 0 elsif ($id eq 'PERF') { }
0 0 elsif ($id eq 'AUTH') { }
762 0 0 if defined $$tags{'NAM'}
767 0 0 if defined $$tags{'CMT'}
772 0 0 if defined $$tags{'ART'}
777 0 0 if defined $$tags{'WRT'}
784 16 170 if ($id eq 'MEAN' or $id eq 'NAME' or $id eq 'DATA')
789 8 16 if ($id eq 'DATA') { }
802 170 0 unless (defined $type)
804 0 170 unless $size > 16
808 0 170 unless lc $atom eq 'data'
809 0 170 unless $size > 16
814 0 170 if $debug
816 0 170 if ($id eq 'COVR') { }
34 136 elsif ($type == 0) { }
117 19 elsif ($type == 1) { }
19 0 elsif ($type == 21) { }
824 9 25 if ($id eq 'GNRE') { }
25 0 elsif ($id eq 'DISK' or $id eq 'TRKN') { }
0 0 elsif ($size >= 4) { }
831 25 0 $size >= 6 ? :
25 0 if $size >= 4
844 7 7 $utf8 ? :
103 14 ref $decoder ? :
848 5 112 if ($id eq 'GEN') { }
0 112 elsif ($id eq 'AART') { }
14 98 elsif ($id eq 'DAY') { }
850 0 5 if defined $$tags{'GNRE'}
855 0 0 if defined $$tags{'ART'}
863 0 14 if $data == 0
870 11 8 if ($size == 1) { }
8 0 elsif ($size == 2) { }
0 0 elsif ($size == 4) { }
0 0 elsif ($size == 8) { }