// Copyright (c) 2010-2014 SharpDX - Alexandre Mutel
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//------------------------------------------------------------------------------
//
// Types declaration for SharpDX.MediaFoundation.DirectX namespace.
// This code was generated by a tool.
// Date : 6/17/2016 5:56:14 PM
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
//
//------------------------------------------------------------------------------
using System;
using System.Runtime.InteropServices;
using System.Security;
#if DESKTOP_APP
namespace SharpDX.MediaFoundation.DirectX {
#pragma warning disable 419
#pragma warning disable 1587
#pragma warning disable 1574
///
/// Functions
///
///
static partial class DXVAFactory {
///
/// Creates an instance of the Direct3D Device Manager.
///
/// No documentation.
/// No documentation.
/// If this function succeeds, it returns . Otherwise, it returns an error code.
///
/// Windows Store apps must use IMFDXGIDeviceManager and Direct3D 11 Video APIs.
///
///
/// bb970490
/// HRESULT DXVA2CreateDirect3DDeviceManager9([Out] unsigned int* pResetToken,[Out, Fast] IDirect3DDeviceManager9** ppDeviceManager)
/// DXVA2CreateDirect3DDeviceManager9
public static void CreateDirect3DDeviceManager9(out int resetTokenRef, SharpDX.MediaFoundation.DirectX.Direct3DDeviceManager deviceManagerOut) {
unsafe {
IntPtr deviceManagerOut_ = IntPtr.Zero;
SharpDX.Result __result__;
fixed (void* resetTokenRef_ = &resetTokenRef)
__result__=
DXVA2CreateDirect3DDeviceManager9_(resetTokenRef_, &deviceManagerOut_);
((SharpDX.MediaFoundation.DirectX.Direct3DDeviceManager)deviceManagerOut).NativePointer = deviceManagerOut_;
__result__.CheckError();
}
}
#if !W8CORE
//[System.Security.SuppressUnmanagedCodeSecurityAttribute]
#endif
#if WP8
private unsafe delegate int DXVA2CreateDirect3DDeviceManager9Delegate(void* arg0,void* arg1);
private static DXVA2CreateDirect3DDeviceManager9Delegate DXVA2CreateDirect3DDeviceManager9__;
private unsafe static DXVA2CreateDirect3DDeviceManager9Delegate DXVA2CreateDirect3DDeviceManager9_
{
get
{
if (DXVA2CreateDirect3DDeviceManager9__ == null)
DXVA2CreateDirect3DDeviceManager9__ = (DXVA2CreateDirect3DDeviceManager9Delegate)Marshal.GetDelegateForFunctionPointer(new IntPtr(SharpDX.WP8.Interop.DXVA2CreateDirect3DDeviceManager9()), typeof (DXVA2CreateDirect3DDeviceManager9Delegate));
return DXVA2CreateDirect3DDeviceManager9__;
}
}
#else
[DllImport("Dxva2.dll", EntryPoint = "DXVA2CreateDirect3DDeviceManager9", CallingConvention = CallingConvention.StdCall)]
private unsafe static extern int DXVA2CreateDirect3DDeviceManager9_(void* arg0,void* arg1);
#endif
///
/// Creates a DirectX Video Acceleration (DXVA) services object. Call this function if your application uses DXVA directly, without using DirectShow or Media Foundation.
///
///
A reference to the interface of a Direct3D device.
/// The interface identifier (IID) of the requested interface. Any of the following interfaces might be supported by the Direct3D device:
/// Receives a reference to the interface. The caller must release the interface.
/// If this function succeeds, it returns . Otherwise, it returns an error code.
///
/// ms704721
/// HRESULT DXVA2CreateVideoService([In] IDirect3DDevice9* pDD,[In] const GUID& riid,[Out] void** ppService)
/// DXVA2CreateVideoService
public static void CreateVideoService(SharpDX.Direct3D9.Device dDRef, System.Guid riid, out System.IntPtr serviceOut) {
unsafe {
SharpDX.Result __result__;
fixed (void* serviceOut_ = &serviceOut)
__result__=
DXVA2CreateVideoService_((void*)((dDRef == null)?IntPtr.Zero:dDRef.NativePointer), &riid, serviceOut_);
__result__.CheckError();
}
}
#if !W8CORE
//[System.Security.SuppressUnmanagedCodeSecurityAttribute]
#endif
#if WP8
private unsafe delegate int DXVA2CreateVideoServiceDelegate(void* arg0,void* arg1,void* arg2);
private static DXVA2CreateVideoServiceDelegate DXVA2CreateVideoService__;
private unsafe static DXVA2CreateVideoServiceDelegate DXVA2CreateVideoService_
{
get
{
if (DXVA2CreateVideoService__ == null)
DXVA2CreateVideoService__ = (DXVA2CreateVideoServiceDelegate)Marshal.GetDelegateForFunctionPointer(new IntPtr(SharpDX.WP8.Interop.DXVA2CreateVideoService()), typeof (DXVA2CreateVideoServiceDelegate));
return DXVA2CreateVideoService__;
}
}
#else
[DllImport("Dxva2.dll", EntryPoint = "DXVA2CreateVideoService", CallingConvention = CallingConvention.StdCall)]
private unsafe static extern int DXVA2CreateVideoService_(void* arg0,void* arg1,void* arg2);
#endif
///
/// Creates a Microsoft DirectX Video Acceleration High Definition (DXVA-HD) device.
///
/// A reference to the interface of a Direct3D 9 device.
/// A reference to a structure that describes the video content. The driver uses this information as a hint when it creates the device.
/// A member of the enumeration, describing how the device will be used. The value indicates the desired trade-off between speed and video quality. The driver uses this flag as a hint when it creates the device.
/// A reference to an initialization function for a software device. Set this reference if you are using a software plug-in device. Otherwise, set this parameter to null. If the value is null, the driver creates the DXVA-HD device.
The function reference type is PDXVAHDSW_Plugin.
/// Receives a reference to the interface. The caller must release the interface.
/// The method returns an . Possible values include, but are not limited to, those in the following table.
| Return code | Description |
| The method succeeded. |
- E_NOINTERFACE
| The Direct3D device does not support DXVA-HD. |
?
///
/// Use the interface to get the device capabilities, create the video processor, and allocate video surfaces.
///
///
/// dd318412
/// HRESULT DXVAHD_CreateDevice([In] IDirect3DDevice9Ex* pD3DDevice,[In] const DXVAHD_CONTENT_DESC* pContentDesc,[In] DXVAHD_DEVICE_USAGE Usage,[In, Optional] __function__stdcall* pPlugin,[Out, Fast] IDXVAHD_Device** ppDevice)
/// DXVAHD_CreateDevice
public static void CreateDevice(SharpDX.Direct3D9.DeviceEx d3DDeviceRef, ref SharpDX.MediaFoundation.DirectX.ContentDescription contentDescRef, SharpDX.MediaFoundation.DirectX.DeviceUsage usage, SharpDX.FunctionCallback pluginRef, SharpDX.MediaFoundation.DirectX.HDDevice deviceOut) {
unsafe {
IntPtr deviceOut_ = IntPtr.Zero;
SharpDX.Result __result__;
fixed (void* contentDescRef_ = &contentDescRef)
__result__=
DXVAHD_CreateDevice_((void*)((d3DDeviceRef == null)?IntPtr.Zero:d3DDeviceRef.NativePointer), contentDescRef_, unchecked((int)usage), pluginRef, &deviceOut_);
((SharpDX.MediaFoundation.DirectX.HDDevice)deviceOut).NativePointer = deviceOut_;
__result__.CheckError();
}
}
#if !W8CORE
//[System.Security.SuppressUnmanagedCodeSecurityAttribute]
#endif
#if WP8
private unsafe delegate int DXVAHD_CreateDeviceDelegate(void* arg0,void* arg1,int arg2,void* arg3,void* arg4);
private static DXVAHD_CreateDeviceDelegate DXVAHD_CreateDevice__;
private unsafe static DXVAHD_CreateDeviceDelegate DXVAHD_CreateDevice_
{
get
{
if (DXVAHD_CreateDevice__ == null)
DXVAHD_CreateDevice__ = (DXVAHD_CreateDeviceDelegate)Marshal.GetDelegateForFunctionPointer(new IntPtr(SharpDX.WP8.Interop.DXVAHD_CreateDevice()), typeof (DXVAHD_CreateDeviceDelegate));
return DXVAHD_CreateDevice__;
}
}
#else
[DllImport("Dxva2.dll", EntryPoint = "DXVAHD_CreateDevice", CallingConvention = CallingConvention.StdCall)]
private unsafe static extern int DXVAHD_CreateDevice_(void* arg0,void* arg1,int arg2,void* arg3,void* arg4);
#endif
}
}
#endif