Changeset 22439
- Timestamp:
- 2010-07-19T16:01:02+12:00 (14 years ago)
- Location:
- gs2-extensions/music-ir/trunk/perllib/plugins
- Files:
-
- 2 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
gs2-extensions/music-ir/trunk/perllib/plugins/MusicIRPlugin.pm
r22430 r22439 29 29 use BasePlugin; 30 30 use jAudioExtractor; 31 use jSongMinerExtractor; 31 32 32 33 use strict; … … 37 38 38 39 sub BEGIN { 39 @MusicIRPlugin::ISA = ('BasePlugin', 'jAudioExtractor' );40 @MusicIRPlugin::ISA = ('BasePlugin', 'jAudioExtractor', 'jSongMinerExtractor'); 40 41 } 41 42 … … 44 45 { 'name' => "compute_mir_features", 45 46 'desc' => "{BasePlugin.compute_mir_features}", 47 'type' => "enum", 48 'list' => [{'name' => "true", 'desc' => "{common.true}"}, 49 {'name' => "false", 'desc' => "{common.false}"}], 50 'deft' => "false", 51 'reqd' => "no" }, 52 { 'name' => "retrieve_mir_metadata", 53 'desc' => "{BasePlugin.retrieve_mir_metadata}", 46 54 'type' => "enum", 47 55 'list' => [{'name' => "true", 'desc' => "{common.true}"}, … … 73 81 74 82 75 my $jac_self = new jAudioExtractor($pluginlist, $inputargs, $hashArgOptLists); 83 my $jae_self = new jAudioExtractor($pluginlist, $inputargs, $hashArgOptLists,1); 84 my $jsme_self = new jSongMinerExtractor($pluginlist, $inputargs, $hashArgOptLists,1); 76 85 my $base_self = new BasePlugin($pluginlist, $inputargs, $hashArgOptLists); 77 86 78 my $self = BasePlugin::merge_inheritance($ja c_self,$base_self);87 my $self = BasePlugin::merge_inheritance($jae_self,$jsme_self,$base_self); 79 88 80 89 return bless $self, $class; … … 93 102 $self->SUPER::begin(@_); 94 103 $self->jAudioExtractor::begin(@_); 104 $self->jSongMinerExtractor::begin(@_); 95 105 } 96 106 … … 122 132 } 123 133 134 124 135 #we have no text - adds dummy text and NoText metadata 125 136 $self->add_dummy_text($doc_obj, $doc_obj->get_top_section()); … … 129 140 } 130 141 142 sub post_process_doc_obj { 143 my $self = shift (@_); 144 my ($pluginfo, $base_dir, $file, $metadata, $doc_obj, $gli) = @_; 145 146 my $outhandle = $self->{'outhandle'}; 147 my ($filename_full_path, $filename_no_path) = &util::get_full_filenames($base_dir, $file); 148 149 if ($self->{'retrieve_mir_metadata'} eq "true") { 150 my $top_section = $doc_obj->get_top_section(); 151 my $id3_titles = $doc_obj->get_metadata($top_section,"ID3.Title"); 152 153 my $id3_title = shift @$id3_titles || "Unknown"; 154 155 my $id3_artists = $doc_obj->get_metadata($top_section,"ID3.Artist"); 156 my $id3_artist = shift @$id3_artists || "Unkown"; 157 158 my $metadata_txt_filename = $self->retrieve_metadata($filename_full_path,$id3_title,$id3_artist); 159 } 160 161 162 return 1; 163 } 164 131 165 132 166 1; -
gs2-extensions/music-ir/trunk/perllib/plugins/jAudioExtractor.pm
r22436 r22439 1 1 ########################################################################### 2 2 # 3 # jAudioExtractor - helper plugin that does office document conversion4 # using jodconverter combined with MIR3 # jAudioExtractor - helper plugin that computers audio features for 4 # music information retrieval use, using jAudio 5 5 # 6 6 # A component of the Greenstone digital library software
Note:
See TracChangeset
for help on using the changeset viewer.