This topic is now archived and is closed to further replies.

Converting 1 Ex. (Of SDK) From VMR7 To VMR9, Giving Trouble In Results

This topic is 5150 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Greeting Everybody, For some specific reasons I want Cube example (VMR7) of the SDK to work in VMR9 mode that is Converting IVMRImageCompositor To IVMRImageCompositor9. Cube Example of VMR:: Defining the ability to plug in your own compositing component to implement effects and transitions between multiple video streams entering the VMR. I have converted almost all the code, but I am not able to Get the Desired results, I think I have done quite right upto a particular point in CompositeImage() Function STDMETHODIMP CMovie::CompositeImage(IUnknown* lpUnk,IDirect3DSurface9 *pddsRenderTarget,AM_MEDIA_TYPE* pmtRenderTarget, REFERENCE_TIME rtStart,REFERENCE_TIME rtEnd,DWORD dwMapped,VMR9VideoStreamInfo* pStrmInfo,UINT cStreams ) ...; ...............; ..............; ...............; pDDS = pStrmInfo[iStream].pddsVideoSurface; //where pddsVideoSurface and pDDS are of type IDirect3DSurface9 hr=D3DXSaveSurfaceToFile("c:\\test.bmp",D3DXIFF_BMP,pDDS,NULL,NULL); The second line I have added to test whether I am gettiing the Video Surfaces Properly, It is OK as seen from the BMP''S The 3D Device is a Spinning Cube, which also I can see. What my problem is I am not able to See/Put the The video surface (which is ok as seen above) as Textures over the Device (which is also perfect). My problem can be ,as I guess, I am not able to make Textures Out of the Surfaces Properly. In VMR7, IDirect3DDevice7, Device->Settexure, directly takes DirectSurafce7 as Paramater, so that I can Put ''pDDS'' directly as Parameter, but here in VMR-9 IDirect3DDevice9 pd3dDevice->settexture(0, IDirect3dbaseTexure9) Therefore the Method given in the SDK to make Texture Data out of a valid IDirect3DSurface9 surface, is :: hr = pDDS->GetContainer(IID_IDirect3DTexture9, &pContainer); // where pContainer is of VOID type if (SUCCEEDED(hr) && pContainer) IDirect3DTexture9 g_pTexture = (IDirect3DTexture9 *)pContainer; and this ''g_pTexture'' I have used in IDirect3DDevice9 pd3dDevice->settexture, with no Luck, Problem can be in making Textures, as I presume. Please help me, as to what is Causing the problem. Best Regards Sudhaom

Share this post

Link to post
Share on other sites