mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
omxh265: fix enum casting when using Allegro HEVC extensions
Allegro's HEVC implementation defines a superset of the profiles and enums from the Android implementation. Properly cast to fix -Wenum-conversion warnings from clang. https://bugzilla.gnome.org/show_bug.cgi?id=789057
This commit is contained in:
parent
cc0e3c8320
commit
2da61ef2bf
2 changed files with 12 additions and 3 deletions
|
@ -268,9 +268,18 @@ update_param_hevc (GstOMXH265Enc * self,
|
|||
}
|
||||
|
||||
if (profile != OMX_VIDEO_HEVCProfileUnknown)
|
||||
#ifdef USE_OMX_TARGET_ZYNQ_USCALE_PLUS
|
||||
param.eProfile = (OMX_ALG_VIDEO_HEVCPROFILETYPE) profile;
|
||||
#else
|
||||
param.eProfile = profile;
|
||||
#endif
|
||||
|
||||
if (level != OMX_VIDEO_HEVCLevelUnknown)
|
||||
#ifdef USE_OMX_TARGET_ZYNQ_USCALE_PLUS
|
||||
param.eLevel = (OMX_ALG_VIDEO_HEVCLEVELTYPE) level;
|
||||
#else
|
||||
param.eLevel = level;
|
||||
#endif
|
||||
|
||||
/* GOP pattern */
|
||||
#ifdef USE_OMX_TARGET_ZYNQ_USCALE_PLUS
|
||||
|
|
|
@ -34,11 +34,11 @@ gst_omx_h265_utils_get_profile_from_str (const gchar * profile)
|
|||
return OMX_VIDEO_HEVCProfileMain10;
|
||||
#ifdef USE_OMX_TARGET_ZYNQ_USCALE_PLUS
|
||||
} else if (g_str_equal (profile, "main-still-picture")) {
|
||||
return OMX_ALG_VIDEO_HEVCProfileMainStill;
|
||||
return (OMX_VIDEO_HEVCPROFILETYPE) OMX_ALG_VIDEO_HEVCProfileMainStill;
|
||||
} else if (g_str_equal (profile, "main422")) {
|
||||
return OMX_ALG_VIDEO_HEVCProfileMain422;
|
||||
return (OMX_VIDEO_HEVCPROFILETYPE) OMX_ALG_VIDEO_HEVCProfileMain422;
|
||||
} else if (g_str_equal (profile, "main422-10")) {
|
||||
return OMX_ALG_VIDEO_HEVCProfileMain422_10;
|
||||
return (OMX_VIDEO_HEVCPROFILETYPE) OMX_ALG_VIDEO_HEVCProfileMain422_10;
|
||||
#endif
|
||||
}
|
||||
return OMX_VIDEO_HEVCProfileUnknown;
|
||||
|
|
Loading…
Reference in a new issue