PROP_LAST
};
+enum
+{
+ HAS_VPP_UNKNOWN,
+ HAS_VPP_NO,
+ HAS_VPP_YES
+};
+
static GParamSpec *properties[PROP_LAST];
/* Default templates */
if (vaapidecbin->ghost_pad_src || vaapidecbin->postproc)
return TRUE;
- if (!vaapidecbin->has_vpp || vaapidecbin->disable_vpp) {
+ if (vaapidecbin->has_vpp != HAS_VPP_YES || vaapidecbin->disable_vpp) {
src = vaapidecbin->queue;
goto connect_src_ghost_pad;
}
if (!gst_vaapi_video_context_get_display (context, &display))
goto bail;
- vaapidecbin->has_vpp = gst_vaapi_display_has_video_processing (display);
+ vaapidecbin->has_vpp = gst_vaapi_display_has_video_processing (display) ?
+ HAS_VPP_YES : HAS_VPP_NO;
/* the underlying VA driver implementation doesn't support video
* post-processing, hence we have to disable it */
- if (!vaapidecbin->has_vpp) {
+ if (vaapidecbin->has_vpp != HAS_VPP_YES) {
GST_WARNING_OBJECT (vaapidecbin, "VA driver doesn't support VPP");
if (!vaapidecbin->disable_vpp) {
vaapidecbin->disable_vpp = TRUE;
{
GstPad *element_pad, *ghost_pad;
- /* let's assume we have VPP until we prove the opposite */
- vaapidecbin->has_vpp = TRUE;
+ vaapidecbin->has_vpp = HAS_VPP_UNKNOWN;
if (!gst_vaapi_decode_bin_configure (vaapidecbin))
return;