wpf 桌面应用程序 .net 中的视频通话

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/21880108/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-13 10:55:17  来源:igfitidea点击:

Video calling in desktop application .net

c#wpfvideo-streamingskypevideochat

提问by MegaMind

I am working on a wpf application which is suppose to have video calling feature. So I am going for Skype to provide me with the solution.

我正在开发一个 wpf 应用程序,它应该具有视频通话功能。所以我打算让 Skype 为我提供解决方案。

I am using Skype4COM library to do it. I got all the friends from Skype in my application, I can make call to my friends and even can do video call, but I cant control streaming. Video is being shown in Skype window, I want to show it inside my application like a part of my application.

我正在使用 Skype4COM 库来做到这一点。我在我的应用程序中获得了来自 Skype 的所有朋友,我可以给我的朋友打电话,甚至可以进行视频通话,但我无法控制流媒体。视频正在 Skype 窗口中显示,我想将它显示在我的应用程序中,就像我的应用程序的一部分一样。

I don't even know which control should I use to handle the video streaming.

我什至不知道应该使用哪个控件来处理视频流。

If there is another better way or free way to add video calling in a WPF application. I am ready to change my preferences.

如果有另一种更好的方式或免费方式在 WPF 应用程序中添加视频通话。我准备改变我的偏好。

I had previous plans to use Web browser control and go for WebRTC but that does not support IE and believe there is no web browser control from Mozilla and Chrome.

我之前曾计划使用 Web 浏览器控件并使用 WebRTC,但它不支持 IE,并且认为 Mozilla 和 Chrome 没有 Web 浏览器控件。

采纳答案by Saibal

Videoconferencing is not trivial to implement. You have to first look at a signalling protocol like SIP or XMPP which would provide infrastructure to maintain a list of 'friends' and whether they are online or offline. The signalling infrastructure would also let you place a call and alert you when you receive a call. And then there is the question of actually flowing video/audio between two endpoints. There is no single solution that you can plug into your app.

视频会议的实施并非易事。您必须首先查看诸如 SIP 或 XMPP 之类的信令协议,它们将提供基础设施来维护“朋友”列表以及他们是在线还是离线。信令基础设施还可以让您拨打电话并在您接到电话时提醒您。然后是在两个端点之间实际传输视频/音频的问题。没有单一的解决方案可以插入到您的应用程序中。

You can look at Google's Libjingleor ConferenceXPfor a starting point.

您可以查看 Google 的LibjingleConferenceXP作为起点。

To establish a video conference you would need the following information:

要建立视频会议,您需要以下信息:

  1. Whom can you call? This is your friends list. You would need a mechanism to add friends to your list and ensure that you can only add friends that are willing to communicate with you

  2. How do you establish a communication channel with your friends? For example what is their IP Address, can they support a particular video codec and so on.

  3. Once you have established a way to communicate with your friend, then there is the question of receiving audio and video information and displaying it with correct timing.

  1. 你可以打电话给谁?这是你的好友列表。您需要一种机制将朋友添加到您的列表中,并确保您只能添加愿意与您交流的朋友

  2. 如何与朋友建立沟通渠道?例如他们的 IP 地址是什么,他们是否支持特定的视频编解码器等等。

  3. 一旦你建立了一种与你的朋友交流的方式,那么就存在接收音频和视频信息并以正确的时间显示它的问题。

For points 1and 2you would need what is called a signalling and presence protocol. SIP and XMPP are two very popular open protocol.

对于第1点和第2点,您需要所谓的信令和在线协议。SIP 和 XMPP 是两种非常流行的开放协议。

For point [3] you would look at a protocol like RTP.

对于第 [3] 点,您将查看类似 RTP 的协议。

You can google SIP, XMPP and RTP. You would receive a wide variety of literature. Look at the RFC documents for exact information they they can be a bit arcane.

你可以谷歌 SIP、XMPP 和 RTP。你会收到各种各样的文学作品。查看 RFC 文档以获取确切信息,它们可能有点神秘。

Libjingle is a library written in C++ implements XMPP and RTP ConferenceXP is a RTP implementation in C# with some basic signalling but I think you can get a start with the examples without really getting into details.

Libjingle 是一个用 C++ 编写的库,实现了 XMPP 和 RTP ConferenceXP 是一个 C# 中的 RTP 实现,带有一些基本的信号,但我认为您可以从示例开始,而无需真正深入细节。

回答by Aby

You may or maynot be able to control that screen. If skype decides to share that level of control with you.

您可能会也可能无法控制该屏幕。如果 Skype 决定与您共享该级别的控制。

But it looks like skype4com library is on a dead end. It will stop working soon. :(

但看起来 skype4com 库已经走到了尽头。它很快就会停止工作。:(

http://gigaom.com/2013/07/13/skype-says-it-will-kill-desktop-api-by-end-of-2013/

http://gigaom.com/2013/07/13/skype-says-it-will-kill-desktop-api-by-end-of-2013/

http://aragonresearch.com/microsoft-kills-skype-desktop-apis-leaves-developers-scrambling/

http://aragonresearch.com/microsoft-kills-skype-desktop-apis-leaves-developers-scrambling/

I'd recommend you not to invest time on skype4com, but look to other solutions to get the video chat working.

我建议您不要在 skype4com 上花费时间,而是寻找其他解决方案来使视频聊天正常工作。

Please go through the following thread, as this discussess few alternative ways for video chatting.

请仔细阅读以下主题,因为它讨论了几种视频聊天的替代方法。

Developing a Video Chat Application with high quality video streaming

开发具有高质量视频流的视频聊天应用程序

Another promising thing is the Bittorent Live. But you will have to wait. It claims

另一个有前途的东西是 Bittorent Live。但你将不得不等待。它声称

BitTorrent Live is a powerful new web-based live streaming technology. Designed to eliminate barriers to broadcast, Live is an entirely new protocol, designed to deliver high quality video to large audiences - with significant reduction in infrastructure cost and network delays.

BitTorrent Live 是一种强大的新型网络直播技术。Live 旨在消除广播障碍,是一种全新的协议,旨在向大量观众提供高质量的视频 - 显着降低基础设施成本和网络延迟。

http://live.bittorrent.com/

http://live.bittorrent.com/

Its not open yet, let see :)

还没开,看看吧:)