How pass a parameter to a custom EVR Presenter using Activate objects? RRS feed

  • Question

  • I'm trying to pass a COM pointer as a parameter to my custom EVR presenter object upon creation. I am currently using MFCreateVideoRendererActivate to add EVR and then setting the MF_ACTIVATE_CUSTOM_VIDEO_PRESENTER_CLSID attribute on the returned object to my custom presenter's CLSID. How can I pass a parameter (COM pointer, etc) to my custom presenter if I have no control of when it's created? Am I missing something here?
    Tuesday, January 4, 2011 7:32 PM


  • Ok, so I answered my own question with a bit of digging. Rather than setting the custom presenter's CLSID as the attribute on the EVR activate object, I created my own IMFActivate object and passed it to the EVR activate object using SetUnknown and MF_ACTIVATE_CUSTOM_VIDEO_PRESENTER_ACTIVATE. Then, in my ActivateObject(...) method, after I created the instance of my presenter myself, I set the attribute on the presenter object. It worked! It was a bit of a headache implementing the pass-through IMFAttributes methods, but it's done now.
    Wednesday, January 5, 2011 7:24 AM