title: JPEG Photo Sink attributes in Media Foundation
body: <p>I am using Media Foundation's IMFCapturePhotoSink to take photo from USB camera. I want to store the image in JPEG format. </p>
  
  <p>I am creating Media Type object this way:</p>
  
  <pre><code>MFCreateMediaType(&amp;pPhotoMediaType);
  pPhotoMediaType-&gt;SetGUID(MF_MT_MAJOR_TYPE, MFMediaType_Image);
  pPhotoMediaType-&gt;SetGUID(MF_MT_SUBTYPE, GUID_ContainerFormatJpeg);
  </code></pre>
  
  <p>Then I am using this Media Type object to configure the sink:</p>
  
  <pre><code>m_pPhotoSink&gt;AddStream((DWORD)MF_CAPTURE_ENGINE_PREFERRED_SOURCE_STREAM_FOR_PHOTO, pPhotoMediaType, NULL, &amp;dwSinkStreamIndex)
  </code></pre>
  
  <p>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.</p>