MediaCapture.PrepareLowLagRecordToStorageFileAsync() infinite await RRS feed

  • Question

  • Hi,

    I am trying to create app which should record videos with 1-3s long with small intervals between videos.

    Something like 1s video 1s pause 2s video 1 sec pause (length depends on other events).

    MediaCapture mediaCapture;
    // Initialize
    mediaCapture.StartRecordToStorageFileAsync(mp4profile, file);
    // event duration

    This code is not fast enough.

    Then I tried following:

    // code from MediaCapture sample
    // initialized properties
    MediaEncodingProfile recordProfile = null;
    recordProfile recordProfile;
    m_lowLagRecord = await mediaCaptureMgr.PrepareLowLagRecordToStorageFileAsync(recordProfile, m_recordStorageFile);
    But last method is never finished on my machine.

    Any advice how to solve this?


    Monday, August 18, 2014 1:03 PM

All replies

  • Hi PVyhlas,

    Per my understanding, you need to initialize recordProfile and m_recordStorageFile objects before call PrepareLowLagRecordToStorageFileAsync method like the code sample. But from your description, there is no initialization. Can you try the approach and let me know the result?


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, August 19, 2014 7:24 AM
  • Hi,

    I removed initialization code from post above.

    This problem happens when I use unchanged code from provided SDK sample (there is default initialization of profile and storage file), same thing happen when I run SDK sample.


    here is full code

    m_recordStorageFile = await Windows.Storage.KnownFolders.VideosLibrary.CreateFileAsync(VIDEO_FILE_NAME, Windows.Storage.CreationCollisionOption.GenerateUniqueName);
    				ShowStatusMessage("Create record file successful");
    				MediaEncodingProfile recordProfile = null;
    				recordProfile = MediaEncodingProfile.CreateMp4(Windows.Media.MediaProperties.VideoEncodingQuality.Auto);
    				m_lowLagRecord = await m_mediaCaptureMgr.PrepareLowLagRecordToStorageFileAsync(recordProfile, m_recordStorageFile);

    Tuesday, August 19, 2014 6:59 PM