exiftool_vendored 13.06.0 → 13.08.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. checksums.yaml +4 -4
  2. data/bin/Changes +29 -3
  3. data/bin/META.json +1 -1
  4. data/bin/META.yml +1 -1
  5. data/bin/README +2 -2
  6. data/bin/exiftool +6 -5
  7. data/bin/lib/Image/ExifTool/AIFF.pm +1 -1
  8. data/bin/lib/Image/ExifTool/APE.pm +1 -1
  9. data/bin/lib/Image/ExifTool/ASF.pm +1 -1
  10. data/bin/lib/Image/ExifTool/BuildTagLookup.pm +4 -3
  11. data/bin/lib/Image/ExifTool/Canon.pm +19 -1
  12. data/bin/lib/Image/ExifTool/DJI.pm +1 -1
  13. data/bin/lib/Image/ExifTool/Exif.pm +2 -2
  14. data/bin/lib/Image/ExifTool/FITS.pm +2 -2
  15. data/bin/lib/Image/ExifTool/FLIF.pm +2 -2
  16. data/bin/lib/Image/ExifTool/FlashPix.pm +11 -11
  17. data/bin/lib/Image/ExifTool/Font.pm +1 -1
  18. data/bin/lib/Image/ExifTool/HP.pm +1 -1
  19. data/bin/lib/Image/ExifTool/ID3.pm +3 -3
  20. data/bin/lib/Image/ExifTool/IPTC.pm +2 -2
  21. data/bin/lib/Image/ExifTool/InDesign.pm +1 -1
  22. data/bin/lib/Image/ExifTool/Jpeg2000.pm +6 -6
  23. data/bin/lib/Image/ExifTool/M2TS.pm +39 -9
  24. data/bin/lib/Image/ExifTool/MXF.pm +2 -2
  25. data/bin/lib/Image/ExifTool/Matroska.pm +1 -1
  26. data/bin/lib/Image/ExifTool/Microsoft.pm +1 -1
  27. data/bin/lib/Image/ExifTool/PDF.pm +15 -15
  28. data/bin/lib/Image/ExifTool/PLIST.pm +1 -1
  29. data/bin/lib/Image/ExifTool/PNG.pm +4 -4
  30. data/bin/lib/Image/ExifTool/Panasonic.pm +1 -1
  31. data/bin/lib/Image/ExifTool/PhaseOne.pm +3 -3
  32. data/bin/lib/Image/ExifTool/Photoshop.pm +63 -3
  33. data/bin/lib/Image/ExifTool/Protobuf.pm +4 -4
  34. data/bin/lib/Image/ExifTool/QuickTime.pm +23 -14
  35. data/bin/lib/Image/ExifTool/QuickTimeStream.pl +336 -91
  36. data/bin/lib/Image/ExifTool/README +4 -1
  37. data/bin/lib/Image/ExifTool/RIFF.pm +3 -3
  38. data/bin/lib/Image/ExifTool/RTF.pm +1 -1
  39. data/bin/lib/Image/ExifTool/Ricoh.pm +3 -3
  40. data/bin/lib/Image/ExifTool/Sony.pm +2 -2
  41. data/bin/lib/Image/ExifTool/TagInfoXML.pm +4 -3
  42. data/bin/lib/Image/ExifTool/TagLookup.pm +6979 -6970
  43. data/bin/lib/Image/ExifTool/TagNames.pod +26 -5
  44. data/bin/lib/Image/ExifTool/VCard.pm +2 -2
  45. data/bin/lib/Image/ExifTool/Validate.pm +3 -3
  46. data/bin/lib/Image/ExifTool/WriteExif.pl +2 -2
  47. data/bin/lib/Image/ExifTool/WriteQuickTime.pl +4 -4
  48. data/bin/lib/Image/ExifTool/WriteXMP.pl +2 -2
  49. data/bin/lib/Image/ExifTool/Writer.pl +16 -16
  50. data/bin/lib/Image/ExifTool/XMP.pm +9 -9
  51. data/bin/lib/Image/ExifTool/ZIP.pm +1 -1
  52. data/bin/lib/Image/ExifTool.pm +58 -57
  53. data/bin/lib/Image/ExifTool.pod +1 -1
  54. data/bin/perl-Image-ExifTool.spec +1 -1
  55. data/lib/exiftool_vendored/version.rb +1 -1
  56. metadata +2 -2
