st/omx: provide constant number of components
The number of components and their names/roles should be kept constant as all of that information cached. Note: Make sure to rebuild the .omxregister file, by executing $ omxregister-bellagio. Cc: Leo Liu <leo.liu@amd.com> Cc: Christian König <christian.koenig@amd.com> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
This commit is contained in:
@@ -51,22 +51,21 @@ static unsigned omx_usecount = 0;
|
||||
int omx_component_library_Setup(stLoaderComponentType **stComponents)
|
||||
{
|
||||
OMX_ERRORTYPE r;
|
||||
unsigned i = 0;
|
||||
|
||||
if (stComponents == NULL)
|
||||
return 2;
|
||||
|
||||
/* component 0 - video decoder */
|
||||
r = vid_dec_LoaderComponent(stComponents[i]);
|
||||
if (r == OMX_ErrorNone)
|
||||
++i;
|
||||
r = vid_dec_LoaderComponent(stComponents[0]);
|
||||
if (r != OMX_ErrorNone)
|
||||
return OMX_ErrorInsufficientResources;
|
||||
|
||||
/* component 1 - video encoder */
|
||||
r = vid_enc_LoaderComponent(stComponents[i]);
|
||||
if (r == OMX_ErrorNone)
|
||||
++i;
|
||||
r = vid_enc_LoaderComponent(stComponents[1]);
|
||||
if (r != OMX_ErrorNone)
|
||||
return OMX_ErrorInsufficientResources;
|
||||
|
||||
return i;
|
||||
return 2;
|
||||
}
|
||||
|
||||
struct vl_screen *omx_get_screen(void)
|
||||
|
||||
Reference in New Issue
Block a user