fantastico
Posts: 5
Joined: Thu May 24, 2012 4:02 am

OMX_GetComponentsOfRole and OMX_GetRolesOfComponent

Fri Feb 15, 2013 4:23 pm

Hi,
I tried to use OMX_GetComponentsOfRole/OMX_GetRolesOfComponent functions, but I couldn't make them work. Is it because they haven't been implemented yet, or it's me not using them correctly?
If it hasn't been implemented yet, when it's going to?
Is there any other way (api documentation) to do it with vcilcs since there is already some functions such as vcil_in_component_role_enum in vcilscs header file ?

here is the code I use:

Code: Select all

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#include "bcm_host.h"
#include "ilclient.h"

int main(int argc, char **argv) {
    bcm_host_init();
    if (OMX_Init() != OMX_ErrorNone) {
        return -1;
    }

    OMX_U32 NumRoles;
    OMX_U8 **roles;
    OMX_GetRolesOfComponent("OMX.broadcom.audio_decode", &NumRoles, NULL);
    roles = (OMX_U8**) malloc(NumRoles * sizeof (OMX_U8*));
    printf("Number of Roles %d \n", NumRoles);
    int c;
    for (c = 0; c < NumRoles; c++) {
        roles[c] = (OMX_U8*) malloc(OMX_MAX_STRINGNAME_SIZE);
    }

    OMX_GetRolesOfComponent("OMX.broadcom.audio_decode", &NumRoles, roles);
    for (c = 0; c < NumRoles; c++) {
        printf("Roles:%s\n", roles[c]);
    }
    
    for (c = 0; c < NumRoles; c++) {
        free(roles[c]);
        roles[c] = NULL;
    }
    free(roles);
    roles = NULL;
    OMX_Deinit();
    return 0;
}

OtherCrashOverride
Posts: 582
Joined: Sat Feb 02, 2013 3:25 am

Re: OMX_GetComponentsOfRole and OMX_GetRolesOfComponent

Fri Feb 15, 2013 5:09 pm

If you look at the userland source code, you will find the functions do not do anything. I considered filing this as a bug report, but i have not checked yet whether its *required* for openmax conformance.

fantastico
Posts: 5
Joined: Thu May 24, 2012 4:02 am

Re: OMX_GetComponentsOfRole and OMX_GetRolesOfComponent

Fri Feb 15, 2013 8:00 pm

OtherCrashOverride wrote:If you look at the userland source code, you will find the functions do not do anything. I considered filing this as a bug report, but i have not checked yet whether its *required* for openmax conformance.
I've already check the source code, so my first assumption was that they are not implemented, then I thought may be the compiled libraries have the functionality. After all it seems it's not implemented neither in source codes nor in the compiled libraries.

I don't know about openmax "conformance" requirement, but these functions are the basic standard function of openmax IL, and they are document in the openmax IL specification.

imao, this is a bug for sure, I hope we could get some insider's comment on this before reporting it.

briantopping
Posts: 4
Joined: Sun May 15, 2016 9:50 pm

Re: OMX_GetComponentsOfRole and OMX_GetRolesOfComponent

Thu Jun 02, 2016 9:04 pm

I just ran into the same problem after spending hours implementing the call through a tangled mess of other stuff, assuming it was going to be there when I got to the bottom.

Return to “OpenMAX”