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

Commit 4c91323

Browse files
author
Cameron Elliott
committed
changes to add support for the SharpDX.MediaFoundation/DirectX code
1 parent e7fcf95 commit 4c91323

File tree

6 files changed

+7496
-0
lines changed

6 files changed

+7496
-0
lines changed

Source/SharpDX.MediaFoundation/Generated/DirectX/Enumerations.cs

Lines changed: 2295 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 178 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,178 @@
1+
// Copyright (c) 2010-2014 SharpDX - Alexandre Mutel
2+
//
3+
// Permission is hereby granted, free of charge, to any person obtaining a copy
4+
// of this software and associated documentation files (the "Software"), to deal
5+
// in the Software without restriction, including without limitation the rights
6+
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7+
// copies of the Software, and to permit persons to whom the Software is
8+
// furnished to do so, subject to the following conditions:
9+
//
10+
// The above copyright notice and this permission notice shall be included in
11+
// all copies or substantial portions of the Software.
12+
//
13+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16+
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17+
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18+
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19+
// THE SOFTWARE.
20+
21+
//------------------------------------------------------------------------------
22+
// <auto-generated>
23+
// Types declaration for SharpDX.MediaFoundation.DirectX namespace.
24+
// This code was generated by a tool.
25+
// Date : 6/17/2016 5:56:14 PM
26+
//
27+
// Changes to this file may cause incorrect behavior and will be lost if
28+
// the code is regenerated.
29+
// </auto-generated>
30+
//------------------------------------------------------------------------------
31+
using System;
32+
using System.Runtime.InteropServices;
33+
using System.Security;
34+
namespace SharpDX.MediaFoundation.DirectX {
35+
36+
#pragma warning disable 419
37+
#pragma warning disable 1587
38+
#pragma warning disable 1574
39+
40+
/// <summary>
41+
/// Functions
42+
/// </summary>
43+
/// <include file='..\..\Documentation\CodeComments.xml' path="/comments/comment[@id='SharpDX.MediaFoundation.DirectX.DXVAFactory']/*"/>
44+
static partial class DXVAFactory {
45+
46+
/// <summary>
47+
/// <p> Creates an instance of the Direct3D Device Manager. </p>
48+
/// </summary>
49+
/// <param name="resetTokenRef">No documentation.</param>
50+
/// <param name="deviceManagerOut">No documentation.</param>
51+
/// <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>
52+
/// <remarks>
53+
/// <p>Windows Store apps must use <strong>IMFDXGIDeviceManager</strong> and Direct3D 11 Video APIs. </p>
54+
/// </remarks>
55+
/// <include file='..\..\Documentation\CodeComments.xml' path="/comments/comment[@id='DXVA2CreateDirect3DDeviceManager9']/*"/>
56+
/// <msdn-id>bb970490</msdn-id>
57+
/// <unmanaged>HRESULT DXVA2CreateDirect3DDeviceManager9([Out] unsigned int* pResetToken,[Out, Fast] IDirect3DDeviceManager9** ppDeviceManager)</unmanaged>
58+
/// <unmanaged-short>DXVA2CreateDirect3DDeviceManager9</unmanaged-short>
59+
public static void CreateDirect3DDeviceManager9(out int resetTokenRef, SharpDX.MediaFoundation.DirectX.Direct3DDeviceManager deviceManagerOut) {
60+
unsafe {
61+
IntPtr deviceManagerOut_ = IntPtr.Zero;
62+
SharpDX.Result __result__;
63+
fixed (void* resetTokenRef_ = &resetTokenRef)
64+
__result__=
65+
DXVA2CreateDirect3DDeviceManager9_(resetTokenRef_, &deviceManagerOut_);
66+
((SharpDX.MediaFoundation.DirectX.Direct3DDeviceManager)deviceManagerOut).NativePointer = deviceManagerOut_;
67+
__result__.CheckError();
68+
}
69+
}
70+
#if !W8CORE
71+
//[System.Security.SuppressUnmanagedCodeSecurityAttribute]
72+
#endif
73+
#if WP8
74+
private unsafe delegate int DXVA2CreateDirect3DDeviceManager9Delegate(void* arg0,void* arg1);
75+
private static DXVA2CreateDirect3DDeviceManager9Delegate DXVA2CreateDirect3DDeviceManager9__;
76+
private unsafe static DXVA2CreateDirect3DDeviceManager9Delegate DXVA2CreateDirect3DDeviceManager9_
77+
{
78+
get
79+
{
80+
if (DXVA2CreateDirect3DDeviceManager9__ == null)
81+
DXVA2CreateDirect3DDeviceManager9__ = (DXVA2CreateDirect3DDeviceManager9Delegate)Marshal.GetDelegateForFunctionPointer(new IntPtr(SharpDX.WP8.Interop.DXVA2CreateDirect3DDeviceManager9()), typeof (DXVA2CreateDirect3DDeviceManager9Delegate));
82+
return DXVA2CreateDirect3DDeviceManager9__;
83+
}
84+
}
85+
#else
86+
[DllImport("Dxva2.dll", EntryPoint = "DXVA2CreateDirect3DDeviceManager9", CallingConvention = CallingConvention.StdCall)]
87+
private unsafe static extern int DXVA2CreateDirect3DDeviceManager9_(void* arg0,void* arg1);
88+
#endif
89+
90+
/// <summary>
91+
/// <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>
92+
/// </summary>
93+
/// <param name="dDRef"><dd> <p> A reference to the <strong><see cref="SharpDX.Direct3D9.Device"/></strong> interface of a Direct3D device. </p> </dd></param>
94+
/// <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>
95+
/// <param name="serviceOut"><dd> <p> Receives a reference to the interface. The caller must release the interface. </p> </dd></param>
96+
/// <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>
97+
/// <include file='..\..\Documentation\CodeComments.xml' path="/comments/comment[@id='DXVA2CreateVideoService']/*"/>
98+
/// <msdn-id>ms704721</msdn-id>
99+
/// <unmanaged>HRESULT DXVA2CreateVideoService([In] IDirect3DDevice9* pDD,[In] const GUID&amp; riid,[Out] void** ppService)</unmanaged>
100+
/// <unmanaged-short>DXVA2CreateVideoService</unmanaged-short>
101+
public static void CreateVideoService(SharpDX.Direct3D9.Device dDRef, System.Guid riid, out System.IntPtr serviceOut) {
102+
unsafe {
103+
SharpDX.Result __result__;
104+
fixed (void* serviceOut_ = &serviceOut)
105+
__result__=
106+
DXVA2CreateVideoService_((void*)((dDRef == null)?IntPtr.Zero:dDRef.NativePointer), &riid, serviceOut_);
107+
__result__.CheckError();
108+
}
109+
}
110+
111+
#if !W8CORE
112+
//[System.Security.SuppressUnmanagedCodeSecurityAttribute]
113+
#endif
114+
#if WP8
115+
private unsafe delegate int DXVA2CreateVideoServiceDelegate(void* arg0,void* arg1,void* arg2);
116+
private static DXVA2CreateVideoServiceDelegate DXVA2CreateVideoService__;
117+
private unsafe static DXVA2CreateVideoServiceDelegate DXVA2CreateVideoService_
118+
{
119+
get
120+
{
121+
if (DXVA2CreateVideoService__ == null)
122+
DXVA2CreateVideoService__ = (DXVA2CreateVideoServiceDelegate)Marshal.GetDelegateForFunctionPointer(new IntPtr(SharpDX.WP8.Interop.DXVA2CreateVideoService()), typeof (DXVA2CreateVideoServiceDelegate));
123+
return DXVA2CreateVideoService__;
124+
}
125+
}
126+
#else
127+
[DllImport("Dxva2.dll", EntryPoint = "DXVA2CreateVideoService", CallingConvention = CallingConvention.StdCall)]
128+
private unsafe static extern int DXVA2CreateVideoService_(void* arg0,void* arg1,void* arg2);
129+
#endif
130+
131+
/// <summary>
132+
/// <p>Creates a Microsoft DirectX Video Acceleration High Definition (DXVA-HD) device.</p>
133+
/// </summary>
134+
/// <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>
135+
/// <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>
136+
/// <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>
137+
/// <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>
138+
/// <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>
139+
/// <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>
140+
/// <remarks>
141+
/// <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>
142+
/// </remarks>
143+
/// <include file='..\..\Documentation\CodeComments.xml' path="/comments/comment[@id='DXVAHD_CreateDevice']/*"/>
144+
/// <msdn-id>dd318412</msdn-id>
145+
/// <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>
146+
/// <unmanaged-short>DXVAHD_CreateDevice</unmanaged-short>
147+
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) {
148+
unsafe {
149+
IntPtr deviceOut_ = IntPtr.Zero;
150+
SharpDX.Result __result__;
151+
fixed (void* contentDescRef_ = &contentDescRef)
152+
__result__=
153+
DXVAHD_CreateDevice_((void*)((d3DDeviceRef == null)?IntPtr.Zero:d3DDeviceRef.NativePointer), contentDescRef_, unchecked((int)usage), pluginRef, &deviceOut_);
154+
((SharpDX.MediaFoundation.DirectX.HDDevice)deviceOut).NativePointer = deviceOut_;
155+
__result__.CheckError();
156+
}
157+
}
158+
#if !W8CORE
159+
//[System.Security.SuppressUnmanagedCodeSecurityAttribute]
160+
#endif
161+
#if WP8
162+
private unsafe delegate int DXVAHD_CreateDeviceDelegate(void* arg0,void* arg1,int arg2,void* arg3,void* arg4);
163+
private static DXVAHD_CreateDeviceDelegate DXVAHD_CreateDevice__;
164+
private unsafe static DXVAHD_CreateDeviceDelegate DXVAHD_CreateDevice_
165+
{
166+
get
167+
{
168+
if (DXVAHD_CreateDevice__ == null)
169+
DXVAHD_CreateDevice__ = (DXVAHD_CreateDeviceDelegate)Marshal.GetDelegateForFunctionPointer(new IntPtr(SharpDX.WP8.Interop.DXVAHD_CreateDevice()), typeof (DXVAHD_CreateDeviceDelegate));
170+
return DXVAHD_CreateDevice__;
171+
}
172+
}
173+
#else
174+
[DllImport("Dxva2.dll", EntryPoint = "DXVAHD_CreateDevice", CallingConvention = CallingConvention.StdCall)]
175+
private unsafe static extern int DXVAHD_CreateDevice_(void* arg0,void* arg1,int arg2,void* arg3,void* arg4);
176+
#endif
177+
}
178+
}

0 commit comments

Comments
 (0)