Index: gs3-extensions/audioDB/trunk/src/perllib/plugins/AudioDBPlugin.pm
===================================================================
--- gs3-extensions/audioDB/trunk/src/perllib/plugins/AudioDBPlugin.pm	(revision 26234)
+++ gs3-extensions/audioDB/trunk/src/perllib/plugins/AudioDBPlugin.pm	(revision 26275)
@@ -90,10 +90,25 @@
     push(@{$hashArgOptLists->{"ArgList"}},@{$arguments});
     push(@{$hashArgOptLists->{"OptList"}},$options);
-
     
     my $ffte_self = new FFTExtractor($pluginlist, $inputargs, $hashArgOptLists,1);
+
+    my $jsme_self  = undef;
+    eval("require MusicIRPlugin");
+    if ($@) {
+	# Useful debugging statement below if there is a syntax error in the plugin
+	# and you expecting jSongMinerExtractor to be found
+	# print STDERR "$@\n";
+    }
+    else {
+	print STDERR "Dynamically loading jSongMinerExtractor\n";
+	push(@AudioDBPlugin::ISA,"MusicIRPlugin");
+	$jsme_self = new MusicIRPlugin($pluginlist, $inputargs, $hashArgOptLists);
+    }
+
     my $base_self = new BasePlugin($pluginlist, $inputargs, $hashArgOptLists);
 
-    my $self = BasePlugin::merge_inheritance($ffte_self,$base_self);
+    my $self = BasePlugin::merge_inheritance($ffte_self,$jsme_self,$base_self);
+
+    $self->{'jSongMinerExtractor-found'} = (defined $jsme_self) ? 1 : 0;
 
     return bless $self, $class;
@@ -181,6 +196,13 @@
     }
     
-    #we have no text - adds dummy text and NoText metadata
-    $self->add_dummy_text($doc_obj, $doc_obj->get_top_section());
+
+    if ($self->{'jSongMinerExtractor-found'}) {
+	# calling this version of process has the side effect of setting dummy text
+	$self->MusicIRPlugin::process($pluginfo, $base_dir, $file, $metadata, $doc_obj, $gli);
+    }
+    else {
+	#we have no text - adds dummy text and NoText metadata
+	$self->add_dummy_text($doc_obj, $doc_obj->get_top_section());
+    }
 
     return 1;
@@ -189,4 +211,40 @@
 
 
+sub post_process_doc_obj {
+    my $self = shift (@_);  
+    my ($pluginfo, $base_dir, $file, $metadata, $doc_obj, $gli) = @_;
+
+    my $outhandle = $self->{'outhandle'};
+    my ($filename_full_path, $filename_no_path) = &util::get_full_filenames($base_dir, $file);
+
+    # Opportunity to use jAudioMinerExtractor if dynamically and loaded
+    #
+    if ($self->{'retrieve_mir_metadata'} eq "true") {
+	my $top_section = $doc_obj->get_top_section();
+
+	my $id3_titles = $doc_obj->get_metadata($top_section,"ex.ID3.Title");
+	# my $id3_title = shift @$id3_titles || "Unknown";
+	my $id3_title = shift @$id3_titles || undef;
+
+	my $id3_artists = $doc_obj->get_metadata($top_section,"ex.ID3.Artist");
+	# my $id3_artist = shift @$id3_artists || "Unknown";
+	my $id3_artist = shift @$id3_artists || undef;
+
+	my ($metadata_acexml_filename,$metadata_txt_filename) 
+	    = $self->retrieve_metadata($filename_full_path,$id3_title,$id3_artist);
+	
+	if (-e $metadata_txt_filename) {
+	    $self->parse_txt_metadata($doc_obj,$metadata_txt_filename);
+	}
+
+	$doc_obj->associate_file($metadata_acexml_filename, "jsongminer.xml", 
+				 "text/xml", $top_section);
+    }
+
+
+    return 1;
+}
+
+
 1;
 
Index: gs3-extensions/audioDB/trunk/src/perllib/plugins/FFTExtractor.pm
===================================================================
--- gs3-extensions/audioDB/trunk/src/perllib/plugins/FFTExtractor.pm	(revision 26234)
+++ gs3-extensions/audioDB/trunk/src/perllib/plugins/FFTExtractor.pm	(revision 26275)
@@ -94,8 +94,19 @@
     }
 
+    my $native_source_file_path = $source_file_path;
+
+    my $native_target_file_path = $target_file_path;
+    if ($^O eq "cygwin") {
+	# Only get ffmpeg as native Windows binary => need to use Windows style path
+	$native_source_file_path=`cygpath -w \"$source_file_path\"`;
+	$native_target_file_path=`cygpath -w \"$target_file_path\"`;
+	$native_source_file_path =~ s/\s+$//;
+	$native_target_file_path =~ s/\s+$//;
+    }
+
     # Setup and run the ffmpeg command
     my $ffmpeg_cmd = "ffmpeg -y $convert_options";
-    $ffmpeg_cmd .= " -i \"$source_file_path\"";
-    $ffmpeg_cmd .= " \"$target_file_path\"";
+    $ffmpeg_cmd .= " -i \"$native_source_file_path\"";
+    $ffmpeg_cmd .= " \"$native_target_file_path\"";
 		
 ##    print STDERR "****** cmd = $ffmpeg_cmd\n";
@@ -161,4 +172,6 @@
     $fftExtract_cmd .= " \"$source_file_path\" \"$target_file_path\"";
 		
+##    $fftExtract_cmd =~ s/\\/\//g; 
+
 ##    print STDERR "**** cmd = $fftExtract_cmd\n";
 
