Reputation: 5038
I'm working on a Virtual Driver (Directshow filter) and I'm using graphedt to test and debug the filter.
Right now my code supports only the resolution of 320x240 px (hardcoded). As far as I understand I need to handle the GetMediaType and GetStreamCaps functions to support other resolutions.
Two questions:
I'm looking for an example for this but I cannot find it, perhaps I'm using wrong keywords in my websearch
how to force a request for a specific resolution in order to test my code using graphedt or any other tool?
Upvotes: 0
Views: 35
Reputation: 69687
I'm looking for an example for this but I cannot find it, perhaps I'm using wrong keywords in my websearch
Eight resolutions:
if(iPosition < 0) return E_INVALIDARG;
if(iPosition > 8) return VFW_S_NO_MORE_ITEMS;
[...]
pvi->bmiHeader.biWidth = 80 * iPosition;
pvi->bmiHeader.biHeight = 60 * iPosition;
how to force a request for a specific resolution in order to test my code using graphedt or any other tool?
Real application will (might) choose among available.
GraphStudioNext offers Ctrl+Shift+M option to choose while connecting.
Otherwise it is typical to pick resolutions/media types in order of enumeration, so the line 237 I highlighted with the link above shows you the way to temporarily override:
if (iIndex == 0) iIndex = 4;
Upvotes: 1