mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
VDPAU: Move I420/YV12 to the front of the caps. Add debug.
Make I420/YV12 caps be preferred when downloading to YUV buffers, when possible, by listing them first in the set of output caps. Add some debug in the caps selection code.
This commit is contained in:
parent
da11b1672f
commit
eb528cbcc4
2 changed files with 13 additions and 10 deletions
|
@ -84,6 +84,16 @@ static const VdpChromaType chroma_types[N_CHROMA_TYPES] =
|
|||
{ VDP_CHROMA_TYPE_420, VDP_CHROMA_TYPE_422, VDP_CHROMA_TYPE_444 };
|
||||
|
||||
static const VdpauFormats formats[N_FORMATS] = {
|
||||
{
|
||||
VDP_CHROMA_TYPE_420,
|
||||
VDP_YCBCR_FORMAT_YV12,
|
||||
GST_MAKE_FOURCC ('I', '4', '2', '0')
|
||||
},
|
||||
{
|
||||
VDP_CHROMA_TYPE_420,
|
||||
VDP_YCBCR_FORMAT_YV12,
|
||||
GST_MAKE_FOURCC ('Y', 'V', '1', '2')
|
||||
},
|
||||
{
|
||||
VDP_CHROMA_TYPE_420,
|
||||
VDP_YCBCR_FORMAT_NV12,
|
||||
|
@ -108,16 +118,6 @@ static const VdpauFormats formats[N_FORMATS] = {
|
|||
VDP_CHROMA_TYPE_422,
|
||||
VDP_YCBCR_FORMAT_YUYV,
|
||||
GST_MAKE_FOURCC ('Y', 'U', 'Y', 'V')
|
||||
},
|
||||
{
|
||||
VDP_CHROMA_TYPE_420,
|
||||
VDP_YCBCR_FORMAT_YV12,
|
||||
GST_MAKE_FOURCC ('Y', 'V', '1', '2')
|
||||
},
|
||||
{
|
||||
VDP_CHROMA_TYPE_420,
|
||||
VDP_YCBCR_FORMAT_YV12,
|
||||
GST_MAKE_FOURCC ('I', '4', '2', '0')
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -332,6 +332,9 @@ gst_vdp_video_yuv_sink_set_caps (GstPad * pad, GstCaps * caps)
|
|||
if (G_UNLIKELY (!src_caps || !gst_caps_get_size (src_caps)))
|
||||
return FALSE;
|
||||
|
||||
GST_DEBUG_OBJECT (video_yuv,
|
||||
"Selecting first caps from set: %" GST_PTR_FORMAT, src_caps);
|
||||
|
||||
new_caps = gst_caps_copy_nth (src_caps, 0);
|
||||
gst_caps_unref (src_caps);
|
||||
if (G_UNLIKELY (!new_caps))
|
||||
|
|
Loading…
Reference in a new issue