Branch Coverage

blib/lib/Image/ExifTool/QuickTime.pm
Criterion Covered Total %
branch 335 712 47.0


line true false branch
8112 0 22 if ($Image::ExifTool::QuickTime::AUTOLOAD eq 'Image::ExifTool::QuickTime::Process_mebx') { }
8131 1 0 if abs $cos < "1e-12"
8132 0 1 if abs $sin < "1e-12"
8146 0 5 if $a[0] == 0 and $a[1] == 0
8149 2 3 if $angle < 0
8164 6 5 $i ? :
8166 1 10 unless $value->{$tag}
8167 6 4 unless $value->{$tag} eq "vide"
8171 1 4 unless $track
8174 8 4 $i ? :
8176 0 12 unless $value->{$tag}
8177 8 4 unless $et->GetGroup($tag, 1) eq $track
8194 0 2 unless $a[6] == 0 and $a[7] == 0
8197 1 1 unless $w and $h
8201 0 1 unless defined $angle
8202 0 1 if ($angle == 90) { }
0 1 elsif ($angle == 180) { }
1 0 elsif ($angle == 270) { }
8226 0 21 unless $num and $dur and $et->{'MediaTS'}
8235 34 44 unless $val
8236 44 0 $val & 4293918720 ? :
8247 0 0 if ($val =~ /^([-+]\d{1,2}(?:\.\d*)?)([-+]\d{1,3}(?:\.\d*)?)([-+]\d+(?:\.\d*)?)?/) { }
0 0 elsif ($val =~ /^([-+])(\d{2})(\d{2}(?:\.\d*)?)([-+])(\d{3})(\d{2}(?:\.\d*)?)([-+]\d+(?:\.\d*)?)?/) { }
0 0 elsif ($val =~ /^([-+])(\d{2})(\d{2})(\d{2}(?:\.\d*)?)([-+])(\d{3})(\d{2})(\d{2}(?:\.\d*)?)([-+]\d+(?:\.\d*)?)?/) { }
8250 0 0 if $3
8254 0 0 if $1 eq "-"
8256 0 0 if $4 eq "-"
8258 0 0 if $7
8262 0 0 if $1 eq "-"
8264 0 0 if $5 eq "-"
8266 0 0 if $9
8279 0 0 if $size < 9
8284 0 0 if $pos + 9 > $size
8287 0 0 if $pos + 9 + $len > $size
8302 0 0 unless $val =~ /^(\S+) (.*)/
8309 0 0 if ($ss >= 60)
8311 0 0 if ++$m >= 60
8327 0 0 if (defined $v[2])
8328 0 0 $v[2] < 0 ? :
8340 10 0 if ($lang)
8344 10 0 if ($lang =~ /^[a-z]+$/) { }
8346 0 10 if $lang eq 'und' || $lang eq 'eng' and not $noDef
8362 0 6 if $ctry and $ctry <= 255
8363 0 6 if $lang and $lang <= 255
8366 1 5 if ($ctry)
8369 0 1 if $ctry eq "ZZ"
8370 1 0 if ($ctry and $ctry =~ /^[A-Z]{2}$/)
8371 0 1 unless $lang
8386 1 0 if ($langInfo)
8387 1 0 unless $et->{'QTLang'}
8403 0 78 if $pos + $n > $len
8404 0 78 if ($n == 0) { }
78 0 elsif ($n == 4) { }
0 0 elsif ($n == 8) { }
8426 25 215 if ord $ch == 0
8442 0 0 if ($n and $_[1])
8443 0 0 if ($n > 2 and $_[1] & 1) { }
0 0 elsif ($_[1] & 2) { }
8492 3 3 $et->{'IsWriting'} ? :
8495 0 6 if $len < 8
8502 6 0 if ($ver < 2) { }
8506 0 0 if $len < 10
8511 20 0 if ($ver < 2) { }
8512 0 20 if $pos + 2 > $len
8516 0 0 if $pos + 4 > $len
8520 0 20 if ($ver == 1 or $ver == 2)
8521 0 0 if $pos + 2 > $len
8525 0 20 if $pos + 2 > $len
8529 0 20 if $pos + 2 > $len
8534 0 20 if ($ver == 1 or $ver == 2)
8539 0 20 unless defined $extent_length
8543 0 0 defined $items->{$id}{'ConstructionMethod'} ? :
0 20 if $verbose
8560 0 8 if ($et->{'ItemRefVersion'}) { }
8561 0 0 if length $val < 10
8564 0 8 if length $val < 6
8567 0 8 if ($count > @to) { }
0 8 elsif ($count < @to) { }
8569 0 0 $et->{'IsWriting'} ? :
8588 9 11 $et->{'IsWriting'} ? :
8591 0 20 if $len < 4
8594 0 20 if $pos + 4 > $len
8595 0 20 if ($ver == 0 or $ver == 1) { }
8603 20 0 if ($ver == 2) { }
0 0 elsif ($ver == 3) { }
8610 0 20 if $pos + 6 > $len
8616 5 15 if ($type eq 'mime') { }
0 15 elsif ($type eq 'uri ') { }
8625 0 20 if $verbose > 1
8639 3 3 $et->{'IsWriting'} ? :
8642 0 6 if $len < 8
8648 12 0 if ($ver == 0) { }
8649 0 12 if $pos + 3 > $len
8653 0 0 if $pos + 5 > $len
8659 0 12 if ($flg & 1) { }
8660 0 0 if $pos + $n * 2 > $len
8664 0 0 $tmp & 32768 ? :
8668 0 12 if $pos + $n > $len
8672 12 12 $tmp & 128 ? :
8678 0 12 if $verbose > 1
8695 3 42 if ($items and $raf)
8704 0 11 if ($verbose)
8707 0 0 if ($item->{'Extents'} and @{$item->{'Extents'};})
8715 0 11 if $item->{'ContentEncoding'}
8716 0 11 if $item->{'ProtectionIndex'}
8717 0 11 if $item->{'ConstructionMethod'}
8718 0 11 if $warn and $name
8719 0 11 if $item->{'DataReferenceIndex'}
8720 0 11 unless ($item->{'Extents'} and @{$item->{'Extents'};} or $warn)
8722 0 0 if $name
8724 0 11 if ($warn)
8725 0 0 if $verbose > 2
8729 0 11 if ($verbose > 2)
8734 0 0 $verbose > 3 ? :
8738 0 0 if ($more > 0 and $n)
8739 0 0 if $more > $n
8740 0 0 if defined $buff
8741 0 0 unless $raf->Seek($extent->[1] + $base, 0)
8742 0 0 unless $raf->Read($buff, $more)
8746 0 0 if (defined $buff)
8747 0 0 if length $val
8750 0 0 if $snip
8753 6 5 unless $name
8758 0 5 if defined $buff
8759 0 5 unless $raf->Seek($extent->[1] + $base, 0)
8760 1 4 unless $raf->Read($buff, $extent->[2])
8762 0 5 unless defined $buff
8763 0 5 if length $val
8764 1 4 unless length $buff
8767 2 2 if ($name eq 'EXIF' and length $buff >= 4) { }
0 2 elsif ($name eq 'PreviewImage') { }
8768 0 2 if ($buff =~ /^(MM\0\x2a|II\x2a\0)/) { }
0 2 elsif ($buff =~ /^Exif\0\0/) { }
8779 0 2 if ($start > length $buff)
8783 0 2 if ($et->{'HTML_DUMP'})
8785 0 0 if $n
8794 0 0 if ($buff =~ /^.{556}\xff\xc0\0\x11.(.{4})/s)
8797 0 0 if ($w == 160 or $h == 160) { }
0 0 elsif ($w == 1920 or $h == 1920) { }
8818 0 4 if (defined $primary and $item->{'RefersTo'} and not $item->{'RefersTo'}{$primary})
8832 3 42 if ($et->{'ItemPropertyContainer'})
8860 0 12 if ($flags == 21 or $flags == 22) { }
0 12 elsif ($flags == 23) { }
0 12 elsif ($flags == 24) { }
0 12 elsif ($flags == 0) { }
8862 0 0 $flags == 21 ? :
0 0 if $format
8883 0 0 unless $dirLen >= 2
8885 0 0 if $verbose
8889 0 0 if $pos + 10 > $dirLen
8891 0 0 if $size < 10 or $size + $pos > $dirLen
8897 0 0 if ($tagInfo)
8901 0 0 if ($lang)
8903 0 0 if $langInfo
8905 0 0 if $verbose
8912 0 0 if $enc == 1
8913 0 0 if ($enc == 0 and $tagInfo->{'Unknown'}) { }
8936 0 38 if $pos + 8 > $dirLen
8942 0 38 if $pos + 8 > $dirLen
8944 0 38 if $pos + $size > $dirLen
8950 0 0 if ($err and $et->{'HandlerType'})
8976 2110 94 if $tag =~ /[^\w ]/
8978 16 78 if ($size + $try == $end)
8984 58 20 if ($size < 8 or $size + $try > $end - 8) { }
8994 16 22 if ($childPos)
9017 0 0 if $tag eq "\0\0\0\0"
9020 0 0 unless ($tagInfo)
9021 0 0 unless $unknown
9030 0 0 unless $tagInfo->{'Format'}
9070 0 9 if ($et->Options("Verbose"))
9081 0 22 if $len < 8 or $pos + $len > $dirLen
9087 22 0 if $ns eq "mdta"
9088 0 22 unless $tag
9092 22 0 if $tagInfo = $et->GetTagInfo($tagTablePtr, $tag)
9094 0 0 if $tagInfo = $et->GetTagInfo($itemList, $tag)
9095 0 0 if $tagInfo = $et->GetTagInfo($userData, $tag)
9097 0 0 if ($tag =~ /^\w{3}\xa9$/)
9099 0 0 if $tagInfo = $et->GetTagInfo($itemList, $tag)
9103 0 0 if ($tag eq $full)
9110 22 0 if ($tagInfo) { }
0 0 elsif ($tag =~ /^[-\w. ]+$/ or $tag =~ /\w{4}/) { }
9121 0 22 defined $tagInfo->{'Writable'} ? :
9123 10 12 $groups ? :
9133 0 0 if length $name < 2
9139 18 4 if (ref $itemList->{$id} eq "HASH")
9142 0 18 if ($oldInfo->{'OtherLang'})
9147 22 0 if ($newInfo)
9150 22 0 unless $msg
9151 0 22 if $out
9167 0 0 if $et->{'OPTIONS'}{'ExtractEmbedded'}
9191 20 363 unless defined $et->{'HandlerType'}
9193 20 363 unless (defined $et->{'KeysCount'})
9198 363 20 unless ($raf)
9200 363 0 if $dirInfo->{'DirLen'}
9203 94 289 if ($dirInfo->{'DirStart'})
9204 0 94 unless $raf->Seek($dirInfo->{'DirStart'}, 1)
9208 0 383 unless $raf->Read($buff, 8) == 8
9210 363 20 if ($tagTablePtr) { }
9216 363 20 if ($dataPt) { }
9217 0 363 if $verbose
9220 0 20 unless $tagTablePtr->{$tag}
9221 11 9 if ($tag eq 'ftyp' and $size >= 12) { }
9224 11 0 if ($raf->Read($buff, $size - 8) == $size - 8)
9229 11 0 if ($ftypLookup{$type} and $ftypLookup{$type} =~ /\(\.(\w+)/) { }
0 0 elsif ($buff =~ /^.{8}(.{4})+(mp41|mp42|avc1)/s) { }
0 0 elsif ($buff =~ /^.{8}(.{4})+(f4v )/s) { }
0 0 elsif ($buff =~ /^.{8}(.{4})+(qt )/s) { }
9240 0 11 unless $fileType
9243 4 7 if $fileType eq "CRX"
9251 0 383 if $fast
9254 134 249 if ($ee)
9258 22 361 if ($tagTablePtr->{'VARS'})
9264 0 1253 if defined $atomCount and --$atomCount < 0
9265 4 1249 if ($size < 8) { }
9266 0 4 if ($size == 0)
9267 0 0 if ($dataPt) { }
9277 0 0 if ($$tagTablePtr{"$tag-size"})
9279 0 0 unless ($fast)
9283 0 0 if $$tagTablePtr{"$tag-offset"}
9288 0 4 unless $size == 1
9290 0 4 unless $raf->Read($buff, 8) == 8
9293 0 4 if ($hi or $lo > 2147483647)
9294 0 0 if ($hi > 2147483647) { }
0 0 elsif (not $et->Options('LargeFileSupport')) { }
9303 0 4 if $size < 0
9307 0 1253 if ($validate)
9308 0 0 unless $et->{'ValidatePath'}
9310 0 0 if $et->{'SET_GROUP1'}
9311 0 0 if ($et->{'ValidatePath'}{$path} and not $dupTagOK{$tag} and not $dupDirOK{$dirID})
9313 0 0 $i < 255 ? :
9315 0 0 if $path eq "MOV-moov"
9319 0 77 if ($isUserData and $et->{'SET_GROUP1'})
9323 0 0 if (not $tagTablePtr->{$tag} and $tagInfo)
9326 0 0 unless $tagInfo->{$_}
9335 104 1149 if ($eeBox{$handlerType} and $eeBox{$handlerType}{$tag}) { }
0 1149 elsif ($ee and $ee > 1 and $eeBox2{$handlerType} and $eeBox2{$handlerType}{$tag}) { }
9336 68 36 if ($ee) { }
0 72 elsif ($handlerType ne 'vide' and not $et->{'OPTIONS'}{'Validate'}) { }
9338 68 0 if ($tag ne "gps " or $eeBox{$handlerType}{$tag} eq $dirID)
9351 68 1185 if $eeTag
9354 160 1093 unless ($tagInfo)
9356 22 138 if ($tagTablePtr->{$id})
9362 0 88 if (not defined $tagInfo and $et->{'OPTIONS'}{'Unknown'} || $verbose || $tag =~ /^\xa9/)
9366 0 13 if ($name =~ /^xa9(.*)/) { }
9381 23 1230 if ($$tagTablePtr{"$tag-size"})
9383 23 0 if $$tagTablePtr{"$tag-offset"}
9386 0 0 if $fast > 1 and $tag eq 'mdat' || $tag eq 'idat'
9388 0 1253 if ($size > 33554432)
9390 0 0 if ($buff =~ /^(gpsa|gps0|gsen|gsea)...\0/s)
9392 0 0 if ($et->Options('ExtractEmbedded')) { }
9393 0 0 unless $raf->Seek(-8, 1)
9402 0 0 if ($tagInfo and not $tagInfo->{'Unknown'} and not $eeTag)
9404 0 0 if ($size > 134217728) { }
9407 0 0 unless $et->Warn("Skipping '${t}' atom > 32 MB", 2)
9411 1165 88 if (defined $tagInfo and not $ignore) { }
9413 12 1153 if ($et->{'IsItemProperty'})
9418 16 18 unless $items->{$id}{'Association'}
9421 21 12 unless $prop == $index
9422 6 6 if ($id == $primary or not $dontInherit{$tag} and !$item->{'RefersTo'} || $item->{'RefersTo'}{$primary}) { }
3 3 elsif ($item->{'DocNum'}) { }
3 0 elsif (not defined $lowest or $lowest > $id) { }
9433 3 0 if not defined $docNum or $docNum > $item->{'DocNum'}
9440 3 9 if (not defined $docNum and defined $lowest)
9450 0 1165 if ($missing)
9456 37 1128 unless $tagInfo
9458 0 1165 if ($verbose and not $hasData)
9460 0 0 if ($tagInfo and $tagInfo->{'Format'})
9469 0 0 $tagInfo ? :
9472 0 0 if ($dirID eq "iref")
9474 0 0 if ($et->{'ItemRefVersion'}) { }
9475 0 0 if length $val >= 10
9477 0 0 if length $val >= 6
9479 0 0 unless defined $id
9480 0 0 if $count != @to
9483 0 0 unless $to[$i - 1] =~ /(\d+)$/ and $to[$i] == $1 + 1
9491 68 1097 if ($eeTag)
9494 28 40 if $tagInfo and $tagInfo->{'Unknown'} and not $unkOpt
9498 9 1128 if ($tagInfo and $tagInfo->{'Triplet'})
9499 3 6 if ($tag eq 'data' and $triplet{'mean'} and $triplet{'name'}) { }
9502 0 3 unless $triplet{'mean'} eq "com.apple.iTunes"
9504 0 3 unless ($tagInfo)
9517 3 0 if length $val >= 8
9518 3 0 unless ($tagInfo->{'Format'} or $tagInfo->{'SubDirectory'})
9520 0 3 if ($val =~ /[^\x20-\x7e]/)
9526 0 3 if $verbose
9528 6 0 if length $val > 4
9532 1131 34 if ($tagInfo)
9534 674 457 if ($subdir) { }
157 300 elsif ($hasData) { }
49 251 elsif ($tag =~ /^\xa9/ or $tagInfo->{'IText'}) { }
9537 0 674 if ($subdir->{'Base'})
9554 0 674 if $tagInfo->{'BlockExtract'}
9555 6 668 if ($subdir->{'ByteOrder'} and $subdir->{'ByteOrder'} =~ /^Little/)
9559 38 636 if ($tagInfo->{'SubDirectory'} and $tagInfo->{'SubDirectory'}{'TagTable'} and $tagInfo->{'SubDirectory'}{'TagTable'} eq "Image::ExifTool::QuickTime::Track")
9562 17 21 unless $track
9568 18 602 unless $proc or $subTable->{'PROCESS_PROC'}
9569 674 0 if ($size > $start)
9571 3 671 if ($tag eq 'ipco' and not $et->{'IsItemProperty'}) { }
9578 38 636 if ($tag eq 'stbl') { }
38 598 elsif ($tag eq 'minf') { }
9580 16 22 if $ee
9591 157 161 if $pos + 16 > $size
9593 0 161 if $pos + $len > $size or not $len
9596 161 0 if ($type eq "data" and $len >= 16)
9605 116 45 if ($Image::ExifTool::QuickTime::stringEncoding{$flags}) { }
9609 116 0 unless $tagInfo->{'Binary'}
9611 12 33 if (not $format) { }
15 18 elsif ($format =~ /^int\d+([us])$/) { }
9616 15 0 if defined $fmt
9618 33 12 if ($format) { }
12 0 elsif (not $tagInfo->{'ValueConv'}) { }
9627 1 160 if ($ctry or $lang)
9629 1 0 if ($langCode)
9633 1 0 if ($langInfo)
9634 1 0 unless $tagInfo->{'OtherLang'}
9639 160 1 unless $langInfo
9640 0 0 ref $value ? :
0 161 if $verbose
9652 22 139 if ($isKey)
9656 161 0 if defined $value
9657 22 139 if $isKey
9663 0 49 if ($tagInfo->{'Format'})
9669 4 94 if ($tagInfo->{'IText'} and $tagInfo->{'IText'} >= 6) { }
9670 2 2 if $pos + $tagInfo->{'IText'} > $size
9676 47 47 if $pos + 4 > $size
9683 0 47 if ($pos + $len > $size)
9685 0 0 if $pos + $len > $size or $len < 0
9689 0 49 if not $len and $pos
9692 49 0 if ($lang < 1024 || $lang == 32767 and not $str =~ /^\xfe\xff/) { }
9695 0 49 if ($lang) { }
9696 0 0 if ($lang == 32767) { }
9708 0 49 if &Image::ExifTool::IsUTF8(\$str) > 0
9712 49 0 unless $enc
9717 0 0 $str =~ s/^\xfe\xff// ? :
9719 48 1 unless ($tagInfo->{'NoDecode'})
9723 1 48 if ($tagInfo->{'IText'} and $tagInfo->{'IText'} > 6)
9728 0 49 if $lang
9734 68 183 if ($format)
9738 0 251 if ($tagInfo->{'SetBase'})
9743 0 251 if defined $oldBase
9745 20 0 if (defined $key and !$format || $format =~ /^string/ and not $tagInfo->{'Unknown'} and not $tagInfo->{'ValueConv'} and not $tagInfo->{'Binary'} and defined $et->{'VALUE'}{$key} and not ref $val)
9750 0 16 if (not ref $$vp and length $$vp <= 65536 and $$vp =~ /[\x80-\xff]/)
9753 0 0 &Image::ExifTool::IsUTF8($vp) > 0 ? :
9760 0 88 if $verbose
9764 0 82 if ($size and !$raf->Seek($size - 1, 1) || $raf->Read($buff, 1) != 1)
9771 363 890 if $dirEnd and $dataPos >= $dirEnd
9772 20 870 unless $raf->Read($buff, 8) == 8
9774 9 861 if defined $index
9777 0 0 if ($topLevel and $et->{'VALUE'}{'FileType'} and $et->{'VALUE'}{'FileType'} eq "MP4" and $et->{'save_ftyp'} and $et->{'HasHandler'} and $et->{'save_ftyp'} =~ /^(iso|dash)/ and $et->{'HasHandler'}{'soun'} and not $et->{'HasHandler'}{'vide'})
9785 1 19 if ($doDefaultLang and $et->{'QTLang'})
9787 0 1 unless defined $et->{'VALUE'}{$tag}
9788 0 1 unless my $langInfo = $et->{'TAG_INFO'}{$tag}
9789 0 1 unless my $tagInfo = $langInfo->{'SrcTagInfo'}
9796 1 0 if $et->GetGroup($key, 0) eq "QuickTime"
9803 45 338 if $topLevel or $dirID eq "meta"
9805 4 379 if $ee and $topLevel