:: AForge.NET Framework :: Articles :: Forums ::

How do I manipulate SourceObject from VideoCaptureDevice?

Forum to discuss AForge.NET Framework, its features, API, how-tos, etc.

How do I manipulate SourceObject from VideoCaptureDevice?

Postby dgiang » Tue Jul 02, 2019 2:52 pm

I am using a framegrabber and initialized it as a video device and can output to a video source player. I need to configure the settings of the framegrabber, (specific settings related to the grabber itself). The 2 closest methods I am thinking of using are DisplayPropertyPage and SourceObject.

I tried using DisplayPropertyPage but it opened up a settings menu that is not what I need. I am now looking at the last option available which is SourceObject. How do I utilize this property?

I am able to configure the settings of the frame grabber using its own API but then I am unable to use the video source player because it is not declared as a video device.

I am hoping to see if I can use the SourceObject property to configure the settings with the frame grabber API.
Posts: 3
Joined: Tue Jun 25, 2019 3:24 pm

Re: How do I manipulate SourceObject from VideoCaptureDevice

Postby andrew.kirillov » Wed Jul 03, 2019 7:56 am

SourceObject can be used to access the DirectShow COM object of the video source (camera, frame grabber, etc.). You can check source code of VideoCaptureDevice to see how that object is used. You just cast it to whatever DirectShow interface you need and use it.

If your framr grabber provides additional API (other than DirectShow), then SourceObject may not help you.
With best regards,

Interested in supporting AForge.NET Framework?
User avatar
Site Admin, AForge.NET Developer
Posts: 3453
Joined: Fri Jan 23, 2009 9:12 am
Location: UK

Return to AForge.NET Framework