Objective-C客户端发送视频数据到服务器
我希望将数据从客户端 Mac 应用程序的网络摄像头发送到当前用 Java 编写的服务器应用程序(但如果有充分的理由,这可能会改变)。
我正在使用 AVFoundation 并有以下处理程序来处理来自网络摄像头的新帧:
- (void)captureOutput:(AVCaptureOutput *)captureOutput didOutputSampleBuffer:(CMSampleBufferRef)sampleBuffer fromConnection:(AVCaptureConnection *)connection {
CVPixelBufferRef pixelBuffer = CMSampleBufferGetImageBuffer(sampleBuffer);
}
我正在寻找的是如何通过我打开的套接字将此数据发送到我的服务器。这应该是实时源,所以我想我需要压缩视频,然后在服务器上解压缩。如果是这种情况,我是否应该使用特定的库来执行此操作?
我不太确定从哪里开始,希望得到一些帮助。
谢谢
I'm looking to send data from the webcam of a client Mac application to a server application currently written in Java (but this could change if there was a good reason).
I am using AVFoundation and have the following handler to handle new frames coming in from the webcam:
- (void)captureOutput:(AVCaptureOutput *)captureOutput didOutputSampleBuffer:(CMSampleBufferRef)sampleBuffer fromConnection:(AVCaptureConnection *)connection {
CVPixelBufferRef pixelBuffer = CMSampleBufferGetImageBuffer(sampleBuffer);
}
What i'm looking for is how to send this data to my server over a socket that I have open. This should be a real-time feed, so I think I will need compression of the video and then to uncompress it at the server. If this is the case, are there particular libraries I should be using to do this?
I'm not really sure where to start with this and would appreciate some help.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论