mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-21 17:21:13 +00:00
subtitleoverlay: Check for memory capsfeature on video/x-raw
Don't assume that video/x-raw caps means buffers are mappable or can be processed by videoconvert and friends. Only plug those converters for real system memory, and treat other memory capsfeatures as hardware surfaces Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7741>
This commit is contained in:
parent
9046e60aa7
commit
c02d41c259
1 changed files with 10 additions and 3 deletions
|
@ -272,11 +272,18 @@ _is_video_pad (GstPad * pad, gboolean * hw_accelerated)
|
|||
|
||||
for (i = 0; i < gst_caps_get_size (caps) && !ret; i++) {
|
||||
name = gst_structure_get_name (gst_caps_get_structure (caps, i));
|
||||
GstCapsFeatures *features = gst_caps_get_features (caps, i);
|
||||
|
||||
if (g_str_equal (name, "video/x-raw")) {
|
||||
ret = TRUE;
|
||||
if (hw_accelerated)
|
||||
*hw_accelerated = FALSE;
|
||||
|
||||
if (hw_accelerated) {
|
||||
if (gst_caps_features_contains (features,
|
||||
GST_CAPS_FEATURE_MEMORY_SYSTEM_MEMORY)) {
|
||||
*hw_accelerated = FALSE;
|
||||
} else {
|
||||
*hw_accelerated = TRUE;
|
||||
}
|
||||
}
|
||||
} else if (g_str_has_prefix (name, "video/x-surface")) {
|
||||
ret = TRUE;
|
||||
if (hw_accelerated)
|
||||
|
|
Loading…
Reference in a new issue