Re: [Tracker] Add support for OMA DRM Content format

Thank you all for the advice!
It's straight forward to adding "application/vnd.oma.drm.content" to the list of mimetypes the gstreamer 
extractor can handle. 
To be honest, writing a new DCF extractor cannot make metadata extraction faster because it still depends on 
GStreamer and its extension (the DRM-aware elements) to do this work. 

How about enhancing GStreamer extractor like this? The extractor behavior depends on whether DRM-aware 
extension is installed or not.

static TrackerExtractData data[] = {
        { "audio/*", extract_gstreamer_audio },
        { "video/*", extract_gstreamer_video },
        { "image/*", extract_gstreamer_image },
        { "image/svg+xml", extract_gstreamer_svg },
        /* Tell gstreamer to guess if mimetype guessing returns video also for
audio files */
        { "video/3gpp", extract_gstreamer_guess },
        { "video/mp4", extract_gstreamer_guess },
        { "video/x-ms-asf", extract_gstreamer_guess },
        /* DRM formats */
+       { "application/vnd.oma.drm.content", extract_gstreamer_dcf },

static void
extract_gstreamer_dcf (const gchar          *uri,
                    TrackerSparqlBuilder *preupdate,
                                        TrackerSparqlBuilder *metadata)
        /* trying GStreamer at first, because if GStreamer DRM-aware extension is installed, GStreamer can 
get rich meta data from the decrypted content */
        extract_gstreamer_guess (const gchar          *uri,
                        TrackerSparqlBuilder *preupdate,
                                                TrackerSparqlBuilder *metadata);

        /* if GStreamer cannot extract meta data before time out, it means GStreamer DRM-aware extension is 
not installed.
    Then this function will parse the unencrypted DCF file header by itself and extract some basic 
information from the file header, such as media type, codec type or author if available */   

Best Regards

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