locked
Problems with MediaCapture sample in Simulator

    Question

  • Hello!

    I have faced with error when trying to run MediaCapture sample:

    MediaCapture example doesn't work with error message:

    Exception from HRESULT: 0xC00DABE0

    Exception appears in this line:

    await m_mediaCaptureMgr.InitializeAsync(settings);

    It seems, what this error code means:

    "No capture devices are available."

    http://joshpoley.blogspot.in/2011/09/hresults-facilitymediaserver.html

    If I run example in "Local Computer" mode, it working good.

    How I should fix this problem?

    Thanks.


    Thursday, August 23, 2012 9:56 AM

Answers

  • Okay just so I'm clear before I investage this as a bug.

    Simulator + MediaCapture CaptureMode = video ---- Works

    Simulator + MediaCapture CaptureMode = audio ---- Fails

    Is this correct or am I missing additional detail?

    -James


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

    Yes, this is correct.

    Additional information: I have tried DeviceInformation.FindAllAsync(DeviceClass.AudioCapture), and it returns one object named "Remote Audio". 

    Thursday, August 30, 2012 4:24 AM

All replies

  • Hello,

    Are you on RTM? Are you able to capture audio only through the simulator? If the answer is yes to the first one can you please provide a DXDiag log and post it on Skydrive?

    Thanks,

    James


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

    Friday, August 24, 2012 8:31 PM
    Moderator
  • Hello,

    Yes, I am using RTM.

    If I use "Record Audio" program in Simulator, it works correctly. But "MediaCapture" example not working. So, I am not able to capture audio on simulator. But on computer (when I use option "Local Machine" from debug menu) example working good.

    This is my DxDiag file: http://sdrv.ms/Rf80p1

    Thanks.


    Monday, August 27, 2012 7:22 AM
  • Hi,

    I have same problem but I am able to use camera on simulator when StreamingCaptureMode is StreamingCaptureMode.Video. It didn't throw exception.

    m_devInfoCollection = await DeviceInformation.FindAllAsync(DeviceClass.VideoCapture);
    if (m_devInfoCollection.Count > 0)
    {
        devCurrentNo = 0;
        devInfoName = m_devInfoCollection[devCurrentNo].Name;
        var settings = new Windows.Media.Capture.MediaCaptureInitializationSettings();
        var chosenDevInfo = m_devInfoCollection[devCurrentNo];
        settings.VideoDeviceId = chosenDevInfo.Id;
        settings.StreamingCaptureMode = StreamingCaptureMode.Video;
        m_mediaCaptureMgr = new Windows.Media.Capture.MediaCapture();
        await m_mediaCaptureMgr.InitializeAsync(settings);
    }

    Kentaro

    Monday, August 27, 2012 12:12 PM
  • Okay just so I'm clear before I investage this as a bug.

    Simulator + MediaCapture CaptureMode = video ---- Works

    Simulator + MediaCapture CaptureMode = audio ---- Fails

    Is this correct or am I missing additional detail?

    -James


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

    Tuesday, August 28, 2012 9:49 PM
    Moderator
  • Hi James,

    It was the following results:

    *Local Machine + MediaCapture CaptureMode = video ---- Works

    *Local Machine + MediaCapture CaptureMode = audio ---- Works

    *Simulator + MediaCapture CaptureMode = video ---- Works

    *Simulator + MediaCapture CaptureMode = audio ---- Fails

    *Remote Desktop + MediaCapture CaptureMode = video ---- Works

    *Remote Desktop + MediaCapture CaptureMode = audio ---- Fails

    "Fails" means that an Exception thrown.

    Regards,

    Kentaro

    Wednesday, August 29, 2012 4:22 PM
  • Okay just so I'm clear before I investage this as a bug.

    Simulator + MediaCapture CaptureMode = video ---- Works

    Simulator + MediaCapture CaptureMode = audio ---- Fails

    Is this correct or am I missing additional detail?

    -James


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

    Yes, this is correct.

    Additional information: I have tried DeviceInformation.FindAllAsync(DeviceClass.AudioCapture), and it returns one object named "Remote Audio". 

    Thursday, August 30, 2012 4:24 AM
  • its very good this forum is so helpful..
    Thursday, August 30, 2012 7:26 AM
  • Danil & suhail,

    Thank you very much for reporting this. This behavior is not expected. I will report this issue to the simulator team. For now it sounds like Danil has suggested a good solution.

    Thanks,

    James


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

    Friday, August 31, 2012 10:27 PM
    Moderator
  • Danil & suhail,

    Thank you very much for reporting this. This behavior is not expected. I will report this issue to the simulator team. For now it sounds like Danil has suggested a good solution.

    Thanks,

    James


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

    Hello, James,

    Sorry, but what did you mean with For now it sounds like Danil has suggested a good solution. ?

    I have simply wrote what Audio capture not working in Simulator. So, for now, the only way to test audio capture applications is to use "Local Machine" debugging...

    Monday, September 03, 2012 7:22 AM
  • The way I understood your post you could use the "Remote Audio" device in the simulator. Is this not the case?

    -James


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

    Tuesday, September 11, 2012 12:29 AM
    Moderator
  • The way I understood your post you could use the "Remote Audio" device in the simulator. Is this not the case?

    No, this is not solution. 

    I just add this inforamtion, hoping it help to reproduce problem.

    Wednesday, September 12, 2012 8:13 AM