source: main/trunk/greenstone2/perllib/cpan/Image/ExifTool/Opus.pm@ 34921

Last change on this file since 34921 was 34921, checked in by anupama, 3 years ago

Committing the improvements to EmbeddedMetaPlugin's processing of Keywords vs other metadata fields. Keywords were literally stored as arrays of words rather than phrases in PDFs (at least in Diego's sample PDF), whereas other meta fields like Subjects and Creators stored them as arrays of phrases. To get both to work, Kathy updated EXIF to a newer version, to retrieve the actual EXIF values stored in the PDF. And Kathy and Dr Bainbridge came up with a new option that I added called apply_join_before_split_to_metafields that's a regex which can list the metadata fields to apply the join_before_split to and whcih previously always got applied to all metadata fields. Now it's applied to any *Keywords metafields by default, as that's the metafield we have experience of that behaves differently to the others, as it stores by word instead of phrases. Tested on Diego's sample PDF. Diego has double-checked it to works on his sample PDF too, setting the split char to ; and turning on the join_before_split and leaving apply_join_before_split_to_metafields at its default of .*Keywords. File changes are strings.properties for the tooltip, the plugin introducing the option and working with it and Kathy's EXIF updates affecting cpan/File and cpan/Image.

File size: 2.2 KB
Line 
1#------------------------------------------------------------------------------
2# File: Opus.pm
3#
4# Description: Read Ogg Opus audio meta information
5#
6# Revisions: 2016/07/14 - P. Harvey Created
7#
8# References: 1) https://www.opus-codec.org/docs/
9# 2) https://wiki.xiph.org/OggOpus
10# 3) https://tools.ietf.org/pdf/rfc7845.pdf
11#------------------------------------------------------------------------------
12
13package Image::ExifTool::Opus;
14
15use strict;
16use vars qw($VERSION);
17
18$VERSION = '1.00';
19
20# Opus metadata types
21%Image::ExifTool::Opus::Main = (
22 NOTES => q{
23 Information extracted from Ogg Opus files. See
24 L<https://www.opus-codec.org/docs/> for the specification.
25 },
26 'OpusHead' => {
27 Name => 'Header',
28 SubDirectory => { TagTable => 'Image::ExifTool::Opus::Header' },
29 },
30 'OpusTags' => {
31 Name => 'Comments',
32 SubDirectory => { TagTable => 'Image::ExifTool::Vorbis::Comments' },
33 },
34);
35
36%Image::ExifTool::Opus::Header = (
37 PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
38 GROUPS => { 2 => 'Audio' },
39 0 => 'OpusVersion',
40 1 => 'AudioChannels',
41 # 2 => 'PreSkip' (int16u)
42 4 => {
43 Name => 'SampleRate',
44 Format => 'int32u',
45 },
46 8 => {
47 Name => 'OutputGain',
48 Format => 'int16u',
49 ValueConv => '10 ** ($val/5120)',
50 },
51);
52
531; # end
54
55__END__
56
57=head1 NAME
58
59Image::ExifTool::Opus - Read Ogg Opus audio meta information
60
61=head1 SYNOPSIS
62
63This module is used by Image::ExifTool
64
65=head1 DESCRIPTION
66
67This module contains definitions required by Image::ExifTool to extract meta
68information from Ogg Opus audio files.
69
70=head1 AUTHOR
71
72Copyright 2003-2021, Phil Harvey (philharvey66 at gmail.com)
73
74This library is free software; you can redistribute it and/or modify it
75under the same terms as Perl itself.
76
77=head1 REFERENCES
78
79=over 4
80
81=item L<https://www.opus-codec.org/docs/>
82
83=item L<https://wiki.xiph.org/OggOpus>
84
85=item L<https://tools.ietf.org/pdf/rfc7845.pdf>
86
87=back
88
89=head1 SEE ALSO
90
91L<Image::ExifTool::TagNames/Opus Tags>,
92L<Image::ExifTool::TagNames/Ogg Tags>,
93L<Image::ExifTool::TagNames/Vorbis Tags>,
94L<Image::ExifTool::TagNames/FLAC Tags>,
95L<Image::ExifTool(3pm)|Image::ExifTool>
96
97=cut
98
Note: See TracBrowser for help on using the repository browser.