mm-video-v4l2: vdec: add HEVC main10 profile query support

Add HEVC main10 profile in the supported profile list for client's
query.

Change-Id: I1e3a9d204b3340bad68a57bee9f23ff04052acd1
diff --git a/mm-video-v4l2/vidc/vdec/src/omx_vdec_v4l2.cpp b/mm-video-v4l2/vidc/vdec/src/omx_vdec_v4l2.cpp
index d347f2d..5924cf8 100755
--- a/mm-video-v4l2/vidc/vdec/src/omx_vdec_v4l2.cpp
+++ b/mm-video-v4l2/vidc/vdec/src/omx_vdec_v4l2.cpp
@@ -3373,7 +3373,8 @@
                             QOMX_VIDEO_AVCProfileMain,
                             QOMX_VIDEO_AVCProfileConstrainedHigh,
                             QOMX_VIDEO_AVCProfileHigh };
-    int hevc_profiles[2] = { OMX_VIDEO_HEVCProfileMain,
+    int hevc_profiles[3] = { OMX_VIDEO_HEVCProfileMain,
+                             OMX_VIDEO_HEVCProfileMain10,
                              OMX_VIDEO_HEVCProfileMain10HDR10 };
     int mpeg2_profiles[2] = { OMX_VIDEO_MPEG2ProfileSimple,
                               OMX_VIDEO_MPEG2ProfileMain};
@@ -3478,9 +3479,24 @@
     /* Check if the profile is supported by driver or not  */
     /* During query caps of profile driver sends a mask of */
     /* of all v4l2 profiles supported(in the flags field)  */
-    if (!profile_level_converter::convert_omx_profile_to_v4l2(output_capability, profileLevelType->eProfile, &v4l2_profile)) {
-        DEBUG_PRINT_ERROR("Invalid profile, cannot find corresponding omx profile");
-        return OMX_ErrorHardware;
+    if(output_capability != V4L2_PIX_FMT_HEVC) {
+        if (!profile_level_converter::convert_omx_profile_to_v4l2(output_capability, profileLevelType->eProfile, &v4l2_profile)) {
+            DEBUG_PRINT_ERROR("Invalid profile, cannot find corresponding omx profile");
+            return OMX_ErrorHardware;
+        }
+    }else { //convert omx profile to v4l2 profile for HEVC Main10 and Main10HDR10 profiles,seperately
+        switch (profileLevelType->eProfile) {
+            case OMX_VIDEO_HEVCProfileMain:
+                v4l2_profile = V4L2_MPEG_VIDC_VIDEO_HEVC_PROFILE_MAIN;
+                break;
+            case OMX_VIDEO_HEVCProfileMain10:
+            case OMX_VIDEO_HEVCProfileMain10HDR10:
+                v4l2_profile = V4L2_MPEG_VIDC_VIDEO_HEVC_PROFILE_MAIN10;
+                break;
+            default:
+                DEBUG_PRINT_ERROR("Invalid profile, cannot find corresponding omx profile");
+                return OMX_ErrorHardware;
+        }
     }
 
     if(!((profile_cap.flags >> v4l2_profile) & 0x1)) {