"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "lib/Image/ExifTool/QuickTime.pm" between
Image-ExifTool-12.26.tar.gz and Image-ExifTool-12.27.tar.gz

About: ExifTool is a platform-independent Perl library plus a command-line application for reading, writing and editing meta information in a wide variety of files.

QuickTime.pm  (Image-ExifTool-12.26):QuickTime.pm  (Image-ExifTool-12.27)
skipping to change at line 50 skipping to change at line 50
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
package Image::ExifTool::QuickTime; package Image::ExifTool::QuickTime;
use strict; use strict;
use vars qw($VERSION $AUTOLOAD %stringEncoding); use vars qw($VERSION $AUTOLOAD %stringEncoding);
use Image::ExifTool qw(:DataAccess :Utils); use Image::ExifTool qw(:DataAccess :Utils);
use Image::ExifTool::Exif; use Image::ExifTool::Exif;
use Image::ExifTool::GPS; use Image::ExifTool::GPS;
$VERSION = '2.64'; $VERSION = '2.66';
sub ProcessMOV($$;$); sub ProcessMOV($$;$);
sub ProcessKeys($$$); sub ProcessKeys($$$);
sub ProcessMetaKeys($$$); sub ProcessMetaKeys($$$);
sub ProcessMetaData($$$); sub ProcessMetaData($$$);
sub ProcessEncodingParams($$$); sub ProcessEncodingParams($$$);
sub ProcessSampleDesc($$$); sub ProcessSampleDesc($$$);
sub ProcessHybrid($$$); sub ProcessHybrid($$$);
sub ProcessRights($$$); sub ProcessRights($$$);
# ++vvvvvvvvvvvv++ (in QuickTimeStream.pl) # ++vvvvvvvvvvvv++ (in QuickTimeStream.pl)
skipping to change at line 232 skipping to change at line 232
'crx ' => 'Canon Raw (.CRX)', #PH (CR3 or CRM; use Canon CompressorVersion t o decide) 'crx ' => 'Canon Raw (.CRX)', #PH (CR3 or CRM; use Canon CompressorVersion t o decide)
); );
# information for int32u date/time tags (time zero is Jan 1, 1904) # information for int32u date/time tags (time zero is Jan 1, 1904)
my %timeInfo = ( my %timeInfo = (
Notes => 'converted from UTC to local time if the QuickTimeUTC option is set ', Notes => 'converted from UTC to local time if the QuickTimeUTC option is set ',
Shift => 'Time', Shift => 'Time',
Writable => 1, Writable => 1,
Permanent => 1, Permanent => 1,
DelValue => 0, DelValue => 0,
# It is not uncommon for brain-dead software to use the wrong time zero, # It is not uncommon for brain-dead software to use the wrong time zero, it
# so assume a time zero of Jan 1, 1970 if the date is before this should be
# Jan 1, 1904, so assume a time zero of Jan 1, 1970 if the date is before th
is
# Note: This value will be in UTC if generated by a system that is aware of the time zone # Note: This value will be in UTC if generated by a system that is aware of the time zone
# (also note: this code is duplicated for the CreateDate tag)
RawConv => q{ RawConv => q{
my $offset = (66 * 365 + 17) * 24 * 3600; my $offset = (66 * 365 + 17) * 24 * 3600;
return $val - $offset if $val >= $offset or $$self{OPTIONS}{QuickTimeUTC }; return $val - $offset if $val >= $offset or $$self{OPTIONS}{QuickTimeUTC };
if ($val and not $$self{IsWriting}) { if ($val and not $$self{IsWriting}) {
$self->WarnOnce('Patched incorrect time zero for QuickTime date/time tag',1); $self->WarnOnce('Patched incorrect time zero for QuickTime date/time tag',1);
} }
return $val; return $val;
}, },
RawConvInv => q{ RawConvInv => q{
if ($$self{FileType} eq 'CR3' and not $self->Options('QuickTimeUTC')) { if ($$self{FileType} eq 'CR3' and not $self->Options('QuickTimeUTC')) {
skipping to change at line 1197 skipping to change at line 1198
DATAMEMBER => [ 0, 1, 2, 3, 4 ], DATAMEMBER => [ 0, 1, 2, 3, 4 ],
0 => { 0 => {
Name => 'MovieHeaderVersion', Name => 'MovieHeaderVersion',
Format => 'int8u', Format => 'int8u',
RawConv => '$$self{MovieHeaderVersion} = $val', RawConv => '$$self{MovieHeaderVersion} = $val',
}, },
1 => { 1 => {
Name => 'CreateDate', Name => 'CreateDate',
Groups => { 2 => 'Time' }, Groups => { 2 => 'Time' },
%timeInfo, %timeInfo,
RawConv => q{
my $offset = (66 * 365 + 17) * 24 * 3600;
if ($val >= $offset or $$self{OPTIONS}{QuickTimeUTC}) {
$val -= $offset;
} elsif ($val and not $$self{IsWriting}) {
$self->WarnOnce('Patched incorrect time zero for QuickTime date/
time tag',1);
}
return $$self{CreateDate} = $val;
},
# this is int64u if MovieHeaderVersion == 1 (ref 13) # this is int64u if MovieHeaderVersion == 1 (ref 13)
Hook => '$$self{MovieHeaderVersion} and $format = "int64u", $varSize += 4', Hook => '$$self{MovieHeaderVersion} and $format = "int64u", $varSize += 4',
}, },
2 => { 2 => {
Name => 'ModifyDate', Name => 'ModifyDate',
Groups => { 2 => 'Time' }, Groups => { 2 => 'Time' },
%timeInfo, %timeInfo,
# this is int64u if MovieHeaderVersion == 1 (ref 13) # this is int64u if MovieHeaderVersion == 1 (ref 13)
Hook => '$$self{MovieHeaderVersion} and $format = "int64u", $varSize += 4', Hook => '$$self{MovieHeaderVersion} and $format = "int64u", $varSize += 4',
}, },
skipping to change at line 8920 skipping to change at line 8930
my $id = $$et{KeysCount} . '.' . $index; my $id = $$et{KeysCount} . '.' . $index;
if (ref $$itemList{$id} eq 'HASH') { if (ref $$itemList{$id} eq 'HASH') {
# delete other languages too if they exist # delete other languages too if they exist
my $oldInfo = $$itemList{$id}; my $oldInfo = $$itemList{$id};
if ($$oldInfo{OtherLang}) { if ($$oldInfo{OtherLang}) {
delete $$itemList{$_} foreach @{$$oldInfo{OtherLang}}; delete $$itemList{$_} foreach @{$$oldInfo{OtherLang}};
} }
delete $$itemList{$id}; delete $$itemList{$id};
} }
if ($newInfo) { if ($newInfo) {
$$newInfo{KeysID} = $tag; # save original ID for use in family 7 gr oup name
AddTagToTable($itemList, $id, $newInfo); AddTagToTable($itemList, $id, $newInfo);
$msg or $msg = ''; $msg or $msg = '';
$out and print $out "$$et{INDENT}Added ItemList Tag $id = ($ns) $tag $msg\n"; $out and print $out "$$et{INDENT}Added ItemList Tag $id = ($ns) $tag $msg\n";
} }
$pos += $len; $pos += $len;
++$index; ++$index;
} }
return 1; return 1;
} }
skipping to change at line 9370 skipping to change at line 9381
# 0x0=binary, 0x1=UTF-8, 0x2=UTF-16, 0x3=ShiftJIS, # 0x0=binary, 0x1=UTF-8, 0x2=UTF-16, 0x3=ShiftJIS,
# 0x4=UTF-8 0x5=UTF-16, 0xd=JPEG, 0xe=PNG, # 0x4=UTF-8 0x5=UTF-16, 0xd=JPEG, 0xe=PNG,
# 0x15=signed int, 0x16=unsigned int, 0x17=float, # 0x15=signed int, 0x16=unsigned int, 0x17=float,
# 0x18=double, 0x1b=BMP, 0x1c='meta' atom # 0x18=double, 0x1b=BMP, 0x1c='meta' atom
if ($stringEncoding{$flags}) { if ($stringEncoding{$flags}) {
# handle all string formats # handle all string formats
$value = $et->Decode($value, $stringEncoding{$fl ags}); $value = $et->Decode($value, $stringEncoding{$fl ags});
# (shouldn't be null terminated, but some softwa re writes it anyway) # (shouldn't be null terminated, but some softwa re writes it anyway)
$value =~ s/\0$// unless $$tagInfo{Binary}; $value =~ s/\0$// unless $$tagInfo{Binary};
} else { } else {
$format = QuickTimeFormat($flags, $len) unless $ if (not $format) {
format; $format = QuickTimeFormat($flags, $len);
} elsif ($format =~ /^int\d+([us])$/) {
# adjust integer to available length (but no
t int64)
my $fmt = { 1=>'int8', 2=>'int16', 4=>'int32
' }->{$len};
$format = $fmt . $1 if defined $fmt;
}
if ($format) { if ($format) {
$value = ReadValue(\$value, 0, $format, $$ta gInfo{Count}, $len); $value = ReadValue(\$value, 0, $format, $$ta gInfo{Count}, $len);
} elsif (not $$tagInfo{ValueConv}) { } elsif (not $$tagInfo{ValueConv}) {
# make binary data a scalar reference unless a ValueConv exists # make binary data a scalar reference unless a ValueConv exists
my $buf = $value; my $buf = $value;
$value = \$buf; $value = \$buf;
} }
} }
} }
if ($ctry or $lang) { if ($ctry or $lang) {
 End of changes. 6 change blocks. 
5 lines changed or deleted 26 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)