locked
Change resolution with driver mft

    Question

  • I have a question regarding driver mft and resolution.  I have the successfully built and run the mft0 sample along with the Metro style device app for camera sample.  I can control the blackout-effect from the device app.  What I want to do now is to control the resolution of the video stream. 

    So I built the Media capture using capture device sample and added code to call SetMediaStreamPropertiesAsync to change the resolution.  I check for success by calling GetMediaStreamProperties.

    What I found is that if the mft is enabled, I can not change resolution - it is always fixed at 640x480.  However, if I disable the mft (modifying the registry under Control\DeviceClasses), then in my capture app, I can successfully change the resolution to any of the available formats.  But if I re-enable the mft, I can't.  It's always at 640x480.

    I am also checking the resolution in the ProcessOutput function of the mft (when enabled) and it always fixed at 640x480.

    I did find this thread: http://social.msdn.microsoft.com/Forums/en-US/winappswithnativecode/thread/142d66a0-1ef6-453b-a939-aaba7c31287f.

    But I am not having the same success.  Any ideas?  If there is code in the mft which is doing this I cannot find it.

     (I have tried this with several different cameras.)

    Tuesday, February 5, 2013 7:28 PM

All replies

  • BTW, I do not have this problem when using the media extension mft like the grayscale sample.
    Tuesday, February 5, 2013 7:58 PM
  • Actually I ever asked the same problem in the Media Foundation forum about 6 months ago , but no one responds to my question. 
    (here is the link to the thread 
    http://tinyurl.com/mzkkkoc).

    Lately, I try the newest Driver MFT sample code in Windows 8.1 preview.

    I download the newest Driver MFT from here 

    http://code.msdn.microsoft.com/windowshardware/Driver-MFT-Sample-34ecfecb

    and follow the instruction to build the sample code using VS 2013 Preview Version.

    Before installing the Driver MFT , I can switch the resolution between 4:3(640X480) and 16:9(1280X720) 

    Without Driver MFT
    but after I install the Driver MFT , the 16:9(1280X720) is missing. I can't switch the resolution , it always fixed at 4:3(640X480)

    After using Driver MFT

    Anyone also discover this problem ? 

    Any suggestions and helps are greatly appreciated.

    Thanks in advanced.

    Drik




    Monday, August 12, 2013 7:03 AM
  • Hi Gary ,

    Did you solve this problem ?

    I am also discover the same problem. 

    Thanks,

    Drik

    Monday, August 12, 2013 8:13 AM
  • Hello,

    Why are you using a driver MFT vs. a standard MFT implementation? Driver MFTs are usually reserved for video driver manufactures to hook into the MF pipeline. I would recommend that you use the code associated with the grayscale sample and not use the Driver MFT sample.

    I hope this helps,

    James


    Windows SDK Technologies - Microsoft Developer Services - http://blogs.msdn.com/mediasdkstuff/

    Monday, August 12, 2013 10:49 PM
    Moderator
  • Hi James , 

    Currently We are developing image post-processing effect and we will hook it to the MF Pipeline.

    So this effect will be apply to all of the camera apps (desktop and metro mode).

    The standard MFT just doesn't meet our requirement.

    but after I install the Driver MFT , I can't switch the resolution , it always fixed at 640X480. 

    We hope that after installing the Driver MFT , we don't change the existing behavior of the metro camera app.

    So user can still change the resolution. 

    Thanks

    Drik

    Tuesday, August 13, 2013 8:48 AM
  • Hello Drik,

    We would prefer that you not create a driver MFT to be loaded into every application. This is not the intent of the API. Unless you are an independent hardware vendor looking to write a driver MFT for your hardware I would recommend that you contain your MFT DSP to your own application.

    -James


    Windows SDK Technologies - Microsoft Developer Services - http://blogs.msdn.com/mediasdkstuff/

    Friday, August 16, 2013 8:25 PM
    Moderator