aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEmil Velikov <[email protected]>2014-06-10 02:28:00 +0100
committerEmil Velikov <[email protected]>2014-06-26 14:05:12 +0100
commit9a9742f92c9ad9d8af7fbddc96a18157f7945d61 (patch)
treee12f058eb89590900c6eb7ffcc8d7cb5d19cb766 /src
parent2670d0f91d631c72d83e97d1ecc512a4a624f669 (diff)
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 <[email protected]> Cc: Christian König <[email protected]> Signed-off-by: Emil Velikov <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/state_trackers/omx/entrypoint.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/gallium/state_trackers/omx/entrypoint.c b/src/gallium/state_trackers/omx/entrypoint.c
index d6f149e623e..a7656660e8c 100644
--- a/src/gallium/state_trackers/omx/entrypoint.c
+++ b/src/gallium/state_trackers/omx/entrypoint.c
@@ -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)