0

how to change OutPut Pin Size & ColorSpace/Compression of a Video Source Filter in DirectShow

I want to Know whre the Output Pin PropertyPage Datas are stored and how can I Change those Datas By My Code

2 Answers2

1

You would have to write your own transformation filter. Or you can use a filter like FFDShow that supports image resizing among other video modifications and enhancements.

Jeremiah Morrill
  • 4,248
  • 2
  • 17
  • 21
0

You can use IPin::EnumMediaTypes on your filter's output pin to get a list of supported media types / video formats.

Afterwards, call IAMStreamConfig::GetFormat to get the current format in an AM_MEDIA_TYPE structure. Modify this structure as you wish (make sure your format is supported by the device), and call IAMStreamConfig::SetFormat with the same structure.

fulguroblastor
  • 606
  • 5
  • 11
  • Thanks for the answer. But for a beginner in Direct Show it is not really helpfull. Can you please tell me where I get the IPin and IAMStreamConfig interfaces from ? In my code I have a IGraphBuilder, ICaptureGraphBuilder2, IBaseFilter, IVMRWindowlessControl9, IMediaControl, but no IPin. A peace of code would be VERY helpfull! – Elmue Apr 06 '16 at 15:09