mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
vtdec: only attempt use of the texture cache with GLMemory caps features
Otherwise we send rectangle textures to glimagesink
This commit is contained in:
parent
e3ec517838
commit
c873c57430
1 changed files with 18 additions and 9 deletions
|
@ -203,9 +203,17 @@ gst_vtdec_decide_allocation (GstVideoDecoder * decoder, GstQuery * query)
|
|||
GST_VIDEO_DECODER_CLASS (gst_vtdec_parent_class)->decide_allocation
|
||||
(decoder, query);
|
||||
if (ret) {
|
||||
GstCaps *caps;
|
||||
GstCapsFeatures *features;
|
||||
guint idx;
|
||||
|
||||
if (gst_query_find_allocation_meta (query,
|
||||
gst_query_parse_allocation (query, &caps, NULL);
|
||||
if (caps) {
|
||||
features = gst_caps_get_features (caps, 0);
|
||||
|
||||
if (gst_caps_features_contains (features,
|
||||
GST_CAPS_FEATURE_MEMORY_GL_MEMORY)
|
||||
&& gst_query_find_allocation_meta (query,
|
||||
GST_VIDEO_GL_TEXTURE_UPLOAD_META_API_TYPE, &idx)) {
|
||||
GstGLContext *context;
|
||||
const GstStructure *upload_meta_params;
|
||||
|
@ -218,6 +226,7 @@ gst_vtdec_decide_allocation (GstVideoDecoder * decoder, GstQuery * query)
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue