Fixes build with omx >= 1.2.0
authorJulien Isorce <jisorce@oblong.com>
Tue, 16 Apr 2019 19:23:10 +0000 (12:23 -0700)
committerJulien Isorce <jisorce@oblong.com>
Tue, 16 Apr 2019 19:26:03 +0000 (12:26 -0700)
gstomx.c:1405:10: error: â€˜OMX_IndexParamCustomContentPipe’ undeclared (first use in this function)
    case OMX_IndexParamCustomContentPipe

Some enums have been deprecated in 1.2.0

https://gitlab.freedesktop.org/gstreamer/gst-omx/issues/27

omx/gstomx.c

index 49743c0..038ce32 100644 (file)
@@ -1402,8 +1402,6 @@ omx_index_type_to_str (OMX_INDEXTYPE index)
       return "OMX_IndexAutoPauseAfterCapture";
     case OMX_IndexParamContentURI:
       return "OMX_IndexParamContentURI";
-    case OMX_IndexParamCustomContentPipe:
-      return "OMX_IndexParamCustomContentPipe";
     case OMX_IndexParamDisableResourceConcealment:
       return "OMX_IndexParamDisableResourceConcealment";
     case OMX_IndexConfigMetadataItemCount:
@@ -1660,10 +1658,6 @@ omx_index_type_to_str (OMX_INDEXTYPE index)
       return "OMX_IndexConfigCommonOutputSize";
     case OMX_IndexParamCommonExtraQuantData:
       return "OMX_IndexParamCommonExtraQuantData";
-    case OMX_IndexConfigCommonFocusRegion:
-      return "OMX_IndexConfigCommonFocusRegion";
-    case OMX_IndexConfigCommonFocusStatus:
-      return "OMX_IndexConfigCommonFocusStatus";
     case OMX_IndexConfigCommonTransitionEffect:
       return "OMX_IndexConfigCommonTransitionEffect";
     case OMX_IndexOtherStartUnused:
@@ -1680,16 +1674,10 @@ omx_index_type_to_str (OMX_INDEXTYPE index)
       return "OMX_IndexConfigTimeScale";
     case OMX_IndexConfigTimeClockState:
       return "OMX_IndexConfigTimeClockState";
-    case OMX_IndexConfigTimeActiveRefClock:
-      return "OMX_IndexConfigTimeActiveRefClock";
     case OMX_IndexConfigTimeCurrentMediaTime:
       return "OMX_IndexConfigTimeCurrentMediaTime";
     case OMX_IndexConfigTimeCurrentWallTime:
       return "OMX_IndexConfigTimeCurrentWallTime";
-    case OMX_IndexConfigTimeCurrentAudioReference:
-      return "OMX_IndexConfigTimeCurrentAudioReference";
-    case OMX_IndexConfigTimeCurrentVideoReference:
-      return "OMX_IndexConfigTimeCurrentVideoReference";
     case OMX_IndexConfigTimeMediaTimeRequest:
       return "OMX_IndexConfigTimeMediaTimeRequest";
     case OMX_IndexConfigTimeClientStartTime:
@@ -1708,6 +1696,25 @@ omx_index_type_to_str (OMX_INDEXTYPE index)
       break;
   }
 
+#if OMX_VERSION_MINOR == 1
+  switch (index) {
+    case OMX_IndexParamCustomContentPipe:
+      return "OMX_IndexParamCustomContentPipe";
+    case OMX_IndexConfigCommonFocusRegion:
+      return "OMX_IndexConfigCommonFocusRegion";
+    case OMX_IndexConfigCommonFocusStatus:
+      return "OMX_IndexConfigCommonFocusStatus";
+    case OMX_IndexConfigTimeActiveRefClock:
+      return "OMX_IndexConfigTimeActiveRefClock";
+    case OMX_IndexConfigTimeCurrentAudioReference:
+      return "OMX_IndexConfigTimeCurrentAudioReference";
+    case OMX_IndexConfigTimeCurrentVideoReference:
+      return "OMX_IndexConfigTimeCurrentVideoReference";
+    default:
+      break;
+  }
+#endif
+
 #ifdef USE_OMX_TARGET_ZYNQ_USCALE_PLUS
   switch ((OMX_ALG_INDEXTYPE) index) {
     case OMX_ALG_IndexVendorComponentStartUnused: