question

MaheshCM-7927 avatar image
0 Votes"
MaheshCM-7927 asked AryaDing-MSFT commented

How to get the data buffer from Screen capture and save it separately using Windows.Graphics.Capture

Hi,

I have an application having screen capture to video functionalities which developed in uwp platform. I have to read the data buffer from the MediaStreamSource(Windows.Graphics.Capture) and save those buffer data to separate chunk files. and i have to do a parallel upload to server while recording happening. I can get the each frames from the MediaStreamSource, but i didn't see any option to get the buffer data. I have used below given documentation to implement this. Is there any way to get the buffer data and save it separate files.

https://docs.microsoft.com/en-us/windows/uwp/audio-video-camera/screen-capture-video

Please anyone help me on this.

Thanks in Advance !

windows-uwp
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@MaheshCM-7927 You could save each frame to a SoftWareBitmap object and create a new WriteableBitmap object, then you could use CopyToBuffer() method to copy the software bitmap pixel data into the PixelBuffer of WriteableBitmap. Then you could convert the buffer to the stream and use ToArray() method to get a byte array.

0 Votes 0 ·

0 Answers