mots_g
mots_g

Reputation: 637

How to get an off-screen plain surface from 'normal' IDirect3D9Surface

I'm working on a media player with Media Foundation. I'm trying to use post processing with DXVA-HD. However, when I try to do a VideoProcessBltHD using the HD device, it fails with E_INVALIDARGS. What I doubt is it is not somehow working correctly with the ID39Surface I'm providing as input. I'm getting the input surface from 'IMFMediaBuffer' (which I get from reading a sample from the SourceReader).

I'm extracting the surface as follows: CHECK_HR (hr = MFGetService( video_buffer, MR_BUFFER_SERVICE, __uuidof(IDirect3DSurface9), (void**)&pSurface) );

However, in the DXVA-HD example on MSDN, the VideoProcessBltHD works fine.

Whereas the IDirect3DSurface9 surface in the sample code is an off screen plain surface. How do I pass 'my surface'(which has the video data) as an off screen plain surface to the video processor and the get 'blt-operation' succeed?

Any help would be appreciated.

Thanks Mots

Upvotes: 0

Views: 1364

Answers (1)

Ulterior
Ulterior

Reputation: 2892

I would suggest installing full DirectX SDK, switch runtime library to debug mode in DirectX Control Pannel, turn full validation, break on error and run your app in debug mode. This way, you will get DirectX human readable error description.

Upvotes: 1

Related Questions