2

I am developing an video recording application using DirectShow.NET in C# windows application. Till now I am able to build graph and recording is done using asf writer. While recording I have to show preview window with overlay text on it, For overlay text I have implemented SampleGrabber and it is working fine.

What issue I am facing is, all is working fine on my machine but as I deploy test application to other machine (OS : Windows 7) recording is not started but camera has been found.

Later going through exception log I have found following entry in log

Creating an instance of the COM component with CLSID {51B4ABF3-748F-4E3B-A276-C828330E926A} from the IClassFactory failed due to the following error: 80040273 Exception from HRESULT: 0x80040273.

After some Google on this issue I got to that this exception is caused due to graphics driver is not installed on system. After installing respected graphics driver all is working fine.

Before installing graphics drivers I have checked camera is working in Skype and Google hangout video chat application.

This exception is occurred at line:

IBaseFilter vmr9preview = null;
vmr9preview = (IBaseFilter)new VideoMixingRenderer9(); //THIS LINE CAUSING THE EXCEPTION
hr = Graph.AddFilter(vmr9preview, "VMR9");

Mostly OS works without graphics drivers, so it may happen that client machine won't have graphics drivers install. So is there any alternative to VideoMixingRenderer9, which will work without graphics driver?

Amogh
  • 4,453
  • 11
  • 45
  • 106
  • [Choosing the Right Video Renderer](https://msdn.microsoft.com/en-us/library/windows/desktop/dd374574). Additionally, earlier SDKs had `SampVid` sample video renderer, and there are also open source renderers. – Roman R. Jan 06 '16 at 07:06
  • @RomanR. I had gone through the link given by you before starting and as my application can be run on XP or later that's why I have choose `VMR9`. Problem is it true that VMR9 requires video driver install? Can't we do anything to avoid such issue. – Amogh Jan 06 '16 at 07:21
  • VMR-9 uses Direct3D, which you don't have. You need VMR-7 or classic/legacy renderer mentioned there. – Roman R. Jan 06 '16 at 07:50
  • @RomanR. Direct3D means DirectX, right? Just now I have tried with installing DirectX but didn't work. Is there anything special I have to do to refer D3D? – Amogh Jan 06 '16 at 08:20
  • 2
    Direct3D functionality is not available because generic driver does not have required capabilities, not because DirectX needs to be installed. You need to switch your app to those other renderers. – Roman R. Jan 06 '16 at 08:28
  • @RomanR. oh! okay. So currently I am using `VideoMixingRenderer9`, I will try by using `VideoMixingRenderer`. After this change it should work (without video driver), am I correct? – Amogh Jan 06 '16 at 08:35
  • @RomanR. After using `VideoMixingRenderer` all is working fine even if video drivers are not installed, but overlay of text on preview video is not working as expected. – Amogh Jan 06 '16 at 09:52

0 Answers0