Beispiel #1
0
 /// <summary>	
 /// <p> Retrieves the parameters that were used to create this device. </p>	
 /// </summary>	
 /// <param name="deviceGuidRef"><dd> <p>Receives the device <see cref="System.Guid"/>. This parameter can be <strong><c>null</c></strong>.</p> </dd></param>	
 /// <param name="videoDescRef"><dd> <p>Pointer to a <strong><see cref="SharpDX.MediaFoundation.DirectX.VideoDesc"/></strong> structure that receives a description of the video format. This parameter can be <strong><c>null</c></strong>.</p> </dd></param>	
 /// <param name="configRef"><dd> <p>Pointer to a <strong><see cref="SharpDX.MediaFoundation.DirectX.ConfigPictureDecode"/></strong> structure structure that receives the decoder configuration. This parameter can be <strong><c>null</c></strong>.</p> </dd></param>	
 /// <param name="decoderRenderTargetsRef"><dd> <p>Receives an array of <strong><see cref="SharpDX.Direct3D9.Surface"/></strong> interface references. These references represent the decoder render targets. The method allocates the memory for the array and calls <strong>AddRef</strong> on each of the references. The caller must release the references and call <strong>CoTaskMemFree</strong> to free the memory for the array. This parameter can be <strong><c>null</c></strong>.</p> </dd></param>	
 /// <param name="numSurfacesRef"><dd> <p>Receives the number of elements in the <em>pppDecoderRenderTargets</em> array. This parameter can be <strong><c>null</c></strong>.</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_INVALIDARG</strong></dt> </dl> </td><td> <p>Invalid argument. At least one parameter must be non-<strong><c>null</c></strong>.</p> </td></tr> </table><p>?</p></returns>	
 /// <remarks>	
 /// <p>You can set any parameter to <strong><c>null</c></strong> if you are not interested in the result. At least one parameter must be non-<strong><c>null</c></strong>.</p><p>If you specify a non-<strong><c>null</c></strong> value for <em>pppDecoderRenderTargets</em> (to receive the render target surfaces), then <em>pNumSurfaces</em> cannot be <strong><c>null</c></strong>, because it receives the size of the array returned in <em>pppDecoderRenderTargets</em>.</p>	
 /// </remarks>	
 /// <include file='..\..\Documentation\CodeComments.xml' path="/comments/comment[@id='IDirectXVideoDecoder::GetCreationParameters']/*"/>	
 /// <msdn-id>ms697355</msdn-id>	
 /// <unmanaged>HRESULT IDirectXVideoDecoder::GetCreationParameters([Out, Optional] GUID* pDeviceGuid,[Out, Optional] DXVA2_VideoDesc* pVideoDesc,[Out, Optional] DXVA2_ConfigPictureDecode* pConfig,[Out, Buffer] IDirect3DSurface9*** pDecoderRenderTargets,[Out, Optional] unsigned int* pNumSurfaces)</unmanaged>	
 /// <unmanaged-short>IDirectXVideoDecoder::GetCreationParameters</unmanaged-short>	
 public void GetCreationParameters(out System.Guid deviceGuidRef, out SharpDX.MediaFoundation.DirectX.VideoDesc videoDescRef, out SharpDX.MediaFoundation.DirectX.ConfigPictureDecode configRef, SharpDX.Direct3D9.Surface[] decoderRenderTargetsRef, out int numSurfacesRef) {
     unsafe {
         deviceGuidRef = new System.Guid();
         videoDescRef = new SharpDX.MediaFoundation.DirectX.VideoDesc();
         configRef = new SharpDX.MediaFoundation.DirectX.ConfigPictureDecode();
         IntPtr* decoderRenderTargetsRef_ = stackalloc IntPtr[decoderRenderTargetsRef.Length];
         SharpDX.Result __result__;
         fixed (void* deviceGuidRef_ = &deviceGuidRef)
             fixed (void* videoDescRef_ = &videoDescRef)
                 fixed (void* configRef_ = &configRef)
                     fixed (void* numSurfacesRef_ = &numSurfacesRef)
                         __result__= 
         				SharpDX.MediaFoundation.LocalInterop.Calliint(_nativePointer, deviceGuidRef_, videoDescRef_, configRef_, decoderRenderTargetsRef_, numSurfacesRef_,((void**)(*(void**)_nativePointer))[4]);		
         for (int i = 0; i < decoderRenderTargetsRef.Length; i++)
             decoderRenderTargetsRef[i] = (decoderRenderTargetsRef_[i] == IntPtr.Zero)?null:new SharpDX.Direct3D9.Surface(decoderRenderTargetsRef_[i]);	
         __result__.CheckError();
     }
 }
