Live Streaming Video to WCF

I am trying to stream video from a capture device through WCF.

I am using directX.capture dll.

I tried to capture it frame by frame and send each frame to NetTcpBinding. when the binding transfer mode was included in the "Buffered" mode, he ruled out that the data should be large for reading the xml-request. and when the transfer mode was "Stream", I got a stream, but when I called Image.Save (fileName, Stream) (or anything else trying to access the stream), I get an exception "parameter is invalid." I tried to send Bitmap or Stream, the same results.

+4
source share
1 answer

You cannot save the stream directly. But you can convert the stream to an array of bytes, and then save the array of bytes.

See: Creating a byte array from a stream, how to convert a stream to an array of bytes.

0
source

Source: https://habr.com/ru/post/1386754/


All Articles