mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 14:56:36 +00:00
vaapipostproc: set multivew-mode flags to src caps
vaapipostproc didn't negotiate the proper multiview caps losing downstream information. This patch enables the playing of MVC encoded stream by setting the proper multiview mode/flags and views to src caps, according to sink caps. https://bugzilla.gnome.org/show_bug.cgi?id=784320
This commit is contained in:
parent
e7dd25ffc1
commit
e7bba345de
1 changed files with 25 additions and 0 deletions
|
@ -551,6 +551,30 @@ overflow_error:
|
|||
}
|
||||
}
|
||||
|
||||
static gboolean
|
||||
_set_multiview_mode (GstVaapiPostproc * postproc, GstVideoInfo * vinfo,
|
||||
GstStructure * outs)
|
||||
{
|
||||
const gchar *caps_str;
|
||||
|
||||
caps_str =
|
||||
gst_video_multiview_mode_to_caps_string (GST_VIDEO_INFO_MULTIVIEW_MODE
|
||||
(vinfo));
|
||||
if (!caps_str)
|
||||
return TRUE;
|
||||
|
||||
gst_structure_set (outs, "multiview-mode", G_TYPE_STRING, caps_str,
|
||||
"multiview-flags", GST_TYPE_VIDEO_MULTIVIEW_FLAGSET,
|
||||
GST_VIDEO_INFO_MULTIVIEW_FLAGS (vinfo), GST_FLAG_SET_MASK_EXACT, NULL);
|
||||
|
||||
if (GST_VIDEO_INFO_VIEWS (vinfo) > 1) {
|
||||
gst_structure_set (outs, "views", G_TYPE_INT, GST_VIDEO_INFO_VIEWS (vinfo),
|
||||
NULL);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
_set_colorimetry (GstVaapiPostproc * postproc, GstVideoFormat format,
|
||||
GstStructure * outs)
|
||||
|
@ -670,6 +694,7 @@ _get_preferred_caps (GstVaapiPostproc * postproc, GstVideoInfo * vinfo,
|
|||
goto fixate_failed;
|
||||
if (!_fixate_frame_rate (postproc, vinfo, structure))
|
||||
goto fixate_failed;
|
||||
_set_multiview_mode (postproc, vinfo, structure);
|
||||
|
||||
if (f == GST_VAAPI_CAPS_FEATURE_SYSTEM_MEMORY)
|
||||
_set_colorimetry (postproc, format, structure);
|
||||
|
|
Loading…
Reference in a new issue