How do i create an unprotected PMP session from javascript? RRS feed

  • Question

  • Hi, I'm trying to read data from a network source and display it, however I need to pass it through a decryptor first. I'm calling my C++ from javascript with the URL of a file, so my Media Source's BeginOpen function is called with an IMFByteStream containing the contents of this file. I now want to go away and download more stuff from the same URL (from but different files, according to what's in the first one). I can do this, and it works. I get a big buffer full of stuff I've downloaded.

    My problem comes when I try to display it. If I try to read any more data from the network, my media source is asked to implement the IMFTrustedInput interface. If I use the provided byte stream, it isn't, but that doesn't work because it's only the first file...

    Somewhere, I saw a comment about creating an unprotected PMP session, which I assume wouldn't have this problem. However I don't create the PMP session directly, it is (I assume) created when the relevant javascript is executed. So can I tell JS to create an unprotected PMP session?

    Or is there something else I can do to get around this? I have no idea how to implement all the stuff associated with IMFTrustedInput, and the comment I saw indicated that this shouldn't be necessary...

    PS I can't include a link to the comment I mentioned because my account isn't verified, however the comment reads, in part...

    No, indeed we don't have a sample ITA in the SDK.  This is mostly because we expect the space of developers writing these beasts to be somewhat small -- much smaller than the number of people writing Media Sources, transforms, Media Sinks, etc.  Generally, if you're writing an ITA, you're usually a PMP licensee.

    But there's no reason why you _have_ to be a PMP licensee to write an ITA.  (You will, as you observed in another thread, have to create the PMP session with the UNPROTECTED flag, because your non-PMP-signed code would not load in a protected process.)

    Thursday, November 28, 2013 12:32 AM

All replies

  • Hi CharlesRGoodwin,

    I'm not familiar with the PMP session and I will try to involve some experts to look this issue for you, it may take few days and please be patient.

    Thank you and best regards,


    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Tuesday, December 3, 2013 6:51 AM
  • <various links>

    Thanks, I already looked at those, but I'm afraid none of them explain how to create an unprotected media session from javascript. My problem is that the "framework" (or whatever it's called) calls my code to obtain an interface to various "trusted input" objects. I don't know why it does this, but I would like to be able to avoid having to provide the trusted input interface, which looks like a whole can of worms on top of the can I've already opened by trying to implement my own byte stream handler.
    Tuesday, December 3, 2013 8:32 PM
  • Thank you. I assume that if I find an answer in the meantime I should report it for the benefit of anyone else (a big "if" at the moment, unfortunately).
    Tuesday, December 3, 2013 8:33 PM