@@ -2525,7 +2525,7 @@ sub ReadMXFValue($$$)
2525
2525
  } elsif ($type =~ /(Array|Batch)/ and $len > 16) {
2526
2526
  my ($count, $size) = unpack('NN', $val);
2527
2527
  # validate data length
2528
- $len == 8 + $count * $size or $et->WarnOnce("Bad array or batch size");
2528
+ $len == 8 + $count * $size or $et->Warn("Bad array or batch size");
2529
2529
  my ($i, @a);
2530
2530
  for ($i=0; $i<$count; ++$i) {
2531
2531
  my $pos = 8 + $i * $size;
@@ -2626,7 +2626,7 @@ sub ProcessLocalSet($$$)
2626
2626
  $extra = sprintf(', Local 0x%.4x', $loc);
2627
2627
  } else {
2628
2628
  $tag = $loc;
2629
- # $et->WarnOnce('Missing local key for at least one tag');
2629
+ # $et->Warn('Missing local key for at least one tag');
2630
2630
  $extra = ', NOT IN PRIMER!';
2631
2631
  }
2632
2632
  my $tagInfo = $$tagTablePtr{$tag};
@@ -1097,7 +1097,7 @@ sub ProcessMKV($$)
1097
1097
  if ($more >= 0x80000000) {
1098
1098
  last unless $et->Options('LargeFileSupport');
1099
1099
  if ($et->Options('LargeFileSupport') eq '2') {
1100
- $et->WarnOnce('Processing large block (LargeFileSupport is 2)');
1100
+ $et->Warn('Processing large block (LargeFileSupport is 2)');
1101
1101
  }
1102
1102
  }
1103
1103
  $raf->Seek($more, 1) or last;
@@ -907,7 +907,7 @@ sub WriteXtraValue($$$)
907
907
  $type = 72;
908
908
  }
909
909
  } else {
910
- $et->WarnOnce("Error converting value for Microsoft:$$tagInfo{Name}");
910
+ $et->Warn("Error converting value for Microsoft:$$tagInfo{Name}");
911
911
  }
912
912
  SetByteOrder('MM');
913
913
  if (defined $type) {
@@ -1215,7 +1215,7 @@ sub DecodeStream($$)
1215
1215
  # be sure we can process all the filters before we take the time to do the decryption
1216
1216
  foreach $filter (@filters) {
1217
1217
  next if $supportedFilter{$filter};
1218
- $et->WarnOnce("Unsupported Filter $filter");
1218
+ $et->Warn("Unsupported Filter $filter");
1219
1219
  return 0;
1220
1220
  }
1221
1221
  # apply decryption first if required (and if the default encryption
@@ -1244,7 +1244,7 @@ sub DecodeStream($$)
1244
1244
  if (ref $decodeParms eq 'HASH') {
1245
1245
  $pre = $$decodeParms{Predictor};
1246
1246
  if ($pre and $pre ne '1' and $pre ne '12') {
1247
- $et->WarnOnce("FlateDecode Predictor $pre currently not supported");
1247
+ $et->Warn("FlateDecode Predictor $pre currently not supported");
1248
1248
  return 0;
1249
1249
  }
1250
1250
  }
@@ -1259,7 +1259,7 @@ sub DecodeStream($$)
1259
1259
  return 0;
1260
1260
  }
1261
1261
  } else {
1262
- $et->WarnOnce('Install Compress::Zlib to process filtered streams');
1262
+ $et->Warn('Install Compress::Zlib to process filtered streams');
1263
1263
  return 0;
1264
1264
  }
1265
1265
  next unless $pre and $pre eq '12'; # 12 = 'up' prediction
@@ -1268,7 +1268,7 @@ sub DecodeStream($$)
1268
1268
  my $cols = $$decodeParms{Columns};
1269
1269
  unless ($cols) {
1270
1270
  # currently only support 'up' prediction
1271
- $et->WarnOnce('No Columns for decoding stream');
1271
+ $et->Warn('No Columns for decoding stream');
1272
1272
  return 0;
1273
1273
  }
1274
1274
  my @bytes = unpack('C*', $$dict{_stream});
@@ -1276,7 +1276,7 @@ sub DecodeStream($$)
1276
1276
  my $buff = '';
