2

I am using Media Foundation's IMFCapturePhotoSink to take photo from USB camera. I want to store the image in JPEG format.

I am creating Media Type object this way:

MFCreateMediaType(&pPhotoMediaType);
pPhotoMediaType->SetGUID(MF_MT_MAJOR_TYPE, MFMediaType_Image);
pPhotoMediaType->SetGUID(MF_MT_SUBTYPE, GUID_ContainerFormatJpeg);

Then I am using this Media Type object to configure the sink:

m_pPhotoSink>AddStream((DWORD)MF_CAPTURE_ENGINE_PREFERRED_SOURCE_STREAM_FOR_PHOTO, pPhotoMediaType, NULL, &dwSinkStreamIndex)

Now I am wondering if is possible to setup JPEG compresion parameters, e.g. copression level, so as I get the JPEG image directly in the right format.

radimoid
  • 199
  • 1
  • 9

0 Answers0