Video call in C #

I want to make a similar application for Skype, and the main problem is working with video and audio. The first problem is how to get an array of video bytes (to be specific, I need to get the bytes that represent the video so that I can send them over the Internet), and the same thing with sound. The second problem is playing bytes coming from another computer. I was thinking of doing this in WPF. I am new to WPF (I practiced a bit and made several programs, including the main chat program). I do this for practice, and I want me to be able to write on my own, as much as possible, server, client, data transfer, etc ... I searched through the Internet, and only one solution seems good to me, or that better to say, use DirectShow.

Just add, I know that the camera and microphone are supported in Silverlight, and I tried this (in fact, I tried to place the HTML page with the silverlight project in the WPF project, which had web browser controls, and I've managed show the video from my webcam), but I don’t know how to get the bytes that represent the video.

Is this possible with WPF or Silverlight? I will be very grateful for the suggestion of any solution, advice or useful links.

+3
source share
6 answers

DirectShow, ( ) , . , ( ), .

:

  • , . , , ++, - Directshow #. ( : CodeProject, MSDN DirectShow graphedit)

  • Directshow . , , . (H264, MPEG, MJPEG...) (RTSP, UDP...), / , .

, , - , !

( WPF, , !)

+1

WPF Silverlight, DirectShow, . .NET, DirectShow.NET, , .

Microsoft DirectShow Filter-Graph, .

( , , DirectShow), , .

+1

, . , directshow -. , directshow ++, COM- directshow . , Vista Win 7. directshow.net , :) , directshow.net, DxWebCam, , : . .:)

0

, , DirectShow, , , - . . , DirectShow. ( ), , ( - , ), , . , .., , . , . , , , . , , . .

, DirectShow.net, SourceFourge, DirectShow Microsoft. , DirectShow ++, DirectShow.net #, VB , , " .net". DirectShow.net , DirectShow, -: - Microsoft. DirectShow.net , SourceForge open project, using DirectShowLib;. . , , - Microsoft , , DirectShow.net, , , , . , mp3 :

  class Example{
        ///....
        IGraphBuilder gb, gb1;
        IMediaControl mc, mc1;
        IVideoWindow vw;
        private void button1_Click(object sender, RoutedEventArgs e)
        {
            gb = (IGraphBuilder) new FilterGraph();
            mc = (IMediaControl)gb; 
            //mc = gb as IMediaControl;//you can use this way instead of casting
            mc.RenderFile("C:\\test.mp3");
            mc.Run();

            gb1 = (IGraphBuilder)new FilterGraph();
            mc1 = (IMediaControl)gb1;
            vw = (IVideoWindow)gb1;
            vw.SetWindowPosition(0, 0, 320, 240);
            mc1.RenderFile("C:\\test.avi");
            mc1.Run();

         }

     }

, , . , , , , DirectShow.

, .:)

0

silverlight, . , , ( , CaptureImageAsync ). 100 ( , - , - , , ). - ).

, , - jpeg ( ), 300 , , 5 , 1,5 MBytes: D imagetools, - , .

0

, ,

, , . Silverlight , 160x120 ( ), imagetools. , , , ( , ) 200 ; 5 . , , 16 , , . - , 100x100 , . , , , . , , , , (- ), . , , . , , , . , .

0
source

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


All Articles