Can I create byte stream from network source?

I want to create IMFByteStream instance using source resolver. When I use files on disk as the source URL, all is fine. But when I use network source ("mms://streaming_server/file.wmv") as source URL, the resolver's CreateObjectFromURL method fails with error code MF_E_UNSUPPORTED_SCHEME. I tried using "http:", instead of "mms:", but that fails too.

Is "mms:" or "http:" scheme not registered with MF by default

~ UK



Answer this question

Can I create byte stream from network source?

  • Andrew Baker

    It appears you're correct: Our net scheme handler plugin indeed does not allow you to create an IMFByteStream, only an IMFMediaSource. Given that, I don't think it's possible to do what you want the way MF stands today.

  • digitalsuperman

    Have you tried "rtsp://"


  • Tufelix

    Ok. I tried this code path today, but I still cannot get IMFByteStream instance. ( I tried all the three schemes of interest - http://, mms:// and rtsp://)

    In BeginCreateObject() call, I tried setting the flag value first to MF_RESOLUTION_BYTESTREAM, then to MF_RESOLUTION_MEDIASOURCE and then to 0. In all the three cases, I get back IMFMediaSource Object. EndCreateObject() returns object type as MF_OBJECT_MEDIASOURCE in all the three cases. Looks like default MF implementation is ignoring the resolver flag value :-(


  • Daikoku

    yes, I have. That fails too. What is more confusing is that if I want to create a Media Source for the same URL using source resolver, that succeeds. So it is clear that MF has the scheme handlers for the mentioned schemes.

    I also enumerated the supported schemes using MFGetSupportedSchemes(). It shows that MF indeed supports a bunch of schemes by default, including the "http:", "mms:", "rtsp:".


  • Catalin Zima

    All right, I'll give this a try and see what happens.

  • Scott Butler

    The MF Source Resolver should be picking up http://, mms://, and rtsp://.

    What if you try:

    IMFSchemeHandler *pSchemeHandler = NULL;

    MFCreateNetSchemePlugin( IID_IMFSchemeHandler, (void**) &pSchemeHandler );

    pSchemeHandler->BeginCreateObject( pwszYourURL, 0, NULL, NULL, NULL, pYourCallback, pYourState );

    ... etc



  • Can I create byte stream from network source?