You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tika.apache.org by Juri Linkov <ju...@gmail.com> on 2013/03/08 08:55:15 UTC

Tika GUI can't get the original file

Hello,

Using the project http://mediainfo.sourceforge.net/
to get metadata from audio/video files, their Java JNA wrapper available from
http://sourceforge.net/p/mediainfo/code/5416/tree/MediaInfoLib/trunk/Source/MediaInfoDLL/MediaInfoDLL.JNA.java
requires a filename as the input argument.  This is not a problem
since getFile() can return the original file from TikaInputStream.

This works flawlessly in the CLI version.  But when using the GUI interface,
the original stream gets wrapped through ProgressMonitorInputStream,
so hasFile() returns false.  Fortunately, getFile() automagically creates
a spooled temporary file.  Thanks for handling this.

The remaining problem is that often this is inefficient,
i.e. when dropping a very large multi-GB video file
to the GUI window causes performance degradation
waiting when this file gets copied to a temporary file.

What do you think about creating a subclass of ProgressMonitorInputStream
that like TikaInputStream would keep the reference to the original file?

-- 
Best regards,
Juri

Re: Tika GUI can't get the original file

Posted by Juri Linkov <ju...@gmail.com>.
 > The Tika GUI is mostly intended to be used for debugging and demos. Is
 > there a reason why you're using it with such large files? Is it still for
 > demos/testing, or for something else?

Yes, it is for testing mostly, so there is no pressing need to improve this :)

-- 
Best regards,
Juri

Re: Tika GUI can't get the original file

Posted by Nick Burch <ap...@gagravarr.org>.
On Fri, 8 Mar 2013, Juri Linkov wrote:
> This works flawlessly in the CLI version.  But when using the GUI 
> interface, the original stream gets wrapped through 
> ProgressMonitorInputStream, so hasFile() returns false.  Fortunately, 
> getFile() automagically creates a spooled temporary file.  Thanks for 
> handling this.

The Tika GUI is mostly intended to be used for debugging and demos. Is 
there a reason why you're using it with such large files? Is it still for 
demos/testing, or for something else?

Nick