library_entry_point.c

Go to the documentation of this file.
00001 
00035 #include <st_static_component_loader.h>
00036 #include <omx_clocksrc_component.h>
00037 
00051 int omx_component_library_Setup(stLoaderComponentType **stComponents) {
00052   OMX_U32 i;
00053   
00054   DEBUG(DEB_LEV_FUNCTION_NAME, "In %s \n",__func__);
00055 
00056   if (stComponents == NULL) {
00057     DEBUG(DEB_LEV_FUNCTION_NAME, "Out of %s \n",__func__);
00058     return 1; // Return Number of Component/s
00059   }
00060 
00061   stComponents[0]->componentVersion.s.nVersionMajor = 1; 
00062   stComponents[0]->componentVersion.s.nVersionMinor = 1; 
00063   stComponents[0]->componentVersion.s.nRevision = 1;
00064   stComponents[0]->componentVersion.s.nStep = 1;
00065 
00066   stComponents[0]->name = calloc(1,OMX_MAX_STRINGNAME_SIZE);
00067   if (stComponents[0]->name == NULL) {
00068     return OMX_ErrorInsufficientResources;
00069   }
00070 
00071   strcpy(stComponents[0]->name, "OMX.st.clocksrc");
00072   stComponents[0]->name_specific_length = 1; 
00073   stComponents[0]->constructor = omx_clocksrc_component_Constructor;  
00074 
00075   stComponents[0]->name_specific = calloc(stComponents[0]->name_specific_length,sizeof(char *));  
00076   stComponents[0]->role_specific = calloc(stComponents[0]->name_specific_length,sizeof(char *));  
00077 
00078   for(i=0;i<stComponents[0]->name_specific_length;i++) {
00079     stComponents[0]->name_specific[i] = calloc(1, OMX_MAX_STRINGNAME_SIZE);
00080     if (stComponents[0]->name_specific[i] == NULL) {
00081       return OMX_ErrorInsufficientResources;
00082     }
00083   }
00084   for(i=0;i<stComponents[0]->name_specific_length;i++) {
00085     stComponents[0]->role_specific[i] = calloc(1, OMX_MAX_STRINGNAME_SIZE);
00086     if (stComponents[0]->role_specific[i] == NULL) {
00087       return OMX_ErrorInsufficientResources;
00088     }
00089   }
00090 
00091   strcpy(stComponents[0]->name_specific[0], "OMX.st.clocksrc");
00092   strcpy(stComponents[0]->role_specific[0], "clocksrc");
00093 
00094   DEBUG(DEB_LEV_FUNCTION_NAME, "Out of %s \n",__func__);
00095   return 1;
00096 }
00097 

Generated for OpenMAX Bellagio rel. 0.9.0 by  doxygen 1.5.1
SourceForge.net Logo