[Digikam-devel] video metadata support: req. guidance

Loïc Brarda loic.brarda21 at fnac.net
Fri Dec 14 14:07:53 GMT 2007


2007/12/13, Gilles Caulier <caulier.gilles at gmail.com>:
> digKam already use KMetadata (and Exiv2 but only for photo). If i rememeber,
> KMatadata can parse few video formats to handle metadata entries. We just
> need to take a look into KMetadata code to learn how to use API. KMetadata
> use kfile-plugins to supports video format (and images format)
>
> http://websvn.kde.org/branches/KDE/3.5/kdemultimedia/kfile-plugins/
>
>  In digikam, we have a class to get metadata: DMetadata. This one is used to
> load informations from files to database :
>
> http://websvn.kde.org/branches/extragear/kde3/graphics/digikam/libs/dmetadata/
>

I don't see any kfile-plugin there. For me, it first tries to load
metadata through Exiv2 then if it fails, it tries to use DCraw. Adding
kfile-plugin when DCraw fails could be a non invasive and extensible
way to do it (On supported files, Exiv2 will probably always be more
complete than kfile-plugins).

bool DMetadata::load(const QString& filePath)
{
    // In first, we trying to get metadata using Exiv2,
    // else we will use dcraw to extract minimal information.

    if (!KExiv2::load(filePath))
    {
        if (!loadUsingDcraw(filePath))
->     {
->          if (!loadUsingKfilePlugins(filePath))
                return false;
->       }
    }

    return true;
}

'->' lines beeing lines inserted in the load method. And of course,
loadUsingKfilePlugins function has to be implemented.

Cheers,
  Loïc


More information about the Digikam-devel mailing list