Beispiel #1
0
    public Result CreateVideoExtensionCommand <T>(
        VideoExtensionCommandDescription description,
        IntPtr creationParameters,
        PointerSize creationParametersDataSizeInBytes,
        ID3D12ProtectedResourceSession protectedResourceSession,
        out T?videoExtensionCommand) where T : ID3D12VideoExtensionCommand
    {
        Result result = CreateVideoExtensionCommand(ref description, creationParameters, creationParametersDataSizeInBytes, protectedResourceSession, typeof(T).GUID, out IntPtr nativePtr);

        if (result.Failure)
        {
            videoExtensionCommand = default;
            return(result);
        }

        videoExtensionCommand = MarshallingHelpers.FromPointer <T>(nativePtr);
        return(result);
    }
Beispiel #2
0
 public T CreateVideoExtensionCommand <T>(VideoExtensionCommandDescription description, IntPtr creationParameters, PointerSize creationParametersDataSizeInBytes, ID3D12ProtectedResourceSession protectedResourceSession) where T : ID3D12VideoExtensionCommand
 {
     CreateVideoExtensionCommand(ref description, creationParameters, creationParametersDataSizeInBytes, protectedResourceSession, typeof(T).GUID, out IntPtr nativePtr).CheckError();
     return(MarshallingHelpers.FromPointer <T>(nativePtr));
 }
Beispiel #3
0
 public ID3D12VideoExtensionCommand CreateVideoExtensionCommand(VideoExtensionCommandDescription description, IntPtr creationParameters, PointerSize creationParametersDataSizeInBytes, ID3D12ProtectedResourceSession protectedResourceSession)
 {
     CreateVideoExtensionCommand(ref description, creationParameters, creationParametersDataSizeInBytes, protectedResourceSession, typeof(ID3D12VideoExtensionCommand).GUID, out IntPtr nativePtr).CheckError();
     return(new ID3D12VideoExtensionCommand(nativePtr));
 }