00001
00036 #include <st_static_component_loader.h>
00037 #include <omx_fbdev_sink_component.h>
00038
00052 int omx_component_library_Setup(stLoaderComponentType **stComponents) {
00053 int i;
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;
00059 }
00060
00062 stComponents[0]->componentVersion.s.nVersionMajor = 1;
00063 stComponents[0]->componentVersion.s.nVersionMinor = 1;
00064 stComponents[0]->componentVersion.s.nRevision = 1;
00065 stComponents[0]->componentVersion.s.nStep = 1;
00066
00067 stComponents[0]->name = calloc(1, OMX_MAX_STRINGNAME_SIZE);
00068 if (stComponents[0]->name == NULL) {
00069 return OMX_ErrorInsufficientResources;
00070 }
00071 strcpy(stComponents[0]->name, "OMX.st.fbdev.fbdev_sink");
00072 stComponents[0]->name_specific_length = 1;
00073 stComponents[0]->constructor = omx_fbdev_sink_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 strcpy(stComponents[0]->name_specific[0], "OMX.st.fbdev.fbdev_sink");
00091 strcpy(stComponents[0]->role_specific[0], "fbdev.fbdev_sink");
00092
00093 DEBUG(DEB_LEV_FUNCTION_NAME, "Out of %s \n",__func__);
00094 return 1;
00095 }