如何添加套接字作为 QTCaptureSession 的 QTCaptureOutputs
我正在阅读 Apple 的有关使用 QTKit 从输入源捕获流音频和视频的文档。我读到中心类 QTCaptureSession 处理输入并将其发送到每个可能的输出 (QTCaptureOutput)。该文档列出了QTCaptureOutput
的六个子类(例如QTCaptureMovieFileOutput
)。
我想创建 QTCaptureOutput
的子类来写入 NSSocket
,以便我可以将视频流发送到另一台机器。
任何想法将不胜感激。
I'm reading Apple's documentation on using QTKit to capture streaming audio and video from input sources. I read that the central class QTCaptureSession
handles the input and sends it to every possible output (QTCaptureOutput
). The documentation lists six subclasses of QTCaptureOutput
(e.g., QTCaptureMovieFileOutput
).
I would like to create a subclass of QTCaptureOutput
to write to an NSSocket
so I could send the video stream over to another machine.
Any ideas would be appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
QTCaptureOutput
并不让我觉得它是一个设计为 QTKit 之外的子类的类。相反,您可以尝试使用 QTCaptureFileOutput 对象将数据转储到文件系统中的本地域套接字,同时从该本地域套接字提取数据并将其发送到远程计算机。QTCaptureOutput
does not strike me as a class designed to be subclassed outside of QTKit. Instead, you can try dumping the data to a local domain socket in the file system using aQTCaptureFileOutput
object, and simultaneously pulling the data from that local domain socket and sending it over to the remote machine.