vaapivideomemory: forbid R/W mappings if non direct-rendering mode.

Disable read-write mappings if "direct-rendering" is not supported.
Since the ordering of read and write operations is not specified,
this would require to always download the VA surface on _map(), then
commit the temporary VA image back to the VA surface on _unmap().

Some SW decoding plug-in elements still use R/W mappings though.

https://bugzilla.gnome.org/show_bug.cgi?id=733242
This commit is contained in:
Gwenole Beauchesne 2014-07-24 00:14:04 +02:00
parent f2ce28e4b7
commit c3643b42a4

View file

@ -160,7 +160,7 @@ gst_video_meta_map_vaapi_memory(GstVideoMeta *meta, guint plane,
goto error_ensure_image; goto error_ensure_image;
// Check that we can actually map the surface, or image // Check that we can actually map the surface, or image
if ((flags & GST_MAP_READWRITE) == GST_MAP_WRITE && if ((flags & GST_MAP_READWRITE) == GST_MAP_READWRITE &&
!mem->use_direct_rendering) !mem->use_direct_rendering)
goto error_unsupported_map; goto error_unsupported_map;