nvcodec: Add support for CUDA IPC

Seungha Yang requested to merge seungha.yang/gstreamer:cuda-ipc into main
    nvcodec: Add support for CUDA IPC

    Adding cudaipc{src,sink} element for CUDA IPC support.

    Implementation note:
    * For the communication between end points, Win32 named-pipe
    and unix domain socket will be used on Windows and Linux respectively.

    * cudaipcsink behaves as a server, and all GPU resources will be owned by
    the server process and exported for other processes, then cudaipcsrc
    (client) will import each exported handle.

    * User can select IPC mode via "ipc-mode" property of cudaipcsink.
    There are two IPC mode, one is "legacy" which uses legacy CUDA IPC
    method and the other is "mmap" which uses CUDA virtual memory API
    with OS's resource handle sharing method such as DuplicateHandle()
    on Windows. The "mmap" mode might be better than "legacy" in terms
    of stability since it relies on OS's resource management but
    it would consume more GPU memory than "legacy" mode.
    cudabufferpool: Add support for virtual memory

    Configure malloc or mmap allocator depending on config option
    cudacontext: Add memory allocation related properties

    Adding "virtual-memory" and "os-handle" properties. New properties
    will be used to query device's capability
    cudamemory: Add support for virtual memory in pool allocator

    Adding new memory pool allocator for virtual memory
    cudamemory: Add support for virtual memory management

    Adding new CUDA memory allocation methods
    cuda: Load virtual memory management and IPC API symbols
Edited by Seungha Yang

Merge request reports