title: howto get name of MEDIASUBTYPE from AM_MEDIA_TYPE, c++
body: <p>I am using directshow to grab frames fro my webcam. During the configuration of the webcam (when I set the resolution, fps and so) I have multiple alternatives available from the cam. (47 of them). </p>
  
  <p>Currently i use a for loop which iterates through all available settings of the cam, and I just print the values in the console. But I have no good way to print the value of the Media sub type.</p>
  
  <p>Is there a good method to print the actual name of the media subtype?</p>
  
  <p>Now I test it like this:</p>
  
  <pre><code>if(mT-&gt;subtype == MEDIASUBTYPE_MJPG){
       printf(" MEDIASUBTYPE_MJPG ");
  } else {
       printf(" ----- ");
  }
  </code></pre>
  
  <p>(mT = AM_MEDIA_TYPE)
  Which is not a good way. I would like to use something that prints the actual name of the subtype.</p>
  
  <p>Thanks!</p>