library_entry_point.c

Go to the documentation of this file.
00001 
00035 #include <st_static_component_loader.h>
00036 #include <omx_alsasink_component.h>
00037 #include <omx_alsasrc_component.h>
00038 
00052  int omx_component_library_Setup(stLoaderComponentType **stComponents) {
00053   OMX_U32 i;
00054   DEBUG(DEB_LEV_FUNCTION_NAME, "In %s \n",__func__);
00055   if (stComponents == NULL) {
00056     DEBUG(DEB_LEV_FUNCTION_NAME, "Out of %s \n",__func__);
00057     return 2; // Return Number of Component/s
00058   }
00059 
00060   stComponents[0]->componentVersion.s.nVersionMajor = 1; 
00061   stComponents[0]->componentVersion.s.nVersionMinor = 1; 
00062   stComponents[0]->componentVersion.s.nRevision = 1;
00063   stComponents[0]->componentVersion.s.nStep = 1;
00064 
00065   stComponents[0]->name = calloc(1,OMX_MAX_STRINGNAME_SIZE);
00066   if (stComponents[0]->name == NULL) {
00067     return OMX_ErrorInsufficientResources;
00068   }
00069   strcpy(stComponents[0]->name, "OMX.st.alsa.alsasink");
00070   stComponents[0]->name_specific_length = 1;
00071   stComponents[0]->constructor = omx_alsasink_component_Constructor;  
00072 
00073   stComponents[0]->name_specific = calloc(stComponents[0]->name_specific_length,sizeof(char *));  
00074   stComponents[0]->role_specific = calloc(stComponents[0]->name_specific_length,sizeof(char *));  
00075 
00076   for(i=0;i<stComponents[0]->name_specific_length;i++) {
00077     stComponents[0]->name_specific[i] = calloc(1, OMX_MAX_STRINGNAME_SIZE);
00078     if (stComponents[0]->name_specific[i] == NULL) {
00079       return OMX_ErrorInsufficientResources;
00080     }
00081   }
00082   for(i=0;i<stComponents[0]->name_specific_length;i++) {
00083     stComponents[0]->role_specific[i] = calloc(1, OMX_MAX_STRINGNAME_SIZE);
00084     if (stComponents[0]->role_specific[i] == NULL) {
00085       return OMX_ErrorInsufficientResources;
00086     }
00087   }
00088 
00089   strcpy(stComponents[0]->name_specific[0], "OMX.st.alsa.alsasink");
00090   strcpy(stComponents[0]->role_specific[0], "alsa.alsasink");
00091   
00092   stComponents[1]->componentVersion.s.nVersionMajor = 1; 
00093   stComponents[1]->componentVersion.s.nVersionMinor = 1; 
00094   stComponents[1]->componentVersion.s.nRevision = 1;
00095   stComponents[1]->componentVersion.s.nStep = 1;
00096 
00097   stComponents[1]->name = calloc(1,OMX_MAX_STRINGNAME_SIZE);
00098   if (stComponents[1]->name == NULL) {
00099     return OMX_ErrorInsufficientResources;
00100   }
00101   strcpy(stComponents[1]->name, "OMX.st.alsa.alsasrc");
00102   stComponents[1]->name_specific_length = 1;
00103   stComponents[1]->constructor = omx_alsasrc_component_Constructor;  
00104 
00105   stComponents[1]->name_specific = calloc(stComponents[1]->name_specific_length,sizeof(char *));  
00106   stComponents[1]->role_specific = calloc(stComponents[1]->name_specific_length,sizeof(char *));  
00107 
00108   for(i=0;i<stComponents[1]->name_specific_length;i++) {
00109     stComponents[1]->name_specific[i] = calloc(1, OMX_MAX_STRINGNAME_SIZE);
00110     if (stComponents[1]->name_specific[i] == NULL) {
00111       return OMX_ErrorInsufficientResources;
00112     }
00113   }
00114   for(i=0;i<stComponents[1]->name_specific_length;i++) {
00115     stComponents[1]->role_specific[i] = calloc(1, OMX_MAX_STRINGNAME_SIZE);
00116     if (stComponents[1]->role_specific[i] == NULL) {
00117       return OMX_ErrorInsufficientResources;
00118     }
00119   }
00120 
00121   strcpy(stComponents[1]->name_specific[0], "OMX.st.alsa.alsasrc");
00122   strcpy(stComponents[1]->role_specific[0], "alsa.alsasrc");
00123 
00124   DEBUG(DEB_LEV_FUNCTION_NAME, "Out of %s \n",__func__);
00125   return 2;
00126 }

Generated for OpenMAX Bellagio rel. 0.3.5-svn by  doxygen 1.5.1
SourceForge.net Logo