libextractor
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[libextractor] Re: Exiv2 plugin for libextractor


From: Christian Grothoff
Subject: [libextractor] Re: Exiv2 plugin for libextractor
Date: Sun, 3 Jul 2005 15:35:52 -0500
User-agent: KMail/1.7.2

On Sunday 03 July 2005 08:05 am, Andreas Huggel wrote:
> Hi Christian,
> Attached is a patch to libextractor for Exif support using exiv2 and an
> image to try it with. At this moment it is just a first prototype. It works
> with jpeg images that contain Exif data.
> Ignoring whatever policy there may be with regards to libextractor
> keywords, I just added those I needed.

That is fine, the basic policy is to append more when necessary :-).

> The resulting plugin is quite huge, some work would be required to reduce
> the size. Exiv2 also supports Iptc, that could easily be added to the same
> plugin.

That would probably be nice (I know what exiv is -- but what is iptc??)

> If you're interested to add this to your distribution, I'd be willing to
> enhance it according to your needs.

There are actually multiple.  First, as you have already observed, the plugin 
is rather big, so maybe it would be possible to cut down some of the code 
(i.e. what is used to write exif data).  But there is more.  Most 
importantly, there are clearly quite a few memory leaks in exiv2 (valgrind is  
your friend).  Those would absolutely have to be fixed before we can make 
this a default plugin (le is used by long-running apps, and thus leaks would 
be deadly).  

Similarly, I saw some exiv2 code printing to stdout/stderr, which is not 
acceptable.  All parsing errors should be silently ignored -- there could be 
an ncurses app running on the console using LE, and thus printing would 
disrupt that.  Also, LE is supposed to run on many files, some of which may 
look like malformed files in some format -- and they may just be of a 
different format.  LE clients should not have to deal with such errors, so 
all LE parsers must be very robust and just ignore such problems.  

Also, when I integrated exiv2 (the library) into the LE build, I just copied 
the generated exv_conf.h header file.  Obviously that should rather be 
integrated with config.h from LE (I can probably do that myself at a later 
time).

> Thanks to Jin for suggesting to write this plugin.

Thanks for doing it! :-)  I would be happy to give you subversion access to 
the exiv2 directory of LE such that you can hack on the code directly.  All I 
need is the output of apache's "htpasswd" (one line) giving me your user name 
of choice and an encrypted password.  I assume you're familar with subversion 
(or at least able to figure the rest out, feel free to ask if you are not, or 
join #gnunet on freenode, there are usually people with a clue there).

Happy hacking

Christian

> On Sunday 03 July 2005 04:06, you wrote:
> > Segfault is unlikely due to missing linkage against exiv2 lib. Try using
> > valgrind / gdb to investigate.
>
> It was in this case, adding -lexiv2 to the Makefile was all it took. Well,
> it was late and I was having a good time watching the Live8 concerts at the
> same time :)
>
> > Any chance to package exiv2 such that we
> > would not have to link against it and could rather just include the
> > necessary code (and if possible as little as possible) in LE itself? 
> > That way we can avoid even more dependencies :-).
>
> I don't think that's feasible. Exiv2 is meant to be used as a library, as
> the plugin currently does. But isn't that the idea of libextractor in the
> first place, to provide wrappers around other libraries?
>
> Regards,
> Andreas
>
> > Happy hacking
> >
> > Christian
> >
> > Quoting Andreas Huggel <address@hidden>:
> > > Thanks for the quick reply, that works. I now get a segfault, probably
> > > because
> > > somewhere I'll need to tell extract or my plugin to also load the exiv2
> > > lib... I'll look into this tomorrow.
> > >
> > > Regards,
> > > Andreas
> > >
> > > On Sunday 03 July 2005 03:07, you wrote:
> > > > The easiest would probably be to put the code into the
> > > > src/plugins/ directory and edit "Makefile.am" (just put in lines
> > > > equivalent to those of any of the other plugins, really easy, just
> > > > search for, say, "ogg" and put in appropriate lines for exiv2).  Then
> > > > "make install" and use "extract" with the "-l" option (i.e. -l
> > > > libextractor_exiv2) to load and test the new plugin.
> > > >
> > > > Alternatively, just E-mail me the code together with some test files,
> > > > I can probably do the integration in 2 minutes myself :-).
> > > >
> > > > Best regards
> > > >
> > > > Christian
> > > >
> > > > Quoting Andreas Huggel <address@hidden>:
> > > > > Hi Vidyut, Christian,
> > > > > I'm playing with the libextractor library, trying to add a plugin
> > > > > for Exiv2 (Exif and Iptc library -
> > > > > http://home.arcor.de/ahuggel/exiv2/) Presently I have a plugin
> > > > > which compiles but I have difficulties testing it.
> > > > >
> > > > > How do I add the plugin to the libextractor build environment so
> > > > > that it compiles just like the other plugins and is accessible from
> > > > > the sample extract program?
> > > > >
> > > > > Thanks,
> > > > > Andreas




reply via email to

[Prev in Thread] Current Thread [Next in Thread]