Beispiel #2
0
 /// <summary>	
 /// <p> </p><p>Retrieves the parameters that were used to create this device.</p>	
 /// </summary>	
 /// <param name="deviceGuidRef"><dd> <p>Receives the device <see cref="System.Guid"/>. This parameter can be <strong><c>null</c></strong>.</p> </dd></param>	
 /// <param name="videoDescRef"><dd> <p>Pointer to a <strong><see cref="SharpDX.MediaFoundation.DirectX.VideoDesc"/></strong> structure allocated by the caller. The method fills the structure with a description of the video format. This parameter can be <strong><c>null</c></strong>.</p> </dd></param>	
 /// <param name="renderTargetFormatRef"><dd> <p>Receives the render target format, specified as a <strong><see cref="SharpDX.Direct3D9.Format"/></strong> value. For more information, see the Direct3D documentation. This parameter can be <strong><c>null</c></strong>.</p> </dd></param>	
 /// <param name="maxNumSubStreamsRef"><dd> <p>Receives the maximum number of streams supported by the device. This parameter can be <strong><c>null</c></strong>.</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_INVALIDARG</strong></dt> </dl> </td><td> <p>Invalid argument. At least one parameter must be non-<strong><c>null</c></strong>.</p> </td></tr> </table><p>?</p></returns>	
 /// <remarks>	
 /// <p>You can set any parameter to <strong><c>null</c></strong> if you are not interested in the result. At least one parameter must be non-<strong><c>null</c></strong>.</p>	
 /// </remarks>	
 /// <include file='..\..\Documentation\CodeComments.xml' path="/comments/comment[@id='IDirectXVideoProcessor::GetCreationParameters']/*"/>	
 /// <msdn-id>ms704783</msdn-id>	
 /// <unmanaged>HRESULT IDirectXVideoProcessor::GetCreationParameters([Out, Optional] GUID* pDeviceGuid,[Out, Optional] DXVA2_VideoDesc* pVideoDesc,[Out, Optional] D3DFORMAT* pRenderTargetFormat,[Out, Optional] unsigned int* pMaxNumSubStreams)</unmanaged>	
 /// <unmanaged-short>IDirectXVideoProcessor::GetCreationParameters</unmanaged-short>	
 public void GetCreationParameters(out System.Guid deviceGuidRef, out SharpDX.MediaFoundation.DirectX.VideoDesc videoDescRef, out SharpDX.Direct3D9.Format renderTargetFormatRef, out int maxNumSubStreamsRef) {
     unsafe {
         deviceGuidRef = new System.Guid();
         videoDescRef = new SharpDX.MediaFoundation.DirectX.VideoDesc();
         SharpDX.Result __result__;
         fixed (void* deviceGuidRef_ = &deviceGuidRef)
             fixed (void* videoDescRef_ = &videoDescRef)
                 fixed (void* renderTargetFormatRef_ = &renderTargetFormatRef)
                     fixed (void* maxNumSubStreamsRef_ = &maxNumSubStreamsRef)
                         __result__= 
         				SharpDX.MediaFoundation.LocalInterop.Calliint(_nativePointer, deviceGuidRef_, videoDescRef_, renderTargetFormatRef_, maxNumSubStreamsRef_,((void**)(*(void**)_nativePointer))[4]);		
         __result__.CheckError();
     }
 }