Must media source be signed with PE attribute in PMP mode? RRS feed

  • Question

  • I know, all the user components loaded in PMP PE must be signed with PE attribute. From MSDN, I found it :


    To be loaded in the PMP PE and process premium content, all user-mode binaries—including codecs, media sources, and media sinks—must be signed with a PE attribute


    As the above said, Media source must be signed with PE attribute, but, you know, the media source is created in application process, not in protected process. in other words, media source should not be loaded in PE. Why must source be signed with PE attribute?


    BTW, in PMP mode, media source will create a proxy across the process boundary. How to implement it?

    Thursday, May 17, 2007 3:25 AM


All replies

  • The Media Source does indeed exist by default in the application process.  So those docs aren't exactly accurate: In such a case, there's no need for the Media Source to be PE-signed.


    There is a non-default option for the Media Source to be created in the mfpmp.exe process instead of the application process.  The application requests this via the MF_SESSION_REMOTE_SOURCE_MODE attribute in MFCreatePMPMediaSession().  For this to work, of course, a Media Source would need to be PE-signed.


    When the Media Source is in the application process (the default), MF does the proxying work for it; the Media Source implementation actually doesn't need to do all that much for it to work. 


    The only thing I would mention is to be aware of those pointers that are pointing to an object in mfpmp.exe; for instance the IMFPMPHost * that your Media Source would get in IMFPMPClient:Tongue TiedetPMPHost exists in mfpmp.exe.  This is also true for any ITAs that your Media Source creates, of course.  For these, be careful about which thread you're accessing them from; if you need to access them from different threads, look into using the IGlobalInterfacePointer (RegisterInterfaceInGlobal/GetInterfaceFromGlobal).  I also would recommend looking into the FreeThreadedMarshaler (CoCreateFreeThreadedMarshaler).  In other words, some DCOM stuff.

    Thursday, June 14, 2007 6:06 PM
  • Hi, Becky:

       Thank you for your reply, but I have to trouble you again.

      As you said, Media source can be created and run in mfpmp.exe process. So I set the MF_SESSION_REMOTE_SOURCE_MODE attribute on PMP session by pConfiguration parameter of the MFCreatePMPMediaSession function. the code as below:


                      IMFActivate *pEnablerActivate = NULL;

                      IMFAttributes *pAttributes = NULL;

                      if (SUCCEEDED(hr))


                               hr = MFCreateAttributes(&pAttributes, 1);


                      if (SUCCEEDED(hr))


                               hr = pAttributes->SetUINT32(MF_SESSION_REMOTE_SOURCE_MODE, TRUE);


                      if (SUCCEEDED(hr))


                               hr = MFCreatePMPMediaSession(










        But, unfortunately, I get  the MESessionToplogySet event with MF_E_ATTRIBUTENOTFOUND error code. What's matter with the code?  Or, Can MF not support this feature currently?

    Thursday, June 21, 2007 2:26 PM
  • where is Becky? please help me !!

    How to load media source into the pmp process?

    Tuesday, June 26, 2007 3:21 AM
  • Right here :-)

    Continued this discussion on this thread: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2214180&SiteID=1&mode=1

    Monday, October 1, 2007 1:52 PM