Results 1 to 2 of 2

Thread: How to create a MetadataExtract object?

  1. #1
    Newbie Newbie
    Join Date
    Nov 2016

    Question How to create a MetadataExtract object?


    In Android, I've been trying to extract metadata from an MP3 audio file using a Metadata Extractor object. But I've been failing on create the metadataExtractorObj. This is my following code:

    Code :
        SLresult result;
        // Creating engine
        result = slCreateEngine(&engineObject, 0, NULL, 0, NULL, NULL);
        assert(SL_RESULT_SUCCESS == result);
        result = (*engineObject)->Realize(engineObject, SL_BOOLEAN_FALSE);
        assert(SL_RESULT_SUCCESS == result);
        result = (*engineObject)->GetInterface(engineObject, SL_IID_ENGINE, &engineEngine);
        assert(SL_RESULT_SUCCESS == result);
        // Creating URI with protocol file://
        SLDataLocator_URI loc_uri = {SL_DATALOCATOR_URI, (SLchar * ) uri};
        SLDataFormat_MIME format_mime = {SL_DATAFORMAT_MIME, (SLchar * )"audio/mpeg3", SL_CONTAINERTYPE_MP3};
        SLDataSource audioSrc = {&loc_uri, &format_mime};
        // Creating URI with protocol
        SLObjectItf metadataExtactCreatorObj = NULL;
        const SLInterfaceID ids[1] = {SL_IID_METADATAEXTRACTION};
        const SLboolean req[1] = {SL_BOOLEAN_FALSE};
    //    const SLInterfaceID ids[] = {};
    //    const SLboolean req[] = {};
        result = (*engineEngine)->CreateMetadataExtractor(engineEngine
    //    assert(SL_RESULT_SUCCESS == result);
    //    (void)result;
        if (SL_RESULT_FEATURE_UNSUPPORTED == result) // <----- The result is always Feature Unsupported
        result = (*metadataExtactCreatorObj)->Realize(metadataExtactCreatorObj, SL_BOOLEAN_FALSE);
        assert(SL_RESULT_SUCCESS == result);
        SLMetadataExtractionItf metadataExtractionItf;
        result = (*metadataExtactCreatorObj)->GetInterface(metadataExtactCreatorObj, SL_IID_METADATAEXTRACTION, &metadataExtractionItf);
        assert(SL_RESULT_SUCCESS == result);

    The result that I always get from CreateMetadataExtractor is SL_RESULT_FEATURE_UNSUPPORTED. What am I missing for this to be SL_RESULT_SUCCESS?

    Thanks you, have a nice day.

  2. #2
    Member Contributor
    Join Date
    Mar 2009
    Hi Chaq686,

    If you are getting the result code SL_RESULT_FEATURE_UNSUPPORTED, that means that the implementation does not support CreateMetadataExtractor(). The problem isn't in your code, it's the lack of support for metadata by the implementation.


    Erik Noreke,
    Working Group Chair OpenSL ES, OpenMAX AL and Safety Critical

Similar Threads

  1. create dynamic object
    By new_beginner in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 09-22-2013, 04:43 PM
  2. Multiple glClipPlane to create object
    By Ashley Perrien in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 12-22-2009, 07:59 PM
  3. get 2D points and create 3D object
    By in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 11-10-2001, 08:47 PM
  4. A picture in a wall, without create a new object
    By maski in forum OpenGL: Advanced Coding
    Replies: 2
    Last Post: 01-13-2001, 05:13 PM
  5. create a 3D object on a mouse click
    By gege in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 03-14-2000, 06:20 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Proudly hosted by Digital Ocean