msdk: exclude the audio code for MFX version 2.0+
authorHaihao Xiang <haihao.xiang@intel.com>
Tue, 4 Aug 2020 04:55:35 +0000 (12:55 +0800)
committerHaihao Xiang <haihao.xiang@intel.com>
Mon, 17 May 2021 01:58:24 +0000 (01:58 +0000)
MFX version 2.0+ no longer supports audio functions, please refer to the
links below for details

https://spec.oneapi.com/versions/latest/elements/oneVPL/source/appendix/VPL_intel_media_sdk.html#msdk-full-name-feature-removals
https://github.com/oneapi-src/oneVPL

This is in preparation for oneVPL support

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1503>

sys/msdk/msdk.c

index a4ce2c5..df7fd75 100644 (file)
@@ -123,10 +123,12 @@ msdk_status_to_string (mfxStatus status)
       return "device operation failure";
     case MFX_ERR_MORE_BITSTREAM:
       return "expect more bitstream buffers at output";
+#if (MFX_VERSION < 2000)
     case MFX_ERR_INCOMPATIBLE_AUDIO_PARAM:
       return "incompatible audio parameters";
     case MFX_ERR_INVALID_AUDIO_PARAM:
       return "invalid audio parameters";
+#endif
       /* warnings >0 */
     case MFX_WRN_IN_EXECUTION:
       return "the previous asynchronous operation is in execution";
@@ -144,8 +146,10 @@ msdk_status_to_string (mfxStatus status)
       return "the value is out of valid range";
     case MFX_WRN_FILTER_SKIPPED:
       return "one of requested filters has been skipped";
+#if (MFX_VERSION < 2000)
     case MFX_WRN_INCOMPATIBLE_AUDIO_PARAM:
       return "incompatible audio parameters";
+#endif
     default:
       break;
   }