locked
VideoEffects problem

    Question

  • Hi all,

    I am trying to follow the instruction to add videoEffects. But VS always give me an error saying "WinRT infomation:Class not registered". I tried the Windows.Media.VideoEffects.videoStabilization effect as well, also the same error. Googled and find nothing so far, has anyone run into such problem? Thanks for any hint. Below is my code

        function grayScale(target)
        {
            var flag = $(target).attr('value');
            if (flag == "on")
                mediaCaptureMgr.addEffectAsync(Windows.Media.Capture.MediaStreamType.videoPreview, "GrayscaleTransform.GrayscaleEffect", null).done(function (args)
                {
    
                }, errorHandler);
            else
                mediaCaptureMgr.clearEffectsAsync(Windows.Media.Capture.MediaStreamType.videoPreview);
        }

    My Best


    • Edited by ILOVEWCF Monday, July 30, 2012 9:10 AM
    Monday, July 30, 2012 3:30 AM

Answers

  • Hi.. I ran into the same problem.. twice^^.. I don't know if there is any possibility to solve this problem with visual studio and the graphical user interface but here is what i noticed and did.. .

    i opened the application manifest of the sample app that uses the gray scale filter (not visual studio but with notepad.. its an xml)

    there you'll find an extension entry which you need to copy into you manifest.  Here is the entry i use for my filter extention:

      <Extensions>
        <Extension Category="windows.activatableClass.inProcessServer">
          <InProcessServer>
            <Path>DataAccessTransform.dll</Path>
            <ActivatableClass ActivatableClassId="DataAccessTransform.DataAccess" ThreadingModel="both" />
          </InProcessServer>
        </Extension>
      </Extensions>

    hope this fixes your problem.. ;)

    Wednesday, September 18, 2013 10:44 AM

All replies

  • Hi I,

    Ah I found your problem, you used Google instead of Bing :-)

    Here is a sample that backs up that article:http://code.msdn.microsoft.com/windowsapps/Media-extensions-sample-7b466096

    You will notice the effect "GrayscaleTransform.GrayscaleEffect" is in a provided filter that is included with the project.

    You will see how to use the video stabilization filter in this function in the sample:

    videoStabilizationStart()

    -Jeff


    Jeff Sanders (MSFT)

    Monday, July 30, 2012 5:49 PM
    Moderator
  • Hi,

    Thanks for the response. I am trying to learn webcam related API in Metro Apps. The sample you mentioned is a very straightforward one, thanks. But if I use video.msInsertEffect instead of MediaCapture.addEffectAsync , the picture I take will not be effect applied. Maybe it's because the prior is applying the effect when rendering and addEffectAsync is manipulating the stream directly. I did successfully applied vidoestabilization with below code:

     if (flag == "on")
                mediaCaptureMgr.addEffectAsync(Windows.Media.Capture.MediaStreamType.videoPreview, Windows.Media.VideoEffects.videoStabilization, null).done(function (args)
                {
    
                }, errorHandler);

    I failed previously because the Windows.Media.VideoEffects.videoStabilization itself represents the videostabilization effect activation id, but I use "Windows.Media.VideoEffects.videoStabilization" instead.

    Still, I cant apply grayscale or any other sample provided custom MFT(it this name correct?). I tried reference the shipped project directly in my test project or copy the sample project and add it to my solution. But the error is always WinRT information:Class not registered. Also seems admin is not enough to run regsvr32.. The msg says only app pack can do this?

    My Best


    • Edited by ILOVEWCF Tuesday, July 31, 2012 1:52 AM
    Tuesday, July 31, 2012 1:51 AM
  • OK so the only problem now is reusing the gray scale component?  Did you include it as a reference in your new project?

    -Jeff


    Jeff Sanders (MSFT)

    Tuesday, July 31, 2012 7:38 PM
    Moderator
  • Yep, I can reference and build it with no error. But at runtime the "Class not registered" will popup. Any ideas?
    Wednesday, August 1, 2012 1:47 AM
  • Hi.. I ran into the same problem.. twice^^.. I don't know if there is any possibility to solve this problem with visual studio and the graphical user interface but here is what i noticed and did.. .

    i opened the application manifest of the sample app that uses the gray scale filter (not visual studio but with notepad.. its an xml)

    there you'll find an extension entry which you need to copy into you manifest.  Here is the entry i use for my filter extention:

      <Extensions>
        <Extension Category="windows.activatableClass.inProcessServer">
          <InProcessServer>
            <Path>DataAccessTransform.dll</Path>
            <ActivatableClass ActivatableClassId="DataAccessTransform.DataAccess" ThreadingModel="both" />
          </InProcessServer>
        </Extension>
      </Extensions>

    hope this fixes your problem.. ;)

    Wednesday, September 18, 2013 10:44 AM
  • thanks for the help
    Tuesday, January 27, 2015 6:05 PM