How do I create a tape for Windows Live Live?

I made programs for my Windows phone that displays the camera channel on the screen. I also sent / received data using the Sockets namespace. Is it possible to “combine” them to create a live video stream from a camera to which a computer on a local network can connect?

+4
source share
1 answer

Well, this is a very interesting question. In fact, as a rule, it should be possible to create a live stream, but - and this is a “difficult” moment: you have to do it yourself, so you need to take care of everything you need for a real broadcast.

In detail, this does not greatly complicate the implementation of a kind of live stream. Think what you need:

1a) Image source (usually, of course, a cam) 1b) copier view 2) Streaming-Server 3) Streaming-Client

So, if we talk about Windows Phone, you have many .NET classes available that do some work for you. For a good start, you should consider the following link: http://msdn.microsoft.com/en-us/library/ff637518%28VS.92%29.aspx

If we move on to the details, you need to complete the following tasks:

1) Get an image of your camera
2) Copy the contents of your brush / canvas ui-element to the stream
3) write the stream to a temporary file
4) upload a temporary file on the server to clients
5) go into the loop and start with 3.

In this case, the big deal is to make a copy of the video brush, so for this take a look at the msdn link for the video brush

http://msdn.microsoft.com/en-us/library/cc189009%28VS.95%29.aspx

To have a good starting point for copying the contents of a video brush into a stream, review this document

http://msdn.microsoft.com/en-us/library/bb404773.aspx#anchor_videobrush_relationship

using the multimedia element as the host for live images.

Another, better, but, of course, more complicated way is to implement your own version of the brush. Read this article to learn how to copy the preview buffer.

http://msdn.microsoft.com/en-us/library/microsoft.devices.photocamera.getpreviewbufferycbcr%28VS.92%29.aspx

So, I hope I was able to give you an idea of ​​how to implement my decision.

ps: If you can speak German, I recommend you a book: http://amzn.to/wxfEzd

I am the author of this book;)

+3
source

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


All Articles