00001
00035 #include <st_static_component_loader.h>
00036 #include <omx_parser3gp_component.h>
00037
00051 int omx_component_library_Setup(stLoaderComponentType **stComponents) {
00052 OMX_U32 i;
00053 DEBUG(DEB_LEV_FUNCTION_NAME, "In %s \n",__func__);
00054
00055 if (stComponents == NULL) {
00056 DEBUG(DEB_LEV_FUNCTION_NAME, "Out of %s \n",__func__);
00057 return 1;
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
00070 strcpy(stComponents[0]->name, "OMX.st.parser.3gp");
00071 stComponents[0]->name_specific_length = 1;
00072 stComponents[0]->constructor = omx_parser3gp_component_Constructor;
00073
00074 stComponents[0]->name_specific = calloc(stComponents[0]->name_specific_length,sizeof(char *));
00075 stComponents[0]->role_specific = calloc(stComponents[0]->name_specific_length,sizeof(char *));
00076
00077 for(i=0;i<stComponents[0]->name_specific_length;i++) {
00078 stComponents[0]->name_specific[i] = calloc(1, OMX_MAX_STRINGNAME_SIZE);
00079 if (stComponents[0]->name_specific[i] == NULL) {
00080 return OMX_ErrorInsufficientResources;
00081 }
00082 }
00083 for(i=0;i<stComponents[0]->name_specific_length;i++) {
00084 stComponents[0]->role_specific[i] = calloc(1, OMX_MAX_STRINGNAME_SIZE);
00085 if (stComponents[0]->role_specific[i] == NULL) {
00086 return OMX_ErrorInsufficientResources;
00087 }
00088 }
00089
00090 strcpy(stComponents[0]->name_specific[0], "OMX.st.parser.3gp");
00091 strcpy(stComponents[0]->role_specific[0], "parser.3gp");
00092
00093 DEBUG(DEB_LEV_FUNCTION_NAME, "Out of %s \n",__func__);
00094 return 1;
00095 }
00096