Skip to content

d3d11: Rework GstD3D11Memory API

    d3d11: Rework GstD3D11Memory API

    Now resource view getter methods will provide strong reference
    to each resource, so caller should release returned resources.

    Another change is that caller MUST map GstD3D11Memory
    via gst_d3d11_memory_map() method prior to getting resource view,
    and any attempt to get resource view objects for non-mapped GstD3D11Memory
    will be rejected by us.

    Note that this change is prework for resource sharing among
    different devices. Direct3D Resource sharing requires opening a new
    Direct3D11 resource from existing resource handle and therefore
    any resource views belong to one device is not usable for the other devices.
    d3d11: Disallow GstD3D11Memory map for direct texture access via gst_memory_map()

    ... instead, user should use newly added gst_d3d11_memory_map() method.
    gst_memory_map() method with GST_MAP_D3D11 approach is not suitable
    for shared texture use case, since texture sharing requires more
    context such as ID3D11Device handle to be shared.

Merge request reports

Loading