locked
Get the IMF2DBuffer RRS feed

  • Question

  • I'm trying to get an IMF2DBuffer from a IMFMediaBuffer. I'm using the QueryInterface function to get it. But it gives an error with code 2 (file not found?). I think I need to call CoCreateInstance before QueryInterface, but with what CLSID?

    Anyone know how to get the IMF2DBuffer?

    Thanks


    -- END OF TRANSMISSION --
    Thursday, August 12, 2010 12:13 AM

Answers

  • On Fri, 13 Aug 2010 16:51:37 +0000, MagniWare wrote:

    But I've an IMFMediaBuffer where I want to read the frame from,  My problem with IMFMediaBuffer is is that when you lock it to get the buffer I don't know how the frame is represented by the bytes.

    You can use IMFMediaType to get the media type which tells you how to
    interpret the bytes in the media sample.


    Please use Vote As Helpful (green up arrow at top-left of posts) and Mark As Answer where appropriate.
    My dshow site is http://tmhare.mvps.org.
    Friday, August 13, 2010 5:06 PM

All replies

  • Or, is there any other way I can access the video sample's pixel data? I'm really stuck here.
    -- END OF TRANSMISSION --
    Thursday, August 12, 2010 4:10 PM
  • On Thu, 12 Aug 2010 16:10:57 +0000, MagniWare wrote:

    is there any other way I can access the video sample's pixel data?

    Try:

    IMFVideoDisplayControl::GetCurrentImage

    http://msdn.microsoft.com/en-us/library/ms695342%28v=VS.85%29.aspx


    Please use Vote As Helpful (green up arrow at top-left of posts) and Mark As Answer where appropriate.
    My dshow site is http://tmhare.mvps.org.
    Friday, August 13, 2010 2:30 PM
  • But I've an IMFMediaBuffer where I want to read the frame from,  My problem with IMFMediaBuffer is is that when you lock it to get the buffer I don't know how the frame is represented by the bytes. I need to get the IMF2DBuffer from it.
    -- END OF TRANSMISSION --
    Friday, August 13, 2010 4:51 PM
  • On Fri, 13 Aug 2010 16:51:37 +0000, MagniWare wrote:

    But I've an IMFMediaBuffer where I want to read the frame from,  My problem with IMFMediaBuffer is is that when you lock it to get the buffer I don't know how the frame is represented by the bytes.

    You can use IMFMediaType to get the media type which tells you how to
    interpret the bytes in the media sample.


    Please use Vote As Helpful (green up arrow at top-left of posts) and Mark As Answer where appropriate.
    My dshow site is http://tmhare.mvps.org.
    Friday, August 13, 2010 5:06 PM