locked
How to use winrt library to create a video effect in metro apps?

    Question

  • I try to use a com dll in metro app, but I find it can't be succeed. Then I get a solution on the Internet: if I need to use regular C++/COM to write WinRT applications, I should creating the activation factory, implementing IUnknown and IInspectable and so on. But I don't know how to do these things, can anyone afford some samples or some suggestion?

    Summarized as follows:

    1.If I want to use regular C++/COM to write WinRT app, what should I do?(It's best that you can give me some samples, thanks)

    2.Whether I can use WinRT directly to write a dll that can be use in metro app?(like GrayscaleTransform.dll in Media Plugins Sample which can be use in metro app directley)

    3.If I can use winrt library to do this? and how to use winrt library to create a video effect in metro apps?

    Thank you very much!

    Monday, December 12, 2011 2:28 AM

Answers

  • Hello Lucky

    In order to have your custom MF Source packaged and loaded from within your Metro application, you are going to need to add an interface or two to a standard COM based MFT (IInspectable, etc.). Unfortunately as of the “Build” developer preview release we don’t have a good bit of sample code to show you how to make your MFT callable from the WinRT environment.
     
    I know that Stan promised a sample when he spoke at “Build”. I’ve been working with Stan and others to make sure we get a good sample published as soon as we can. Once we have a clean sample that is up to date I will make sure to announce it on my blog (http://blogs.msdn.com/mediasdkstuff/). I’m not sure when we will get this published but I’m working to get it out as soon as possible.

    Thanks for your patience,

    James
    Windows Media SDK Technologies
    Microsoft Developer Services
    http://blogs.msdn.com/mediasdkstuff/

    • Marked as answer by luckyyyboy Thursday, December 15, 2011 1:29 AM
    Wednesday, December 14, 2011 1:33 AM
    Moderator

All replies

  • Hello Lucky

    In order to have your custom MF Source packaged and loaded from within your Metro application, you are going to need to add an interface or two to a standard COM based MFT (IInspectable, etc.). Unfortunately as of the “Build” developer preview release we don’t have a good bit of sample code to show you how to make your MFT callable from the WinRT environment.
     
    I know that Stan promised a sample when he spoke at “Build”. I’ve been working with Stan and others to make sure we get a good sample published as soon as we can. Once we have a clean sample that is up to date I will make sure to announce it on my blog (http://blogs.msdn.com/mediasdkstuff/). I’m not sure when we will get this published but I’m working to get it out as soon as possible.

    Thanks for your patience,

    James
    Windows Media SDK Technologies
    Microsoft Developer Services
    http://blogs.msdn.com/mediasdkstuff/

    • Marked as answer by luckyyyboy Thursday, December 15, 2011 1:29 AM
    Wednesday, December 14, 2011 1:33 AM
    Moderator
  • Hi,James. Thank you for your answer.I will take attention to your blog for the solution of my question later. Thank you very much.
    Thursday, December 15, 2011 1:29 AM
  • I just want to clarify something about the question about the custom COM object housed in the DLL, does it provide an interface to some resources that are surfaced in the Metro environment? If so, then even you can create the object, then that does not mean you can successfully so interface to access anything that is outside the Metro environment and just because it worked from a desktop application does not mean it will work when used from your metro application, correct?

    Thanks,

    Friday, December 16, 2011 8:27 PM
  • Under the covers WinRT uses a new version of COM to implement the object model. Because of this it is possible to take an existing COM object and modify it to work in the context of WinRT. That said the modifications can be rather extensive and not well documented at this time. Any custom WinRT / COM library that you instantiate in your WinRT / Metro application can only be used in the context of your Metro application. A custom WinRT library cannot access any of the system APIs that are not already exposed through WinRT. In other words a custom WinRT / COM object is sandboxed within your Metro application. I hope this answers your question.

    Saturday, December 17, 2011 1:18 AM
    Moderator