Hololens/Lib/Cameras.cs
//#############################################################################################
/// <summary>
/// Initialize the camera. Check available cameras before build the FrameReader object and define the output format.
/// Main camera could be initialized using MediaStreamType.VideoRecord and MediaFrameSourceKind.Color as arguments.
/// </summary>
/// <param name="streamType">
///     Type of media that the media reader will be used for.
///     Values : VideoRecord (recommanded for accessing frame), VideoPreview, Audio, Photo.
/// </param>
/// <param name="sourceKind">
///     For cameras, specify the type of image produced.
///     Values : Color (recommanded), Infrared, Depth.
/// </param>
Initialize the camera. Check available cameras before build the FrameReader object and define the output format.
Main camera could be initialized using MediaStreamType.VideoRecord and MediaFrameSourceKind.Color as arguments.
Initialize the camera . Check available cameras before build the FrameReader object and define the output format . Main camera could be initialized using MediaStreamType . VideoRecord and MediaFrameSourceKind . Color as arguments .
public async Task Init(MediaStreamType streamType, MediaFrameSourceKind sourceKind)
        {
            await FindSource(streamType, sourceKind);
            await InitMediaCapture();
            await SetFrameFormat();
        }
public async Task Init ( MediaStreamType streamType , MediaFrameSourceKind sourceKind ) { await FindSource ( streamType , sourceKind ) ; await InitMediaCapture ( ) ; await SetFrameFormat ( ) ; }
Initialize the camera.
Initialize the camera .
streamType
MediaStreamType
Type of media that the media reader will be used for.
Values : VideoRecord (recommanded for accessing frame), VideoPreview, Audio, Photo.
Type of media that the media reader will be used for . Values : VideoRecord ( recommanded for accessing frame ) VideoPreview Audio Photo .
sourceKind
MediaFrameSourceKind
For cameras, specify the type of image produced.
Values : Color (recommanded), Infrared, Depth.
For cameras specify the type of image produced . Values : Color ( recommanded ) Infrared Depth .