1277
1277
  while (@bytes > $cols) {
1278
1278
  unless (($_ = shift @bytes) == 2) {
1279
- $et->WarnOnce("Unsupported PNG filter $_"); # (yes, PNG)
1279
+ $et->Warn("Unsupported PNG filter $_"); # (yes, PNG)
1280
1280
  return 0;
1281
1281
  }
1282
1282
  foreach (@pre) {
@@ -1296,11 +1296,11 @@ sub DecodeStream($$)
1296
1296
  my $name = $$decodeParms{Name};
1297
1297
  next unless defined $name or $name eq 'Identity';
1298
1298
  if ($name ne 'StdCF') {
1299
- $et->WarnOnce("Unsupported Crypt Filter $name");
1299
+ $et->Warn("Unsupported Crypt Filter $name");
1300
1300
  return 0;
1301
1301
  }
1302
1302
  unless ($cryptInfo) {
1303
- $et->WarnOnce('Missing Encrypt StdCF entry');
1303
+ $et->Warn('Missing Encrypt StdCF entry');
1304
1304
  return 0;
1305
1305
  }
1306
1306
  # decrypt the stream manually because we want to:
@@ -1318,15 +1318,15 @@ sub DecodeStream($$)
1318
1318
  # make sure we don't have any unsupported decoding parameters
1319
1319
  if (ref $decodeParms eq 'HASH') {
1320
1320
  if ($$decodeParms{Predictor}) {
1321
- $et->WarnOnce("LZWDecode Predictor $$decodeParms{Predictor} currently not supported");
1321
+ $et->Warn("LZWDecode Predictor $$decodeParms{Predictor} currently not supported");
1322
1322
  return 0;
1323
1323
  } elsif ($$decodeParms{EarlyChange}) {
1324
- $et->WarnOnce("LZWDecode EarlyChange currently not supported");
1324
+ $et->Warn("LZWDecode EarlyChange currently not supported");
1325
1325
  return 0;
1326
1326
  }
1327
1327
  }
1328
1328
  unless (DecodeLZW(\$$dict{_stream})) {
1329
- $et->WarnOnce('LZW decompress error');
1329
+ $et->Warn('LZW decompress error');
1330
1330
  return 0;
1331
1331
  }
1332
1332
 
@@ -1362,7 +1362,7 @@ sub DecodeStream($$)
1362
1362
  last if $_ eq '~';
1363
1363
  # (both $n and $val are zero again now)
1364
1364
  }
1365
- $err and $et->WarnOnce("ASCII85Decode error $err");
1365
+ $err and $et->Warn("ASCII85Decode error $err");
1366
1366
  $$dict{_stream} = pack('C*', @out);
1367
1367
  }
1368
1368
  }
@@ -1830,7 +1830,7 @@ sub ProcessDict($$$$;$$)
1830
1830
 
1831
1831
  $nesting = ($nesting || 0) + 1;
1832
1832
  if ($nesting > 50) {
1833
- $et->WarnOnce('Nesting too deep (directory ignored)');
1833
+ $et->Warn('Nesting too deep (directory ignored)');
1834
1834
  return;
1835
1835
  }
1836
1836
  # save entire dictionary for rewriting if specified
