VMR-9 Renderless Mode: Dropout SelectAtPosition ()

How to solve SelectAtPosition () crash when using VMR-9 in modeless mode?

+1


source to share


1 answer


The issue with debugging SelectAtPosition () when using no-use mode can be solved by implementing the IVMRWindowlessControl9 interface in your custom allocator.

  • In addition to IVMRSurfaceAllocator9 and IVMRImagePresenter9, implement IMRWindowlessControl9 too! CAllocator class: public IVMRSurfaceAllocator9, IVMRImagePresenter9, IVMRWindowlessControl9

  • Define all virtual functions IVMRWindowlessControl9. In my case, I needed to enter additional codes for the following functions for the mouse to work properly: GetAspectRatioMode (), SetAspectRatioMode (), SetAspectRatioMode (), GetVideoPosition () and GetNativeVideoSize (). Other functions just return S_OK.



The M $ SDK documentation didn't mention we need to implement this! After several hours of debugging, I noticed that quartz.dll is trying to request this interface from the custom allocator. Sometimes it really pays to be patient!

+2


source







All Articles