locked
Did I missing something for dynamic format change.

    Question

  • Hi,

    I met a problem about the format change when start get sample of source reader. I am trying to get raw image data from a video file for my video edit metro app. But I found there is always a gray bar at the bottom of the video frame in some clip.

    The original size I got from the sample is 320*136.

    When I using source reader(initialize with MF_SOURCE_READER_D3D_MANAGER attribute) to get a sample, the first sample from IMFSourceReader::ReadSample will have the stream flag MF_SOURCE_READERF_CURRENTMEDIATYPECHANGED.

    Then I use MF_MT_FRAME_SIZE to get the frame size from the Media Sample(Through IMFAttribute interface). The size after format change will change to 320*144. Dues to I am under metro, I can't get other attribure likes MF_MT_GEOMETRIC_APERTURE that with MFVideoArea. 

    I found the texture(ID3D11Texture2D) of the first sample said it's size is 320*144 (I got from D3D11_TEXTURE2D_DESC). But the content of this texture actually 136 pixel height. So I will get a frame with gray bar at the bottom if I got the texture with full size.

    Is there some information I miss about the format change? Should I do something to make source reader output the frame without the gray bottom bar, or I can get information about the actual valid height of the texture I can use?

    What should I do for this issue, can somebody give me some idea?

    Thank you~~

    Eric


    Friday, June 15, 2012 3:23 PM

Answers

  • Hi  Jesse,

    Thanks for your help. Currently I found that even the document said the MF_MT_GEOMETRIC_APERTURE is not supported by metro, but I found I can get these information from media type and that resolved my problem.

    Thank you~~

    Eric

    Monday, June 18, 2012 12:26 PM

All replies

  •  

    Hello,

     

    Would you please provide us the whole codes to reproduce this issue,

     

    You can upload your project to skydriver

    http://skydrive.live.com/

     

    It is not necessary that you send out the whole of your project. We just need a simplest sample to reproduce the problem. You can remove any confidential information or business details from it.

     

    Best regards,

    Jesse


    Jesse Jiang [MSFT]
    MSDN Community Support | Feedback to us

    Monday, June 18, 2012 11:53 AM
  • Hi  Jesse,

    Thanks for your help. Currently I found that even the document said the MF_MT_GEOMETRIC_APERTURE is not supported by metro, but I found I can get these information from media type and that resolved my problem.

    Thank you~~

    Eric

    Monday, June 18, 2012 12:26 PM