蓝牙视频流在WiFiCameraApp蓝牙、视频、WiFiCameraApp

2023-09-05 01:29:51 作者:浅蓝色的回忆

今天,我看到很多人谁感兴趣的寻找视频的使用移动设备通过蓝牙流媒体解决方案,但我还没有发现任何方便的观点描述应该做些什么来实现这样的功能。

Today I see a lot of people who are interested in looking for solutions of video streaming over bluetooth using mobile devices, but I haven't found any convenient opinion which describes what should be done to implement such functionality.

在一方面我比较抽象的信息,对于成功的视频流这两个设备应当符合视频分发配置文件(VDP),这是一个来自蓝牙配置文件的数量。

On one hand I have rather abstract information that for successful video streaming both devices should conform Video Distribution Profile (VDP) which is one from the amount of bluetooth profiles.

在另一方面,我知道,无论是iOS的,也不Android的与VDP工作提供API。

On the other hand I know that neither iOS nor Android provide an API for working with VDP.

目前在App Store上的WiFi摄像头的应用程序,它允许流过蓝牙的视频从一台iOS设备到另一个,所以我不知道如何做到这一点的功能实现,有没有办法使用Android和iOS的API做?

There is WiFi Camera app in App Store which allows to stream video over bluetooth from one ios device to another, so I wonder how does this functionality implemented and is there any way to do the same using Android and iOS APIs?

推荐答案

VPD在于蓝牙的低层协议称为L2CAP,这是有点像UDP(在于其是conectionless从而更快的计算),并通过SDP记录广播有关设备上的服务的信息。 L2CAP / SDP是通过堆叠的BlueZ访问Android上。所有VDP,支持A2DP及其他服务住在这个水平。我做视频从Android手机通过L2CAP连接$ C $光盘VP8,这样可以分流到Windows,但也有根据制造商的限制 - 例如,HTC至少在2.1并没有允许访问蓝牙守护进程所有来电的BlueZ失败,访问限制的错误,而同样的code摩托罗拉和索尼爱立信的罚款。关于iOS的,据我已经研究过了,他们不允许有L2CAP直接互动,我想这是由于这样的事实,即操作系统可能要发布它自己的服务在L2CAP水平,如果第三方软件启动加入太多的记录出现,他们可能会开始发生冲突。因此,为iOS你最好的拍摄是RFCOMM协议,它是在堆栈中较高的,类似于TCP。基本上,它是有点2个节点,没有服务项目或任何之间的串行连接,所以你需要创建自己的协议。如果有任何其他的知识分享,我可以帮帮忙,我也可以提供从我的论文一定速度的基准上这个话题。

VPD lies in the lower protocol of Bluetooth called L2CAP, which is kinda like UDP (in the terms that it is conectionless and thus faster), and uses SDP records to broadcast the information about the services on the device. L2CAP/SDP is accessible on Android via BlueZ stack. All the VDP, A2DP and other services live at this level. I've done video streaming from Android phone to Windows via L2CAP encoded in VP8 so that is possible, but there are limitations depending on the manufacturer - e.g., HTC at least in 2.1 didn't allow access to the bluetooth daemon, all BlueZ calls failed with access restriction errors, while the same code worked fine on Motorola and Sony Ericsson. Regarding iOS, as far as I've looked into it, they do not allow direct interaction with L2CAP, i guess that is due to the fact that OS may want to publish it's own services at the L2CAP level, and if 3rd party software starts adding too much records there, they might start to conflict. So your best shot for iOS is RFCOMM protocol which is higher in the stack and is similar to TCP. Basically it is somewhat a serial connection between 2 nodes, no service entries or whatever, so you will need to create your own protocol. If there is any other knowledge to share, I can help, i can also provide some speed benchmarks from my thesis on this topic.

 
精彩推荐
图片推荐