[haiku] Re: Need Some GSoC Advice

  • From: "François Revol" <revol@xxxxxxx>
  • To: haiku@xxxxxxxxxxxxx
  • Date: Tue, 24 Mar 2009 00:49:20 +0100 CET

> "François Revol" <revol@xxxxxxx> wrote:
> > > Ankur Sethi wrote:
>  ...
> > > plugin based extractor
>  ...
> > extending Translation kit addons could be
> > an easy first step.
> 
> Do you mean translators that would export textual
> data from supported datatypes/file formats, simply
> as a string (or block) of UTF8 text? (mp3-to-text)
> 
> (To feed to some indexing backend, possibly an 
> attribute writer.)
> 

Actually it's already possible to use the existing API without a single 
change:

virtual status_t Identify(BPositionIO *inSource, 
      const translation_format *inFormat, 
      BMessage *ioExtension, 
      translator_info *outInfo, 
      uint32 outType) = 0 

just pass in a BMessage as ioExtension and make the translators fill it 
with the extracted metadata.

So an indexer app would just try all existing translators that handle 
the format, and check if it finds any metadata.

François.

Other related posts: