locked
E_NOINTERFACE with Media Engine TransferVideoFrame

    Question

  • I've taken the Media Engine examples, and combined it with existing code that renders sprites with DX11.

    I am getting an E_NOTINTERFACE error with the following line:

    hr = m_spMediaEngine->TransferVideoFrame(m_texture2D.Get(),nullptr, &m_rcTarget, &m_bkgColor);

     

    The texture was created, and the rectangles are correct.

    The texture was previously created successfully.

    I hear audio from the movie playing, but this call returns an hr = E_NOINTERFACE.

    Any thoughts on how to get this to work?

    I've tried calling transferVideoFrame from both the main render loop as well as on a timer thread (as set up in the C++ sample).

     

     

    Wednesday, March 20, 2013 2:18 AM

Answers

All replies

  • Hi,

    Would you please provide more codes about this? Or you can follow the codes in this thread
    http://social.msdn.microsoft.com/Forums/en-US/winappswithnativecode/thread/1c689901-751d-4da5-98a1-b378fb064bcf

    Typically, however, the application calls IMFMediaEngine::OnVideoStreamTick first, to determine whether a new frame is available. If OnVideoStreamTick returns S_OK, the application then calls TransferVideoFrame.

    Best regards,
    Jesse


    Jesse Jiang
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Thursday, March 21, 2013 4:33 AM
    Moderator
  • I am checking the OnVideoStreamTick - I've pretty much done a cut and paste of the example referenced in your post.

    I've seen on some forums something about needing to run in the same Tread apartment. Unfortunately, I don't know what this means, or if it is even related to my problem.

    Monday, March 25, 2013 6:49 PM
  • Eventually solved it. It was a lot of little things wrong. I had to go line by line to find which things were missing from the example pointed at by Jesse.
    Tuesday, March 26, 2013 3:39 AM