exiftool_vendored 13.18.0 → 13.21.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.
@@ -40,7 +40,7 @@ use Image::ExifTool qw(:DataAccess :Utils);
40
40
  use Image::ExifTool::Exif;
41
41
  use Image::ExifTool::APP12;
42
42
 
43
- $VERSION = '2.83';
43
+ $VERSION = '2.84';
44
44
 
45
45
  sub PrintLensInfo($$$);
46
46
 
@@ -442,6 +442,7 @@ my %olympusCameraTypes = (
442
442
  S0089 => 'E-M5MarkIII',
443
443
  S0092 => 'E-M1MarkIII', #IB
444
444
  S0093 => 'E-P7', #IB
445
+ S0094 => 'E-M10MarkIIIS', #forum17050
445
446
  S0095 => 'OM-1', #IB
446
447
  S0101 => 'OM-5', #IB
447
448
  S0121 => 'OM-1MarkII', #forum15652
@@ -21,7 +21,7 @@ use vars qw($VERSION $AUTOLOAD $lastFetched);
21
21
  use Image::ExifTool qw(:DataAccess :Utils);
22
22
  require Exporter;
23
23
 
24
- $VERSION = '1.60';
24
+ $VERSION = '1.61';
25
25
 
26
26
  sub FetchObject($$$$);
27
27
  sub ExtractObject($$;$$);
@@ -141,6 +141,15 @@ my %supportedFilter = (
141
141
  PrintConv => '$self->ConvertDateTime($val)',
142
142
  PrintConvInv => '$self->InverseDateTime($val)',
143
143
  },
144
+ SourceModified => {
145
+ Name => 'SourceModified',
146
+ Writable => 'date',
147
+ PDF2 => 1,
148
+ Groups => { 2 => 'Time' },
149
+ Shift => 'Time',
150
+ PrintConv => '$self->ConvertDateTime($val)',
151
+ PrintConvInv => '$self->InverseDateTime($val)',
152
+ },
144
153
  Trapped => {
145
154
  Protected => 1,
146
155
  # remove leading '/' from '/True' or '/False'
@@ -21,7 +21,7 @@ use Image::ExifTool qw(:DataAccess :Utils);
21
21
  use Image::ExifTool::XMP;
22
22
  use Image::ExifTool::GPS;
23
23
 
24
- $VERSION = '1.13';
24
+ $VERSION = '1.14';
25
25
 
26
26
  sub ExtractObject($$;$);
27
27
  sub Get24u($$);
@@ -46,7 +46,7 @@ my %plistType = (
46
46
  %Image::ExifTool::PLIST::Main = (
47
47
  PROCESS_PROC => \&ProcessPLIST,
48
48
  GROUPS => { 0 => 'PLIST', 1 => 'XML', 2 => 'Document' },
49
- VARS => { LONG_TAGS => 4 },
49
+ VARS => { LONG_TAGS => 12 },
50
50
  NOTES => q{
51
51
  Apple Property List tags. ExifTool reads both XML and binary-format PLIST
52
52
  files, and will extract any existing tags even if they aren't listed below.
@@ -92,6 +92,35 @@ my %plistType = (
92
92
  Name => 'GPSMapDatum',
93
93
  Groups => { 2 => 'Location' },
94
94
  },
95
+ # slow motion stuff found in AAE files
96
+ 'slowMotion/regions/timeRange/start/flags' => {
97
+ Name => 'SlowMotionRegionsStartTimeFlags',
98
+ PrintConv => { BITMASK => {
99
+ 0 => 'Valid',
100
+ 1 => 'Has been rounded',
101
+ 2 => 'Positive infinity',
102
+ 3 => 'Negative infinity',
103
+ 4 => 'Indefinite',
104
+ }},
105
+ },
106
+ 'slowMotion/regions/timeRange/start/value' => 'SlowMotionRegionsStartTimeValue',
107
+ 'slowMotion/regions/timeRange/start/timescale' => 'SlowMotionRegionsStartTimeScale',
108
+ 'slowMotion/regions/timeRange/start/epoch' => 'SlowMotionRegionsStartTimeEpoch',
109
+ 'slowMotion/regions/timeRange/duration/flags' => {
110
+ Name => 'SlowMotionRegionsDurationFlags',
111
+ PrintConv => { BITMASK => {
112
+ 0 => 'Valid',
113
+ 1 => 'Has been rounded',
114
+ 2 => 'Positive infinity',
115
+ 3 => 'Negative infinity',
116
+ 4 => 'Indefinite',
117
+ }},
118
+ },
119
+ 'slowMotion/regions/timeRange/duration/value' => 'SlowMotionRegionsDurationValue',
120
+ 'slowMotion/regions/timeRange/duration/timescale' => 'SlowMotionRegionsDurationTimeScale',
121
+ 'slowMotion/regions/timeRange/duration/epoch' => 'SlowMotionRegionsDurationEpoch',
122
+ 'slowMotion/regions' => 'SlowMotionRegions',
123
+ 'slowMotion/rate' => 'SlowMotionRate',
95
124
  XMLFileType => {
96
125
  # recognize MODD files by their content
97
126
  RawConv => q{
@@ -101,6 +130,11 @@ my %plistType = (
101
130
  return $val;
102
131
  },
103
132
  },
133
+ adjustmentData => { # AAE file
134
+ Name => 'AdjustmentData',
135
+ CompressedPLIST => 1,
136
+ SubDirectory => { TagTable => 'Image::ExifTool::PLIST::Main' },
137
+ },
104
138
  );
105
139
 
106
140
  #------------------------------------------------------------------------------
@@ -180,8 +214,22 @@ sub FoundTag($$$$;$)
180
214
  $$et{LastPListTag} = $tagInfo;
181
215
  # override file type if applicable
182
216
  $et->OverrideFileType($plistType{$tag}) if $plistType{$tag} and $$et{FILE_TYPE} eq 'XMP';
217
+ # handle compressed PLIST/JSON data
218
+ my $proc;
219
+ if ($$tagInfo{CompressedPLIST} and ref $val eq 'SCALAR' and $$val !~ /^bplist00/) {
220
+ if (eval { require IO::Uncompress::RawInflate }) {
221
+ my $inflated;
222
+ if (IO::Uncompress::RawInflate::rawinflate($val => \$inflated)) {
223
+ $val = \$inflated;
224
+ } else {
225
+ $et->Warn("Error inflating PLIST::$$tagInfo{Name}");
226
+ }
227
+ } else {
228
+ $et->Warn('Install IO::Uncompress to decode compressed PLIST data');
229
+ }
230
+ }
183
231
  # save the tag
184
- $et->HandleTag($tagTablePtr, $tag, $val);
232
+ $et->HandleTag($tagTablePtr, $tag, $val, ProcessProc => $proc);
185
233
 
186
234
  return 1;
187
235
  }
@@ -390,39 +438,54 @@ sub ProcessBinaryPLIST($$;$)
390
438
  }
391
439
 
392
440
  #------------------------------------------------------------------------------
393
- # Extract information from a PLIST file
441
+ # Extract information from a PLIST file (binary, XML or JSON format)
394
442
  # Inputs: 0) ExifTool object ref, 1) dirInfo ref, 2) tag table ref
395
443
  # Returns: 1 on success, 0 if this wasn't valid PLIST
396
444
  sub ProcessPLIST($$;$)
397
445
  {
398
446
  my ($et, $dirInfo, $tagTablePtr) = @_;
447
+ my $dataPt = $$dirInfo{DataPt};
448
+ my ($result, $notXML);
399
449
 
400
- # process XML PLIST data using the XMP module
401
- $$dirInfo{XMPParseOpts}{FoundProc} = \&FoundTag;
402
- my $result = Image::ExifTool::XMP::ProcessXMP($et, $dirInfo, $tagTablePtr);
403
- delete $$dirInfo{XMPParseOpts};
404
-
405
- unless ($result) {
406
- my $buff;
407
- my $raf = $$dirInfo{RAF} or return 0;
450
+ if ($dataPt) {
451
+ pos($$dataPt) = $$dirInfo{DirStart} || 0;
452
+ $notXML = 1 unless $$dataPt =~ /\G</g;
453
+ }
454
+ unless ($notXML) {
455
+ # process XML PLIST data using the XMP module
456
+ $$dirInfo{XMPParseOpts}{FoundProc} = \&FoundTag;
457
+ $result = Image::ExifTool::XMP::ProcessXMP($et, $dirInfo, $tagTablePtr);
458
+ delete $$dirInfo{XMPParseOpts};
459
+ return $result if $result;
460
+ }
461
+ my $buff;
462
+ my $raf = $$dirInfo{RAF};
463
+ if ($raf) {
408
464
  $raf->Seek(0,0) and $raf->Read($buff, 64) or return 0;
409
- if ($buff =~ /^bplist0/) {
410
- # binary PLIST file
411
- my $tagTablePtr = GetTagTable('Image::ExifTool::PLIST::Main');
412
- $et->SetFileType('PLIST', 'application/x-plist');
413
- $$et{SET_GROUP1} = 'PLIST';
414
- unless (ProcessBinaryPLIST($et, $dirInfo, $tagTablePtr)) {
415
- $et->Error('Error reading binary PLIST file');
416
- }
417
- delete $$et{SET_GROUP1};
418
- $result = 1;
419
- } elsif ($$et{FILE_EXT} and $$et{FILE_EXT} eq 'PLIST' and
420
- $buff =~ /^\xfe\xff\x00/)
421
- {
422
- # (have seen very old PLIST files encoded as UCS-2BE with leading BOM)
423
- $et->Error('Old PLIST format currently not supported');
424
- $result = 1;
465
+ $dataPt = \$buff;
466
+ } else {
467
+ return 0 unless $dataPt;
468
+ }
469
+ if ($$dataPt =~ /^bplist0/) { # binary PLIST
470
+ # binary PLIST file
471
+ my $tagTablePtr = GetTagTable('Image::ExifTool::PLIST::Main');
472
+ $et->SetFileType('PLIST', 'application/x-plist');
473
+ $$et{SET_GROUP1} = 'PLIST';
474
+ unless (ProcessBinaryPLIST($et, $dirInfo, $tagTablePtr)) {
475
+ $et->Error('Error reading binary PLIST file');
425
476
  }
477
+ delete $$et{SET_GROUP1};
478
+ $result = 1;
479
+ } elsif ($$dataPt =~ /^\{"/) { # JSON PLIST
480
+ $raf and $raf->Seek(0);
481
+ require Image::ExifTool::JSON;
482
+ $result = Image::ExifTool::JSON::ProcessJSON($et, $dirInfo);
483
+ } elsif ($$et{FILE_EXT} and $$et{FILE_EXT} eq 'PLIST' and
484
+ $$dataPt =~ /^\xfe\xff\x00/)
485
+ {
486
+ # (have seen very old PLIST files encoded as UCS-2BE with leading BOM)
487
+ $et->Error('Old PLIST format currently not supported');
488
+ $result = 1;
426
489
  }
427
490
  return $result;
428
491
  }