mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-30 21:51:09 +00:00
vaapidecodebin: has_vpp as a tri-state variable
has_vpp can be UNKNOWN while the context message hasn't being received. Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com> https://bugzilla.gnome.org/show_bug.cgi?id=749554
This commit is contained in:
parent
f0d6b0ac3f
commit
0004301714
2 changed files with 13 additions and 6 deletions
|
@ -51,6 +51,13 @@ enum
|
|||
PROP_LAST
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
HAS_VPP_UNKNOWN,
|
||||
HAS_VPP_NO,
|
||||
HAS_VPP_YES
|
||||
};
|
||||
|
||||
static GParamSpec *properties[PROP_LAST];
|
||||
|
||||
/* Default templates */
|
||||
|
@ -122,7 +129,7 @@ activate_vpp (GstVaapiDecodeBin * vaapidecbin)
|
|||
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;
|
||||
}
|
||||
|
@ -265,11 +272,12 @@ gst_vaapi_decode_bin_handle_message (GstBin * bin, GstMessage * message)
|
|||
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;
|
||||
|
@ -391,8 +399,7 @@ gst_vaapi_decode_bin_init (GstVaapiDecodeBin * vaapidecbin)
|
|||
{
|
||||
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;
|
||||
|
|
|
@ -55,7 +55,7 @@ typedef struct _GstVaapiDecodeBin {
|
|||
guint64 max_size_time;
|
||||
GstVaapiDeinterlaceMethod deinterlace_method;
|
||||
gboolean disable_vpp;
|
||||
gboolean has_vpp;
|
||||
guint has_vpp;
|
||||
|
||||
} GstVaapiDecodeBin;
|
||||
|
||||
|
|
Loading…
Reference in a new issue