@@ -1990,7 +1990,7 @@ sub ProcessDict($$$$;$$)
1990
1990
  if ($$tagInfo{IgnoreDuplicates}) {
1991
1991
  my $flag = "ProcessedPDF_$tag";
1992
1992
  if ($$et{$flag}) {
1993
- next if $et->WarnOnce("Ignored duplicate $tag dictionary", 2);
1993
+ next if $et->Warn("Ignored duplicate $tag dictionary", 2);
1994
1994
  } else {
1995
1995
  $$et{$flag} = 1;
1996
1996
  }
@@ -2171,9 +2171,9 @@ sub ProcessDict($$$$;$$)
2171
2171
  my $type = $$dict{Type} || '';
2172
2172
  if ($type ne '/Metadata' or $$dict{Length} > 100000) {
2173
2173
  if ($$et{OPTIONS}{IgnoreMinorErrors}) {
2174
- $et->WarnOnce("Decrypting large $$tagInfo{Name} (will be slow)");
2174
+ $et->Warn("Decrypting large $$tagInfo{Name} (will be slow)");
2175
2175
  } else {
2176
- $et->WarnOnce("Skipping large AES-encrypted $$tagInfo{Name}", 2);
2176
+ $et->Warn("Skipping large AES-encrypted $$tagInfo{Name}", 2);
2177
2177
  last;
2178
2178
  }
2179
2179
  }
@@ -269,7 +269,7 @@ sub ExtractObject($$;$)
269
269
  if ($type == 13) { # dict
270
270
  # prevent infinite recursion
271
271
  if (defined $parent and length $parent > 1000) {
272
- $et->WarnOnce('Possible deep recursion while parsing PLIST');
272
+ $et->Warn('Possible deep recursion while parsing PLIST');
273
273
  return undef;
274
274
  }
275
275
  my $tagTablePtr = $$plistInfo{TagTablePtr};
@@ -965,7 +965,7 @@ sub FoundPNG($$$$;$$$$)
965
965
  my $processed;
966
966
  if ($$tagInfo{SubDirectory}) {
967
967
  if ($$et{OPTIONS}{Validate} and $$tagInfo{NonStandard}) {
968
- $et->WarnOnce("Non-standard $$tagInfo{NonStandard} in PNG $tag chunk", 1);
968
+ $et->Warn("Non-standard $$tagInfo{NonStandard} in PNG $tag chunk", 1);
969
969
  }
970
970
  my $subdir = $$tagInfo{SubDirectory};
971
971
  my $dirName = $$subdir{DirName} || $tagName;
@@ -1471,7 +1471,7 @@ sub ProcessPNG($$)
1471
1471
 
1472
1472
  if ($wasEnd) {
1473
1473
  last unless $n; # stop now if normal end of PNG
1474
- $et->WarnOnce("Trailer data after $fileType $endChunk chunk", 1);
1474
+ $et->Warn("Trailer data after $fileType $endChunk chunk", 1);
1475
1475
  $wasTrailer = 1;
1476
1476
  last if $n < 8;
1477
1477
  $$et{SET_GROUP1} = 'Trailer';
@@ -1500,7 +1500,7 @@ sub ProcessPNG($$)
1500
1500
  } elsif ($hdrChunk eq 'IHDR' and $chunk eq 'CgBI') {
1501
1501
  $et->Warn('Non-standard PNG image (Apple iPhone format)');
1502
1502
  } else {
1503
- $et->WarnOnce("$fileType image did not start with $hdrChunk");
1503
+ $et->Warn("$fileType image did not start with $hdrChunk");
1504
1504
  }
1505
1505
  }
1506
1506
  if ($outfile and ($isDatChunk{$chunk} or $chunk eq $endChunk) and @txtOffset) {
@@ -1594,7 +1594,7 @@ sub ProcessPNG($$)
1594
1594
  } else {
1595
1595
  $msg = 'fixed';
1596
1596
  }
1597
- $et->WarnOnce("Text/EXIF chunk(s) found after $$et{FileType} $wasDat ($msg)", 1);
1597
+ $et->Warn("Text/EXIF chunk(s) found after $$et{FileType} $wasDat ($msg)", 1);
1598
1598
  }
1599
1599
  # read chunk data and CRC
1600
1600
  unless ($raf->Read($dbuf,$len)==$len and $raf->Read($cbuf, 4)==4) {
@@ -2802,7 +2802,7 @@ sub ProcessLeicaTrailer($;$)
2802
2802
  }
2803
2803
  } else { # M (Type 240)
2804
2804
  # scan for the lens type (M writes 114 bytes of garbage first)
2805
- if ($buff =~ /\G.{114}([\x20-\x7f]*\0*)/sg and length($1) >= 50) {
2805
+ if ($buff =~ /\G.{114}([\x20-\x7e]*\0*)/sg and length($1) >= 50) {
2806
2806
  $expect = 114;
2807
2807
  }
2808
2808
  }
@@ -450,7 +450,7 @@ sub WritePhaseOne($$$)
450
450
 
451
451
  return undef if $dirLen < 12;
452
452
  unless ($$tagTablePtr{VARS} and $$tagTablePtr{VARS}{ENTRY_SIZE}) {
453
- $et->WarnOnce("No ENTRY_SIZE for $$tagTablePtr{TABLE_NAME}");
453
+ $et->Warn("No ENTRY_SIZE for $$tagTablePtr{TABLE_NAME}");
454
454
  return undef;
455
455
  }
456
456
  my $entrySize = $$tagTablePtr{VARS}{ENTRY_SIZE};
@@ -591,7 +591,7 @@ sub ProcessPhaseOne($$$)
591
591
 
592
592
  return 0 if $dirLen < 12;
593
593
  unless ($$tagTablePtr{VARS} and $$tagTablePtr{VARS}{ENTRY_SIZE}) {
594
- $et->WarnOnce("No ENTRY_SIZE for $$tagTablePtr{TABLE_NAME}");
594
+ $et->Warn("No ENTRY_SIZE for $$tagTablePtr{TABLE_NAME}");
595
595
  return undef;
596
596
  }
597
597
  my $entrySize = $$tagTablePtr{VARS}{ENTRY_SIZE};
@@ -632,7 +632,7 @@ sub ProcessPhaseOne($$$)
632
632
  $formatSize = Get32u($dataPt, $entry+4);
633
633
  $formatStr = $formatName[$formatSize];
634
634
  unless ($formatStr) {
635
- $et->WarnOnce("Unrecognized $ifdType format size $formatSize",1);
635
+ $et->Warn("Unrecognized $ifdType format size $formatSize",1);
636
636
  $formatSize = 1;
637
637
  $formatStr = 'undef';
638
638
  }
@@ -28,11 +28,12 @@ use strict;
28
28
  use vars qw($VERSION $AUTOLOAD $iptcDigestInfo %printFlags);
29
29
  use Image::ExifTool qw(:DataAccess :Utils);
30
30
 
31
- $VERSION = '1.71';
31
+ $VERSION = '1.72';
32
32
 
33
33
  sub ProcessPhotoshop($$$);
34
34
  sub WritePhotoshop($$$);
35
35
  sub ProcessLayers($$$);
36
+ sub ProcessChannelOptions($$$);
36
37
 
37
38
  # PrintFlags bit definitions (ref forum13785)
38
39
  %printFlags = (
@@ -322,7 +323,13 @@ my %unicodeString = (
322
323
  0x0432 => { Unknown => 1, Name => 'MeasurementScale' }, #7
323
324
  0x0433 => { Unknown => 1, Name => 'TimelineInfo' }, #7
324
325
  0x0434 => { Unknown => 1, Name => 'SheetDisclosure' }, #7
325
- 0x0435 => { Unknown => 1, Name => 'ChannelOptions' }, #7/forum16762
326
+ 0x0435 => {
327
+ Name => 'ChannelOptions', #7/forum16762
328
+ SubDirectory => {
329
+ TagTable => 'Image::ExifTool::Photoshop::ChannelOptions',
330
+ Start => 4,
331
+ },
332
+ },
326
333
  0x0436 => { Unknown => 1, Name => 'OnionSkins' }, #7
327
334
  0x0438 => { Unknown => 1, Name => 'CountInfo' }, #7
328
335
  0x043a => { Unknown => 1, Name => 'PrintInfo2' }, #7
@@ -350,6 +357,40 @@ my %unicodeString = (
350
357
  0x2710 => { Unknown => 1, Name => 'PrintFlagsInfo' },
351
358
  );
352
359
 
360
+ # Photoshop channel options (ref forum16762)
361
+ %Image::ExifTool::Photoshop::ChannelOptions = (
362
+ PROCESS_PROC => \&ProcessChannelOptions,
363
+ VARS => { IS_BINARY => 1 },
364
+ GROUPS => { 2 => 'Image' },
365
+ 0 => {
366
+ Name => 'ChannelColorSpace',
367
+ Format => 'int16u',
368
+ PrintConv => {
369
+ 0 => 'RGB',
370
+ 1 => 'HSB',
371
+ 2 => 'CMYK',
372
+ 7 => 'Lab',
373
+ 8 => 'Grayscale',
374
+ },
375
+ },
376
+ 2 => {
377
+ Name => 'ChannelColorData',
378
+ Format => 'int16u[4]',
379
+ },
380
+ 11 => {
381
+ Name => 'ChannelOpacity',
382
+ PrintConv => '"$val%"',
383
+ },
384
+ 12 => {
385
+ Name => 'ChannelColorIndicates',
386
+ PrintConv => {
387
+ 0 => 'Selected Areas',
388
+ 1 => 'Masked Areas',
389
+ 2 => 'Spot Color',
390
+ },
391
+ },
392
+ );
393
+
353
394
  # Photoshop JPEG quality record (ref 2)
354
395
  %Image::ExifTool::Photoshop::JPEG_Quality = (
355
396
  PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
@@ -755,6 +796,25 @@ sub ProcessLayersAndMask($$$)
755
796
  return $raf->Seek($end, 0) ? 1 : 0;
756
797
  }
757
798
 
799
+ #------------------------------------------------------------------------------
800
+ # Process Photoshop channel options (ref forum16762)
801
+ # Inputs: 0) ExifTool ref, 1) DirInfo ref, 2) tag table ref
802
+ # Returns: 1 on success
803
+ sub ProcessChannelOptions($$$)
804
+ {
805
+ my ($et, $dirInfo, $tagTablePtr) = @_;
806
+ my $end = $$dirInfo{DirStart} + $$dirInfo{DirLen};
807
+ $$dirInfo{DirLen} = 13;
808
+ my $i;
809
+ for ($i=0; $$dirInfo{DirStart} + 13 <= $end; ++$i) {
810
+ $$et{SET_GROUP1} = "Channel$i";
811
+ $et->ProcessBinaryData($dirInfo, $tagTablePtr);
812
+ $$dirInfo{DirStart} += 13;
813
+ }
814
+ delete $$et{SET_GROUP1};
815
+ return 1;
816
+ }
817
+
758
818
  #------------------------------------------------------------------------------
759
819
  # Process Photoshop layers (beginning with layer count)
760
820
  # Inputs: 0) ExifTool ref, 1) DirInfo ref, 2) tag table ref
@@ -1050,7 +1110,7 @@ sub ProcessPhotoshop($$$)
1050
1110
  if ($$et{VALUE}{IPTCDigest} and $$et{VALUE}{CurrentIPTCDigest} and
1051
1111
  $$et{VALUE}{IPTCDigest} ne $$et{VALUE}{CurrentIPTCDigest})
1052
1112
  {
1053
- $et->WarnOnce('IPTCDigest is not current. XMP may be out of sync');
1113
+ $et->Warn('IPTCDigest is not current. XMP may be out of sync');
1054
1114
  }
1055
1115
  delete $$et{LOW_PRIORITY_DIR}{'*'};
1056
1116
  return $success;
@@ -127,7 +127,7 @@ sub ProcessProtobuf($$$;$)
127
127
  my $pos = $$dirInfo{Pos};
128
128
  last if $pos >= length $$dataPt;
129
129
  my ($buff, $id, $type) = ReadRecord($dirInfo);
130
- defined $buff or $et->WarnOnce('Protobuf format error'), last;
130
+ defined $buff or $et->Warn('Protobuf format error'), last;
131
131
  if ($type == 2 and $buff =~ /\.proto$/) {
132
132
  # save protocol name separately for directory type
133
133
  $$et{ProtocolName}{$dirName} = substr($buff, 0, -6);
@@ -145,7 +145,7 @@ sub ProcessProtobuf($$$;$)
145
145
  if ($type == 2 and $$tagInfo{Unknown}) {
146
146
  if ($$tagInfo{IsProtobuf}) {
147
147
  $$tagInfo{IsProtobuf} = 0 unless IsProtobuf(\$buff);
148
- } elsif (not defined $$tagInfo{IsProtobuf} and $buff =~ /[^\x20-\x7f]/ and
148
+ } elsif (not defined $$tagInfo{IsProtobuf} and $buff =~ /[^\x20-\x7e]/ and
149
149
  IsProtobuf(\$buff))
150
150
  {
151
151
  $$tagInfo{IsProtobuf} = 1;
@@ -175,7 +175,7 @@ sub ProcessProtobuf($$$;$)
175
175
  my %subdir = ( DataPt => \$buff, Base => $addr, DirName => $dirName );
176
176
  ProcessProtobuf($et, \%subdir, $tagTbl, "$prefix$id-");
177
177
  next;
178
- } elsif ($buff !~ /[^\x20-\x7f]/) {
178
+ } elsif ($buff !~ /[^\x20-\x7e]/) {
179
179
  $val = $buff; # assume this is an ASCII string
180
180
  } elsif (length($buff) % 4) {
181
181
  $val = '0x' . unpack('H*', $buff);
@@ -201,7 +201,7 @@ sub ProcessProtobuf($$$;$)
201
201
  );
202
202
  }
203
203
  # warn if we didn't finish exactly at the end of the buffer
204
- $et->WarnOnce('Truncated protobuf data') unless $prefix or $$dirInfo{Pos} == length $$dataPt;
204
+ $et->Warn('Truncated protobuf data') unless $prefix or $$dirInfo{Pos} == length $$dataPt;
205
205
  return 1;
206
206
  }
207
207
 
@@ -69,8 +69,9 @@ sub Process_gps0($$$);
69
69
  sub Process_gsen($$$);
70
70
  sub Process_gdat($$$);
71
71
  sub Process_nbmt($$$);
72
+ sub ProcessLigoGPS($$$;$);
73
+ sub ProcessLigoJSON($$$);
72
74
  sub ProcessKenwood($$$);
73
- sub ProcessLIGO_JSON($$$);
74
75
  sub ProcessRIFFTrailer($$$);
75
76
  sub ProcessTTAD($$$);
76
77
  sub ProcessNMEA($$$);
@@ -255,7 +256,7 @@ my %timeInfo = (
255
256
  my $offset = (66 * 365 + 17) * 24 * 3600;
256
257
  return $val - $offset if $val >= $offset or $$self{OPTIONS}{QuickTimeUTC};
257
258
  if ($val and not $$self{IsWriting}) {
258
- $self->WarnOnce('Patched incorrect time zero for QuickTime date/time tag',1);
259
+ $self->Warn('Patched incorrect time zero for QuickTime date/time tag',1);
259
260
  }
260
261
  return $val;
261
262
  },
@@ -584,6 +585,14 @@ my %userDefined = (
584
585
  Condition => '$$valPt =~ /^\0[\0-\x04]..[a-zA-Z ]{4}/s',
585
586
  SubDirectory => { TagTable => 'Image::ExifTool::QuickTime::SkipInfo' },
586
587
  },
588
+ {
589
+ Name => 'LigoGPSInfo',
590
+ Condition => '$$valPt =~ /^LIGOGPSINFO\0/',
591
+ SubDirectory => {
592
+ TagTable => 'Image::ExifTool::QuickTime::Stream',
593
+ ProcessProc => \&ProcessLigoGPS,
594
+ },
595
+ },
587
596
  { Name => 'Skip', Unknown => 1, Binary => 1 },
588
597
  ],
589
598
  wide => { Unknown => 1, Binary => 1 },
@@ -677,7 +686,7 @@ my %userDefined = (
677
686
  Condition => '$$valPt=~/^\xef\xe1\x58\x9a\xbb\x77\x49\xef\x80\x95\x27\x75\x9e\xb1\xdc\x6f/',
678
687
  Notes => 'raw 360Fly sensor data without ExtractEmbedded option',
679
688
  RawConv => q{
680
- $self->WarnOnce('Use the ExtractEmbedded option to decode timed SensorData',3);
689
+ $self->Warn('Use the ExtractEmbedded option to decode timed SensorData',3);
681
690
  return \$val;
682
691
  },
683
692
  },
@@ -762,11 +771,11 @@ my %userDefined = (
762
771
  ProcessProc => \&ProcessKenwood,
763
772
  },
764
773
  },{
765
- Name => 'LIGO_JSON',
774
+ Name => 'LigoJSON',
766
775
  Condition => '$$valPt =~ /^LIGOGPSINFO \{/',
767
776
  SubDirectory => {
768
777
  TagTable => 'Image::ExifTool::QuickTime::Stream',
769
- ProcessProc => \&ProcessLIGO_JSON,
778
+ ProcessProc => \&ProcessLigoJSON,
770
779
  },
771
780
  },{
772
781
  Name => 'FLIRData',
@@ -1303,7 +1312,7 @@ my %userDefined = (
1303
1312
  Condition => '$$valPt=~/^\x9b\x63\x0f\x8d\x63\x74\x40\xec\x82\x04\xbc\x5f\xf5\x09\x17\x28/',
1304
1313
  Notes => 'Garmin GPS sensor data',
1305
1314
  RawConv => q{
1306
- $self->WarnOnce('Use the ExtractEmbedded option to decode timed Garmin GPS',3);
1315
+ $self->Warn('Use the ExtractEmbedded option to decode timed Garmin GPS',3);
1307
1316
  return \$val;
1308
1317
  },
1309
1318
  },
@@ -1407,7 +1416,7 @@ my %userDefined = (
1407
1416
  if ($val >= $offset or $$self{OPTIONS}{QuickTimeUTC}) {
1408
1417
  $val -= $offset;
1409
1418
  } elsif ($val and not $$self{IsWriting}) {
1410
- $self->WarnOnce('Patched incorrect time zero for QuickTime date/time tag',1);
1419
+ $self->Warn('Patched incorrect time zero for QuickTime date/time tag',1);
1411
1420
  }
1412
1421
  return $$self{CreateDate} = $val;
1413
1422
  },
@@ -2557,7 +2566,7 @@ my %userDefined = (
2557
2566
  TTID => { Name => 'TomTomID', ValueConv => 'unpack("x4H*",$val)' },
2558
2567
  TTVI => { Name => 'TomTomVI', Format => 'int32u', Unknown => 1 }, # seen: "0 1 61 508 508"
2559
2568
  # TTVD seen: "normal 720p 60fps 60fps 16/9 wide 1x"
2560
- TTVD => { Name => 'TomTomVD', ValueConv => 'my @a = ($val =~ /[\x20-\x7f]+/g); "@a"', List => 1 },
2569
+ TTVD => { Name => 'TomTomVD', ValueConv => 'my @a = ($val =~ /[\x20-\x7e]+/g); "@a"', List => 1 },
2561
2570
  );
2562
2571
 
2563
2572
  # User-specific media data atoms (ref 11)
@@ -9031,11 +9040,11 @@ sub HandleItemInfo($)
9031
9040
  }
9032
9041
  $warn = "Can't currently decode protected $type metadata" if $$item{ProtectionIndex};
9033
9042
  $warn = "Can't currently extract $type with construction method $$item{ConstructionMethod}" if $$item{ConstructionMethod};
9034
- $et->WarnOnce($warn) if $warn and $name;
9043
+ $et->Warn($warn) if $warn and $name;
9035
9044
  $warn = 'Not this file' if $$item{DataReferenceIndex}; # (can only extract from "this file")
9036
9045
  unless (($$item{Extents} and @{$$item{Extents}}) or $warn) {
9037
9046
  $warn = "No Extents for $type item";
9038
- $et->WarnOnce($warn) if $name;
9047
+ $et->Warn($warn) if $name;
9039
9048
  }
9040
9049
  if ($warn) {
9041
9050
  $et->VPrint(0, "$$et{INDENT} [not extracted] ($warn)\n") if $verbose > 2;
@@ -9099,7 +9108,7 @@ sub HandleItemInfo($)
9099
9108
  $et->VerboseDump(\$buff);
9100
9109
  } else {
9101
9110
  $warn = "Error inflating $name metadata";
9102
- $et->WarnOnce($warn);
9111
+ $et->Warn($warn);
9103
9112
  $et->VPrint(0, "$$et{INDENT} [not extracted] ($warn)\n") if $verbose > 2;
9104
9113
  next;
9105
9114
  }
@@ -9188,7 +9197,7 @@ sub HandleItemInfo($)
9188
9197
  sub EEWarn($)
9189
9198
  {
9190
9199
  my $et = shift;
9191
- $et->WarnOnce('The ExtractEmbedded option may find more tags in the media data',3);
9200
+ $et->Warn('The ExtractEmbedded option may find more tags in the media data',3);
9192
9201
  }
9193
9202
 
9194
9203
  #------------------------------------------------------------------------------
@@ -9675,7 +9684,7 @@ sub ProcessMOV($$;$)
9675
9684
  $warnStr = 'End of processing at large atom (LargeFileSupport not enabled)';
9676
9685
  last;
9677
9686
  } elsif ($et->Options('LargeFileSupport') eq '2') {
9678
- $et->WarnOnce('Processing large atom (LargeFileSupport is 2)');
9687
+ $et->Warn('Processing large atom (LargeFileSupport is 2)');
9679
9688
  }
9680
9689
  }
9681
9690
  $size = $hi * 4294967296 + $lo - 16;
@@ -9690,7 +9699,7 @@ sub ProcessMOV($$;$)
9690
9699
  if ($$et{ValidatePath}{$path} and not $dupTagOK{$tag} and not $dupDirOK{$dirID}) {
9691
9700
  my $i = Get32u(\$tag,0);
9692
9701
  my $str = $i < 255 ? "index $i" : "tag '" . PrintableTagID($tag,2) . "'";
9693
- $et->WarnOnce("Duplicate $str at " . join('-', @{$$et{PATH}}));
9702
+ $et->Warn("Duplicate $str at " . join('-', @{$$et{PATH}}));
9694
9703
  $$et{ValidatePath} = { } if $path eq 'MOV-moov'; # avoid warnings for all contained dups
9695
9704
  }
9696
9705
  $$et{ValidatePath}{$path} = 1;