none
How to use IMFMediaEngine Interface without PlayBack Handle for processing Videos?

    Question

  • Is there any way to bypass the MF_MEDIA_ENGINE_PLAYBACK_HWND ? I mean, say an command-line exe application, which uses IMFMediaEngine to read the video and finds generate 5 thumbnails from random frames. So I really don't want to see the video in some Window Handle, just want other capabilities of IMFMediaEngine(such as frame prcessing, transfer frame to image). So is it completely necessary to have the handle ? please provide a way to initilize the IMFMediaEngine interface without Window Handle.

    • Edited by AjayRamesh Friday, February 9, 2018 7:02 PM
    Friday, February 9, 2018 6:59 PM

All replies

  • Hi AjayRamesh,

    thanks for posting here.

    >>So is it completely necessary to have the handle ? please provide a way to initilize the IMFMediaEngine interface without Window Handle.

    As far as I know, you could use IMFMediaEngineEx which extends the IMFMediaEngine interface.

    It provides windowless swap-chain mode. In windowless swap-chain mode, the Media Engine creates a windowless swap chain and presents video frames to the swap chain. To render the video, call IMFMediaEngineEx::GetVideoSwapchainHandle to get a handle to the swap chain, and then associate the handle with a Microsoft DirectComposition visual.

    It may could be help of you.

    Best Regards,

    Baron Bi


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, February 12, 2018 1:50 AM
    Moderator