I have to configure my video camera display resolution before capturing and processing the data. Initially I did it as follows.
Created all necessary interfaces
IAMStreamConfig::SetFormat needs to be used to set capture format before the pin is connected and rendered. This way the downstream subchain of filters is built with proper media types.
IAMStreamConfig::SetFormat