1 When libomxdynamicloader.so is loaded, it complains that RM_Deinit can't be resolved.
2 Link explicitly against omxil-bellagio so that ld.so can find the reference.
4 Signed-off-by: Qais Yousef <qais.yousef@imgtec.com>
6 --- bellagio-0.9.3/src/dynamic_loader/Makefile.am.old 2012-03-23 15:07:47.379021034 +0000
7 +++ bellagio-0.9.3/src/dynamic_loader/Makefile.am 2012-03-23 15:08:47.563034818 +0000
9 omxdynamicloader_LTLIBRARIES = libomxdynamicloader.la
10 libomxdynamicloader_la_SOURCES = ste_dynamic_component_loader.c ste_dynamic_component_loader.h
12 -libomxdynamicloader_la_LDFLAGS =
13 +libomxdynamicloader_la_LDFLAGS = -L$(abs_top_srcdir)/src/.libs -lomxil-bellagio
14 libomxdynamicloader_la_CFLAGS = -I$(top_srcdir)/include \
16 -I$(top_srcdir)/src/base \
17 Fix dependency issue to allow parallel build
19 Signed-off-by: Qais Yousef <qais.yousef@imgtec.com>
21 Index: bellagio-0.9.3/src/Makefile.am
22 ===================================================================
23 --- bellagio-0.9.3.orig/src/Makefile.am
24 +++ bellagio-0.9.3/src/Makefile.am
25 @@ -8,6 +8,7 @@ omxregister_bellagio_SOURCES = omxregist
26 omxregister_bellagio_CFLAGS = -DOMXILCOMPONENTSPATH=\"$(plugindir)/\" \
27 -I$(top_srcdir)/include
28 omxregister_bellagio_LDFLAGS = -lomxil-bellagio -L$(builddir)
29 +omxregister_bellagio_DEPENDENCIES = libomxil-bellagio.la
31 lib_LTLIBRARIES = libomxil-bellagio.la
32 libomxil_bellagio_la_SOURCES = component_loader.h \
33 We always access globalComponentList[] at indexComponent=-1 which causes a
34 segfault. Use i as the index instead.
36 Signed-off-by: Qais Yousef <qais.yousef@imgtec.com>
38 --- bellagio-0.9.3/src/omx_reference_resource_manager.c.old 2012-03-13 10:15:25.743940980 +0000
39 +++ bellagio-0.9.3/src/omx_reference_resource_manager.c 2012-03-13 10:18:02.201971009 +0000
41 OMX_ERRORTYPE RM_removeFromWaitForResource(OMX_COMPONENTTYPE *openmaxStandComp) {
42 omx_base_component_PrivateType* omx_base_component_Private;
44 - int indexComponent = -1;
46 DEBUG(DEB_LEV_FUNCTION_NAME, "In %s\n", __func__);
47 omx_base_component_Private = (omx_base_component_PrivateType*)openmaxStandComp->pComponentPrivate;
49 while(listOfcomponentRegistered[i].component_name != NULL ) {
50 if (!strcmp(listOfcomponentRegistered[i].component_name, omx_base_component_Private->name)) {
51 // found component in the list of the resource manager
52 - removeElemFromList(&globalComponentList[indexComponent], openmaxStandComp);
54 + removeElemFromList(&globalComponentList[i], openmaxStandComp);
55 + DEBUG(DEB_LEV_FUNCTION_NAME, "Out of %s\n", __func__);
56 + return OMX_ErrorNone;
60 - if (indexComponent <0) {
61 - // No resource to be handled
62 - DEBUG(DEB_LEV_ERR, "In %s No resource to be handled\n", __func__);
63 - return OMX_ErrorNone;
65 - DEBUG(DEB_LEV_FUNCTION_NAME, "Out of %s\n", __func__);
66 + // No resource to be handled
67 + DEBUG(DEB_LEV_ERR, "In %s No resource to be handled\n", __func__);
70 OMX_INDEXTYPE/OMX_INDEXVENDORTYPE in one switch
71 src/base/omx_base_component.c | 54 ++++++++++++++++++++++-------------------
72 1 files changed, 29 insertions(+), 25 deletions(-)
73 --- a/src/base/omx_base_component.c
74 +++ a/src/base/omx_base_component.c
75 @@ -915,14 +915,6 @@ OSCL_EXPORT_REF OSCL_EXPORT_REF OMX_ERRORTYPE omx_base_component_GetParameter(
76 return OMX_ErrorBadParameter;
79 - case OMX_IndexParameterThreadsID:
80 - if ((err = checkHeader(ComponentParameterStructure, sizeof(OMX_PARAM_BELLAGIOTHREADS_ID))) != OMX_ErrorNone) {
83 - threadID = (OMX_PARAM_BELLAGIOTHREADS_ID *)ComponentParameterStructure;
84 - threadID->nThreadBufferMngtID = omx_base_component_Private->bellagioThreads->nThreadBufferMngtID;
85 - threadID->nThreadMessageID = omx_base_component_Private->bellagioThreads->nThreadMessageID;
87 case OMX_IndexParamAudioInit:
88 case OMX_IndexParamVideoInit:
89 case OMX_IndexParamImageInit:
90 @@ -988,28 +980,40 @@ OSCL_EXPORT_REF OSCL_EXPORT_REF OMX_ERRORTYPE omx_base_component_GetParameter(
94 - case OMX_IndexVendorCompPropTunnelFlags:
95 - pPropTunnelSetup = (OMX_VENDOR_PROP_TUNNELSETUPTYPE*)ComponentParameterStructure;
97 + /* additional switch statement for extended OMX_INDEXTYPE */
98 + switch((OMX_INDEXVENDORTYPE) nParamIndex) {
99 + case OMX_IndexParameterThreadsID:
100 + if ((err = checkHeader(ComponentParameterStructure, sizeof(OMX_PARAM_BELLAGIOTHREADS_ID))) != OMX_ErrorNone) {
103 + threadID = (OMX_PARAM_BELLAGIOTHREADS_ID *)ComponentParameterStructure;
104 + threadID->nThreadBufferMngtID = omx_base_component_Private->bellagioThreads->nThreadBufferMngtID;
105 + threadID->nThreadMessageID = omx_base_component_Private->bellagioThreads->nThreadMessageID;
107 + case OMX_IndexVendorCompPropTunnelFlags:
108 + pPropTunnelSetup = (OMX_VENDOR_PROP_TUNNELSETUPTYPE*)ComponentParameterStructure;
110 - if (pPropTunnelSetup->nPortIndex >= (omx_base_component_Private->sPortTypesParam[OMX_PortDomainAudio].nPorts +
111 - omx_base_component_Private->sPortTypesParam[OMX_PortDomainVideo].nPorts +
112 - omx_base_component_Private->sPortTypesParam[OMX_PortDomainImage].nPorts +
113 - omx_base_component_Private->sPortTypesParam[OMX_PortDomainOther].nPorts)) {
114 + if (pPropTunnelSetup->nPortIndex >= (omx_base_component_Private->sPortTypesParam[OMX_PortDomainAudio].nPorts +
115 + omx_base_component_Private->sPortTypesParam[OMX_PortDomainVideo].nPorts +
116 + omx_base_component_Private->sPortTypesParam[OMX_PortDomainImage].nPorts +
117 + omx_base_component_Private->sPortTypesParam[OMX_PortDomainOther].nPorts)) {
119 - DEBUG(DEB_LEV_ERR,"In %s OMX_IndexVendorCompPropTunnelFlags nPortIndex=%d Line=%d \n",
120 - __func__,(int)pPropTunnelSetup->nPortIndex,__LINE__);
121 + DEBUG(DEB_LEV_ERR,"In %s OMX_IndexVendorCompPropTunnelFlags nPortIndex=%d Line=%d \n",
122 + __func__,(int)pPropTunnelSetup->nPortIndex,__LINE__);
124 - return OMX_ErrorBadPortIndex;
126 + return OMX_ErrorBadPortIndex;
129 - pPort = omx_base_component_Private->ports[pPropTunnelSetup->nPortIndex];
130 + pPort = omx_base_component_Private->ports[pPropTunnelSetup->nPortIndex];
132 - pPropTunnelSetup->nTunnelSetup.nTunnelFlags = pPort->nTunnelFlags;
133 - pPropTunnelSetup->nTunnelSetup.eSupplier = pPort->eBufferSupplier;
136 - err = OMX_ErrorUnsupportedIndex;
138 + pPropTunnelSetup->nTunnelSetup.nTunnelFlags = pPort->nTunnelFlags;
139 + pPropTunnelSetup->nTunnelSetup.eSupplier = pPort->eBufferSupplier;
142 + err = OMX_ErrorUnsupportedIndex;
146 DEBUG(DEB_LEV_FUNCTION_NAME, "Out of %s for component %p\n", __func__, hComponent);
148 diff -up libomxil-bellagio-0.9.3/Makefile.am.nodoc libomxil-bellagio-0.9.3/Makefile.am
149 --- libomxil-bellagio-0.9.3/Makefile.am.nodoc 2011-01-12 08:53:26.000000000 +0100
150 +++ libomxil-bellagio-0.9.3/Makefile.am 2012-04-23 13:46:15.410823381 +0200
151 @@ -7,7 +7,6 @@ EXTRA_DIST = libomxil-bellagio.spec
152 pkgconfigdir = $(libdir)/pkgconfig
153 pkgconfig_DATA = libomxil-bellagio.pc
155 -docdir = $(DESTDIR)$(prefix)/share/doc/@PACKAGE@
159 diff -up libomxil-bellagio-0.9.3/src/omxregister.c.unused libomxil-bellagio-0.9.3/src/omxregister.c
160 --- libomxil-bellagio-0.9.3/src/omxregister.c.unused 2011-01-12 08:53:26.000000000 +0100
161 +++ libomxil-bellagio-0.9.3/src/omxregister.c 2012-12-10 22:02:28.621695659 +0100
162 @@ -248,7 +248,15 @@ static int buildComponentsList(FILE* omx
165 err = fwrite(lib_absolute_path, 1, strlen(lib_absolute_path), omxregistryfp);
166 - err = fwrite("\n", 1, 1, omxregistryfp);
167 + if (err != strlen(lib_absolute_path)) {
168 + DEBUG(DEB_LEV_ERR, "Failed to write %zu bytes to fd %d\n", strlen(lib_absolute_path), fileno(omxregistryfp));
171 + err = fwrite("\n", 1, strlen(buffer), omxregistryfp);
172 + if (err != strlen(buffer)) {
173 + DEBUG(DEB_LEV_ERR, "Failed to write %zu bytes to fd %d\n", strlen(buffer), fileno(omxregistryfp));
178 for (i = 0; i<num_of_comp; i++) {
179 --- libomxil-bellagio-0.9.3/include/OMX_Types.h.orig 2011-01-12 08:53:26.000000000 +0100
180 +++ libomxil-bellagio-0.9.3/include/OMX_Types.h 2013-02-25 09:53:55.000000000 +0100
182 * platform & operating specific object used to reference the window */
183 typedef void* OMX_NATIVE_WINDOWTYPE;
186 +/** Define the OMX IL version that corresponds to this set of header files.
187 + * We also define a combined version that can be used to write or compare
188 + * values of the 32bit nVersion field, assuming a little endian architecture */
189 +#define OMX_VERSION_MAJOR 1
190 +#define OMX_VERSION_MINOR 1
191 +#define OMX_VERSION_REVISION 2
192 +#define OMX_VERSION_STEP 0
194 +#define OMX_VERSION ((OMX_VERSION_STEP<<24) | (OMX_VERSION_REVISION<<16) | (OMX_VERSION_MINOR<<8) | OMX_VERSION_MAJOR)
197 /** The OMX_VERSIONTYPE union is used to specify the version for
198 a structure or component. For a component, the version is entirely
199 specified by the component vendor. Components doing the same function