Skip to content
This repository has been archived by the owner on Mar 30, 2019. It is now read-only.

Commit

Permalink
changes to add support for the SharpDX.MediaFoundation/DirectX code
Browse files Browse the repository at this point in the history
  • Loading branch information
Cameron Elliott committed Jun 21, 2016
1 parent e7fcf95 commit 4c91323
Show file tree
Hide file tree
Showing 6 changed files with 7,496 additions and 0 deletions.
2,295 changes: 2,295 additions & 0 deletions Source/SharpDX.MediaFoundation/Generated/DirectX/Enumerations.cs

Large diffs are not rendered by default.

178 changes: 178 additions & 0 deletions Source/SharpDX.MediaFoundation/Generated/DirectX/Functions.cs
@@ -0,0 +1,178 @@
// 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.

//------------------------------------------------------------------------------
// <auto-generated>
// 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.
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Runtime.InteropServices;
using System.Security;
namespace SharpDX.MediaFoundation.DirectX {

#pragma warning disable 419
#pragma warning disable 1587
#pragma warning disable 1574

/// <summary>
/// Functions
/// </summary>
/// <include file='..\..\Documentation\CodeComments.xml' path="/comments/comment[@id='SharpDX.MediaFoundation.DirectX.DXVAFactory']/*"/>
static partial class DXVAFactory {

/// <summary>
/// <p> Creates an instance of the Direct3D Device Manager. </p>
/// </summary>
/// <param name="resetTokenRef">No documentation.</param>
/// <param name="deviceManagerOut">No documentation.</param>
/// <returns><p>If this function succeeds, it returns <strong><see cref="SharpDX.Result.Ok"/></strong>. Otherwise, it returns an <strong><see cref="SharpDX.Result"/></strong> error code.</p></returns>
/// <remarks>
/// <p>Windows Store apps must use <strong>IMFDXGIDeviceManager</strong> and Direct3D 11 Video APIs. </p>
/// </remarks>
/// <include file='..\..\Documentation\CodeComments.xml' path="/comments/comment[@id='DXVA2CreateDirect3DDeviceManager9']/*"/>
/// <msdn-id>bb970490</msdn-id>
/// <unmanaged>HRESULT DXVA2CreateDirect3DDeviceManager9([Out] unsigned int* pResetToken,[Out, Fast] IDirect3DDeviceManager9** ppDeviceManager)</unmanaged>
/// <unmanaged-short>DXVA2CreateDirect3DDeviceManager9</unmanaged-short>
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

/// <summary>
/// <p>Creates a DirectX Video Acceleration (DXVA) services object. Call this function if your application uses DXVA directly, without using DirectShow or Media Foundation. </p>
/// </summary>
/// <param name="dDRef"><dd> <p> A reference to the <strong><see cref="SharpDX.Direct3D9.Device"/></strong> interface of a Direct3D device. </p> </dd></param>
/// <param name="riid"><dd> <p> The interface identifier (IID) of the requested interface. Any of the following interfaces might be supported by the Direct3D device: </p> <ul> <li> <strong><see cref="SharpDX.MediaFoundation.DirectX.VideoAccelerationService"/></strong> </li> <li> <strong><see cref="SharpDX.MediaFoundation.DirectX.VideoDecoderService"/></strong> </li> <li> <strong><see cref="SharpDX.MediaFoundation.DirectX.VideoProcessorService"/></strong> </li> </ul> </dd></param>
/// <param name="serviceOut"><dd> <p> Receives a reference to the interface. The caller must release the interface. </p> </dd></param>
/// <returns><p>If this function succeeds, it returns <strong><see cref="SharpDX.Result.Ok"/></strong>. Otherwise, it returns an <strong><see cref="SharpDX.Result"/></strong> error code.</p></returns>
/// <include file='..\..\Documentation\CodeComments.xml' path="/comments/comment[@id='DXVA2CreateVideoService']/*"/>
/// <msdn-id>ms704721</msdn-id>
/// <unmanaged>HRESULT DXVA2CreateVideoService([In] IDirect3DDevice9* pDD,[In] const GUID&amp; riid,[Out] void** ppService)</unmanaged>
/// <unmanaged-short>DXVA2CreateVideoService</unmanaged-short>
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

/// <summary>
/// <p>Creates a Microsoft DirectX Video Acceleration High Definition (DXVA-HD) device.</p>
/// </summary>
/// <param name="d3DDeviceRef"><dd> <p>A reference to the <strong><see cref="SharpDX.Direct3D9.DeviceEx"/></strong> interface of a Direct3D 9 device.</p> </dd></param>
/// <param name="contentDescRef"><dd> <p>A reference to a <strong><see cref="SharpDX.MediaFoundation.DirectX.ContentDescription"/></strong> structure that describes the video content. The driver uses this information as a hint when it creates the device.</p> </dd></param>
/// <param name="usage"><dd> <p>A member of the <strong><see cref="SharpDX.MediaFoundation.DirectX.DeviceUsage"/></strong> 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.</p> </dd></param>
/// <param name="pluginRef"><dd> <p>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 <strong><c>null</c></strong>. If the value is <strong><c>null</c></strong>, the driver creates the DXVA-HD device.</p> <p>The function reference type is <strong>PDXVAHDSW_Plugin</strong>.</p> </dd></param>
/// <param name="deviceOut"><dd> <p>Receives a reference to the <strong><see cref="SharpDX.MediaFoundation.DirectX.HDDevice"/></strong> interface. The caller must release the interface.</p> </dd></param>
/// <returns><p>The method returns an <strong><see cref="SharpDX.Result"/></strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong><see cref="SharpDX.Result.Ok"/></strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>E_NOINTERFACE</strong></dt> </dl> </td><td> <p>The Direct3D device does not support DXVA-HD.</p> </td></tr> </table><p>?</p></returns>
/// <remarks>
/// <p> Use the <strong><see cref="SharpDX.MediaFoundation.DirectX.HDDevice"/></strong> interface to get the device capabilities, create the video processor, and allocate video surfaces. </p>
/// </remarks>
/// <include file='..\..\Documentation\CodeComments.xml' path="/comments/comment[@id='DXVAHD_CreateDevice']/*"/>
/// <msdn-id>dd318412</msdn-id>
/// <unmanaged>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)</unmanaged>
/// <unmanaged-short>DXVAHD_CreateDevice</unmanaged-short>
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
}
}

0 comments on commit 4c91323

Please sign in to comment.