Branch Coverage

blib/lib/Image/ExifTool/QuickTime.pm
Criterion Covered Total %
branch 330 692 47.6


line true false branch
7988 0 22 if ($Image::ExifTool::QuickTime::AUTOLOAD eq 'Image::ExifTool::QuickTime::Process_mebx') { }
8019 0 5 if $a[0] == 0 and $a[1] == 0
8022 2 3 if $angle < 0
8037 6 5 $i ? :
8039 1 10 unless $value->{$tag}
8040 6 4 unless $value->{$tag} eq "vide"
8044 1 4 unless $track
8047 8 4 $i ? :
8049 0 12 unless $value->{$tag}
8050 8 4 unless $et->GetGroup($tag, 1) eq $track
8067 0 2 unless $a[6] == 0 and $a[7] == 0
8070 1 1 unless $w and $h
8074 0 1 unless defined $angle
8075 0 1 if ($angle == 90) { }
0 1 elsif ($angle == 180) { }
1 0 elsif ($angle == 270) { }
8099 0 21 unless $num and $dur and $et->{'MediaTS'}
8108 34 44 unless $val
8109 44 0 $val & 4293918720 ? :
8120 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*)?)?/) { }
8123 0 0 if $3
8127 0 0 if $1 eq "-"
8129 0 0 if $4 eq "-"
8131 0 0 if $7
8135 0 0 if $1 eq "-"
8137 0 0 if $5 eq "-"
8139 0 0 if $9
8152 0 0 if $size < 9
8157 0 0 if $pos + 9 > $size
8160 0 0 if $pos + 9 + $len > $size
8175 0 0 unless $val =~ /^(\S+) (.*)/
8182 0 0 if ($ss >= 60)
8184 0 0 if ++$m >= 60
8200 0 0 if (defined $v[2])
8201 0 0 $v[2] < 0 ? :
8213 10 0 if ($lang)
8217 10 0 if ($lang =~ /^[a-z]+$/) { }
8219 0 10 if $lang eq 'und' || $lang eq 'eng' and not $noDef
8235 0 6 if $ctry and $ctry <= 255
8236 0 6 if $lang and $lang <= 255
8239 1 5 if ($ctry)
8242 0 1 if $ctry eq "ZZ"
8243 1 0 if ($ctry and $ctry =~ /^[A-Z]{2}$/)
8244 0 1 unless $lang
8259 1 0 if ($langInfo)
8260 1 0 unless $et->{'QTLang'}
8276 0 78 if $pos + $n > $len
8277 0 78 if ($n == 0) { }
78 0 elsif ($n == 4) { }
0 0 elsif ($n == 8) { }
8299 25 215 if ord $ch == 0
8315 0 0 if ($n and $_[1])
8316 0 0 if ($n > 2 and $_[1] & 1) { }
0 0 elsif ($_[1] & 2) { }
8365 3 3 $et->{'IsWriting'} ? :
8368 0 6 if $len < 8
8375 6 0 if ($ver < 2) { }
8379 0 0 if $len < 10
8384 20 0 if ($ver < 2) { }
8385 0 20 if $pos + 2 > $len
8389 0 0 if $pos + 4 > $len
8393 0 20 if ($ver == 1 or $ver == 2)
8394 0 0 if $pos + 2 > $len
8398 0 20 if $pos + 2 > $len
8402 0 20 if $pos + 2 > $len
8407 0 20 if ($ver == 1 or $ver == 2)
8412 0 20 unless defined $extent_length
8416 0 0 defined $items->{$id}{'ConstructionMethod'} ? :
0 20 if $verbose
8433 0 8 if ($et->{'ItemRefVersion'}) { }
8434 0 0 if length $val < 10
8437 0 8 if length $val < 6
8440 0 8 if ($count > @to) { }
0 8 elsif ($count < @to) { }
8442 0 0 $et->{'IsWriting'} ? :
8461 9 11 $et->{'IsWriting'} ? :
8464 0 20 if $len < 4
8467 0 20 if $pos + 4 > $len
8468 0 20 if ($ver == 0 or $ver == 1) { }
8476 20 0 if ($ver == 2) { }
0 0 elsif ($ver == 3) { }
8483 0 20 if $pos + 6 > $len
8489 5 15 if ($type eq 'mime') { }
0 15 elsif ($type eq 'uri ') { }
8498 0 20 if $verbose > 1
8512 3 3 $et->{'IsWriting'} ? :
8515 0 6 if $len < 8
8521 12 0 if ($ver == 0) { }
8522 0 12 if $pos + 3 > $len
8526 0 0 if $pos + 5 > $len
8532 0 12 if ($flg & 1) { }
8533 0 0 if $pos + $n * 2 > $len
8537 0 0 $tmp & 32768 ? :
8541 0 12 if $pos + $n > $len
8545 12 12 $tmp & 128 ? :
8551 0 12 if $verbose > 1
8568 3 42 if ($items and $raf)
8577 0 11 if ($verbose)
8580 0 0 if ($item->{'Extents'} and @{$item->{'Extents'};})
8588 0 11 if $item->{'ContentEncoding'}
8589 0 11 if $item->{'ProtectionIndex'}
8590 0 11 if $item->{'ConstructionMethod'}
8591 0 11 if $warn and $name
8592 0 11 if $item->{'DataReferenceIndex'}
8593 0 11 unless ($item->{'Extents'} and @{$item->{'Extents'};} or $warn)
8595 0 0 if $name
8597 0 11 if ($warn)
8598 0 0 if $verbose > 2
8602 0 11 if ($verbose > 2)
8607 0 0 $verbose > 3 ? :
8611 0 0 if ($more > 0 and $n)
8612 0 0 if $more > $n
8613 0 0 if defined $buff
8614 0 0 unless $raf->Seek($extent->[1] + $base, 0)
8615 0 0 unless $raf->Read($buff, $more)
8619 0 0 if (defined $buff)
8620 0 0 if length $val
8623 0 0 if $snip
8626 6 5 unless $name
8631 0 5 if defined $buff
8632 0 5 unless $raf->Seek($extent->[1] + $base, 0)
8633 1 4 unless $raf->Read($buff, $extent->[2])
8635 0 5 unless defined $buff
8636 0 5 if length $val
8637 1 4 unless length $buff
8640 2 2 if ($name eq 'EXIF' and length $buff >= 4) { }
8641 0 2 if ($buff =~ /^(MM\0\x2a|II\x2a\0)/) { }
0 2 elsif ($buff =~ /^Exif\0\0/) { }
8652 0 2 if ($start > length $buff)
8656 0 2 if ($et->{'HTML_DUMP'})
8658 0 0 if $n
8676 0 4 if (defined $primary and $item->{'RefersTo'} and not $item->{'RefersTo'}{$primary})
8690 3 42 if ($et->{'ItemPropertyContainer'})
8718 0 12 if ($flags == 21 or $flags == 22) { }
0 12 elsif ($flags == 23) { }
0 12 elsif ($flags == 24) { }
0 12 elsif ($flags == 0) { }
8720 0 0 $flags == 21 ? :
0 0 if $format
8741 0 0 unless $dirLen >= 2
8743 0 0 if $verbose
8747 0 0 if $pos + 10 > $dirLen
8749 0 0 if $size < 10 or $size + $pos > $dirLen
8755 0 0 if ($tagInfo)
8759 0 0 if ($lang)
8761 0 0 if $langInfo
8763 0 0 if $verbose
8770 0 0 if $enc == 1
8771 0 0 if ($enc == 0 and $tagInfo->{'Unknown'}) { }
8794 0 38 if $pos + 8 > $dirLen
8800 0 38 if $pos + 8 > $dirLen
8802 0 38 if $pos + $size > $dirLen
8808 0 0 if ($err and $et->{'HandlerType'})
8834 2110 94 if $tag =~ /[^\w ]/
8836 16 78 if ($size + $try == $end)
8842 58 20 if ($size < 8 or $size + $try > $end - 8) { }
8852 16 22 if ($childPos)
8875 0 0 if $tag eq "\0\0\0\0"
8878 0 0 unless ($tagInfo)
8879 0 0 unless $unknown
8888 0 0 unless $tagInfo->{'Format'}
8928 0 9 if ($et->Options("Verbose"))
8939 0 22 if $len < 8 or $pos + $len > $dirLen
8945 22 0 if $ns eq "mdta"
8946 0 22 unless $tag
8950 22 0 if $tagInfo = $et->GetTagInfo($tagTablePtr, $tag)
8952 0 0 if $tagInfo = $et->GetTagInfo($itemList, $tag)
8953 0 0 if $tagInfo = $et->GetTagInfo($userData, $tag)
8955 0 0 if ($tag =~ /^\w{3}\xa9$/)
8957 0 0 if $tagInfo = $et->GetTagInfo($itemList, $tag)
8961 0 0 if ($tag eq $full)
8968 22 0 if ($tagInfo) { }
0 0 elsif ($tag =~ /^[-\w. ]+$/ or $tag =~ /\w{4}/) { }
8979 0 22 defined $tagInfo->{'Writable'} ? :
8981 10 12 $groups ? :
8991 0 0 if length $name < 2
8997 18 4 if (ref $itemList->{$id} eq "HASH")
9000 0 18 if ($oldInfo->{'OtherLang'})
9005 22 0 if ($newInfo)
9008 22 0 unless $msg
9009 0 22 if $out
9025 0 0 if $et->{'OPTIONS'}{'ExtractEmbedded'}
9049 20 363 unless defined $et->{'HandlerType'}
9051 20 363 unless (defined $et->{'KeysCount'})
9056 363 20 unless ($raf)
9058 363 0 if $dirInfo->{'DirLen'}
9061 94 289 if ($dirInfo->{'DirStart'})
9062 0 94 unless $raf->Seek($dirInfo->{'DirStart'}, 1)
9066 0 383 unless $raf->Read($buff, 8) == 8
9068 363 20 if ($tagTablePtr) { }
9074 363 20 if ($dataPt) { }
9075 0 363 if $verbose
9078 0 20 unless $tagTablePtr->{$tag}
9079 11 9 if ($tag eq 'ftyp' and $size >= 12) { }
9082 11 0 if ($raf->Read($buff, $size - 8) == $size - 8)
9087 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) { }
9098 0 11 unless $fileType
9101 4 7 if $fileType eq "CRX"
9108 0 383 if $et->Options("FastScan")
9111 134 249 if ($ee)
9115 22 361 if ($tagTablePtr->{'VARS'})
9121 0 1253 if defined $atomCount and --$atomCount < 0
9122 4 1249 if ($size < 8) { }
9123 0 4 if ($size == 0)
9124 0 0 if ($dataPt) { }
9134 0 0 if ($$tagTablePtr{"$tag-size"})
9138 0 0 if $$tagTablePtr{"$tag-offset"}
9143 0 4 unless $size == 1
9145 0 4 unless $raf->Read($buff, 8) == 8
9148 0 4 if ($hi or $lo > 2147483647)
9149 0 0 if ($hi > 2147483647) { }
0 0 elsif (not $et->Options('LargeFileSupport')) { }
9158 0 4 if $size < 0
9162 0 1253 if ($validate)
9163 0 0 unless $et->{'ValidatePath'}
9165 0 0 if $et->{'SET_GROUP1'}
9166 0 0 if ($et->{'ValidatePath'}{$path} and not $dupTagOK{$tag} and not $dupDirOK{$dirID})
9168 0 0 $i < 255 ? :
9170 0 0 if $path eq "MOV-moov"
9174 0 77 if ($isUserData and $et->{'SET_GROUP1'})
9178 0 0 if (not $tagTablePtr->{$tag} and $tagInfo)
9181 0 0 unless $tagInfo->{$_}
9190 104 1149 if ($eeBox{$handlerType} and $eeBox{$handlerType}{$tag}) { }
0 1149 elsif ($ee and $ee > 1 and $eeBox2{$handlerType} and $eeBox2{$handlerType}{$tag}) { }
9191 68 36 if ($ee) { }
0 72 elsif ($handlerType ne 'vide' and not $et->{'OPTIONS'}{'Validate'}) { }
9193 68 0 if ($tag ne "gps " or $eeBox{$handlerType}{$tag} eq $dirID)
9206 68 1185 if $eeTag
9209 160 1093 unless ($tagInfo)
9211 22 138 if ($tagTablePtr->{$id})
9217 0 88 if (not defined $tagInfo and $et->{'OPTIONS'}{'Unknown'} || $verbose || $tag =~ /^\xa9/)
9221 0 13 if ($name =~ /^xa9(.*)/) { }
9236 23 1230 if ($$tagTablePtr{"$tag-size"})
9238 23 0 if $$tagTablePtr{"$tag-offset"}
9241 0 1253 if ($size > 33554432)
9243 0 0 if ($buff =~ /^(gpsa|gps0|gsen|gsea)...\0/s)
9245 0 0 if ($et->Options('ExtractEmbedded')) { }
9246 0 0 unless $raf->Seek(-8, 1)
9255 0 0 if ($tagInfo and not $tagInfo->{'Unknown'} and not $eeTag)
9257 0 0 if ($size > 134217728) { }
9260 0 0 unless $et->Warn("Skipping '${t}' atom > 32 MB", 2)
9264 1165 88 if (defined $tagInfo and not $ignore) { }
9266 12 1153 if ($et->{'IsItemProperty'})
9271 14 20 unless $items->{$id}{'Association'}
9274 25 12 unless $prop == $index
9275 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) { }
9286 3 0 if not defined $docNum or $docNum > $item->{'DocNum'}
9293 3 9 if (not defined $docNum and defined $lowest)
9303 0 1165 if ($missing)
9309 37 1128 unless $tagInfo
9311 0 1165 if ($verbose and not $hasData)
9313 0 0 if ($tagInfo and $tagInfo->{'Format'})
9322 0 0 $tagInfo ? :
9325 0 0 if ($dirID eq "iref")
9327 0 0 if ($et->{'ItemRefVersion'}) { }
9328 0 0 if length $val >= 10
9330 0 0 if length $val >= 6
9332 0 0 unless defined $id
9333 0 0 if $count != @to
9336 0 0 unless $to[$i - 1] =~ /(\d+)$/ and $to[$i] == $1 + 1
9344 68 1097 if ($eeTag)
9347 28 40 if $tagInfo and $tagInfo->{'Unknown'} and not $unkOpt
9351 9 1128 if ($tagInfo and $tagInfo->{'Triplet'})
9352 3 6 if ($tag eq 'data' and $triplet{'mean'} and $triplet{'name'}) { }
9355 0 3 unless $triplet{'mean'} eq "com.apple.iTunes"
9357 0 3 unless ($tagInfo)
9370 3 0 if length $val >= 8
9371 3 0 unless ($tagInfo->{'Format'} or $tagInfo->{'SubDirectory'})
9373 0 3 if ($val =~ /[^\x20-\x7e]/)
9379 0 3 if $verbose
9381 6 0 if length $val > 4
9385 1131 34 if ($tagInfo)
9387 674 457 if ($subdir) { }
157 300 elsif ($hasData) { }
49 251 elsif ($tag =~ /^\xa9/ or $tagInfo->{'IText'}) { }
9390 0 674 if ($subdir->{'Base'})
9407 0 674 if $tagInfo->{'BlockExtract'}
9408 6 668 if ($subdir->{'ByteOrder'} and $subdir->{'ByteOrder'} =~ /^Little/)
9412 38 636 if ($tagInfo->{'SubDirectory'} and $tagInfo->{'SubDirectory'}{'TagTable'} and $tagInfo->{'SubDirectory'}{'TagTable'} eq "Image::ExifTool::QuickTime::Track")
9415 17 21 unless $track
9421 18 602 unless $proc or $subTable->{'PROCESS_PROC'}
9422 674 0 if ($size > $start)
9424 3 671 if ($tag eq 'ipco' and not $et->{'IsItemProperty'}) { }
9431 38 636 if ($tag eq 'stbl') { }
38 598 elsif ($tag eq 'minf') { }
9433 16 22 if $ee
9444 157 161 if $pos + 16 > $size
9446 0 161 if $pos + $len > $size or not $len
9449 161 0 if ($type eq "data" and $len >= 16)
9458 116 45 if ($Image::ExifTool::QuickTime::stringEncoding{$flags}) { }
9462 116 0 unless $tagInfo->{'Binary'}
9464 12 33 if (not $format) { }
15 18 elsif ($format =~ /^int\d+([us])$/) { }
9469 15 0 if defined $fmt
9471 33 12 if ($format) { }
12 0 elsif (not $tagInfo->{'ValueConv'}) { }
9480 1 160 if ($ctry or $lang)
9482 1 0 if ($langCode)
9486 1 0 if ($langInfo)
9487 1 0 unless $tagInfo->{'OtherLang'}
9492 160 1 unless $langInfo
9493 0 0 ref $value ? :
0 161 if $verbose
9505 22 139 if ($isKey)
9509 161 0 if defined $value
9510 22 139 if $isKey
9516 0 49 if ($tagInfo->{'Format'})
9522 4 94 if ($tagInfo->{'IText'} and $tagInfo->{'IText'} >= 6) { }
9523 2 2 if $pos + $tagInfo->{'IText'} > $size
9529 47 47 if $pos + 4 > $size
9536 0 47 if ($pos + $len > $size)
9538 0 0 if $pos + $len > $size or $len < 0
9542 0 49 if not $len and $pos
9545 49 0 if ($lang < 1024 || $lang == 32767 and not $str =~ /^\xfe\xff/) { }
9548 0 49 if ($lang)
9549 0 0 if ($lang == 32767) { }
9566 0 0 $str =~ s/^\xfe\xff// ? :
9568 48 1 unless ($tagInfo->{'NoDecode'})
9572 1 48 if ($tagInfo->{'IText'} and $tagInfo->{'IText'} > 6)
9577 0 49 if $lang
9583 68 183 if ($format)
9587 0 251 if ($tagInfo->{'SetBase'})
9592 0 251 if defined $oldBase
9594 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)
9599 0 16 if (not ref $$vp and length $$vp <= 65536 and $$vp =~ /[\x80-\xff]/)
9603 0 0 &Image::ExifTool::XMP::IsUTF8($vp) > 0 ? :
9610 0 88 if $verbose
9614 0 82 if ($size and !$raf->Seek($size - 1, 1) || $raf->Read($buff, 1) != 1)
9621 363 890 if $dirEnd and $dataPos >= $dirEnd
9622 20 870 unless $raf->Read($buff, 8) == 8
9624 9 861 if defined $index
9627 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'})
9635 1 19 if ($doDefaultLang and $et->{'QTLang'})
9637 0 1 unless defined $et->{'VALUE'}{$tag}
9638 0 1 unless my $langInfo = $et->{'TAG_INFO'}{$tag}
9639 0 1 unless my $tagInfo = $langInfo->{'SrcTagInfo'}
9646 1 0 if $et->GetGroup($key, 0) eq "QuickTime"
9653 45 338 if $topLevel or $dirID eq "meta"
9655 4 379 if $ee and $topLevel