What the point of passing URL of the source to IMFMediaEngineEx::SetSourceFromByteStream? RRS feed

  • Question

  • Hello!

    I have a question about  IMFMediaEngineEx::SetSourceFromByteStream.

    Why do i need to pass an URL of a source, if I have a byte stream? and actualy it does nothing with the URL - I tryed to pass a random string as URL along with valid byte stream - and it works.

    So I wounder - is the method will be changed and URL argument will be removed (that seems to be the right thing to do), or I can just pass a random string and don't bother about it?

    Thank you

    Mike Nikolaichev

    Tuesday, April 17, 2012 9:11 AM

All replies

  • Hi Mike,

    As far as I know IMFByteStream interface represents a byte stream from some data source, which might be a local file, a network file, or some other source.

    Therefore it's necessary to record the URL for network file.

    Best regards,

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

    Wednesday, April 18, 2012 5:51 AM
  • Hi again, Jesse!

    If I undrestood correctly, I can pass a random string as an URL for local file, correct? but I need to pass a valid URL for network file, right?

    I just don't get it! As i understand IMFByteStream holds a pointer to a data - exactly what i want to give to it - why i need to give it an URL??

    Let me explain what i want to do so it will be clear. I want to play a video (using IMFMediaEngine) from my custom byte stream - it will be opend over a 'data' file by meens of our engine - so it won't be a separated video file, so i will not have an URL for that video. And i need to know is this method will be changed in post beta versions or not? 

    Mike Nikolaichev C++ developer at Alawar Friday's Games

    Wednesday, April 18, 2012 9:30 AM
  • I use the 2nd parameter as "MIME" type which is of "string" type,  it's not URL. 

    but I cannot find where's the document I referred before,  maybe I compare it with media element, and guess its should be "MIME".

    anyway,  I document it in my test sample that

    " it should be MIME type,  MediaEngine maybe refer to this MIME type if it cannot resolve topology correctly from IMFByteStream. "

    just a guess,  you can refer it as discussion, since no document here backup my idea.


    ---------------------------------------------- JohnYe from SHANGHAI. email: yechzh@126.com

    Wednesday, April 25, 2012 7:29 AM
  • Thanks for your thought, JohnYe

    Mike Nikolaichev | C++ developer at Alawar Friday's Games

    Wednesday, April 25, 2012 12:03 PM