fedora-fixes.patch 9.3 KB

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