当前位置:编程学习 > wap >>

iPhone 视频监控

我现在想用iphone做视频监控,控制摄像头(usb Camera,和ip Camera),现在能提取视频的关键帧并现在在UIImageView上,但是我怎么才能获取摄像头动态的视频流呢?请各位指点下,先谢过! --------------------编程问答-------------------- AVCaptureSession *captureSession = <#Get a capture session#>;
AVCaptureVideoPreviewLayer *previewLayer = [AVCaptureVideoPreviewLayer layerWithSession:captureSession];
UIView *aView = <#The view in which to present the layer#>;
previewLayer.frame = aView.bounds; // Assume you want the preview layer to fill the view.
[aView.layer addSublayer:previewLayer];
--------------------编程问答-------------------- http://developer.apple.com/library/ios/#qa/qa1702/_index.html --------------------编程问答-------------------- 视频部分参阅 UIImagePickerController,
实现一个UIImagePickerController的实例,实现里面的UIImagePickerControllerDelegate就可以了!
需要查看UIImagePickerController中是不是支持视频,检测是否有kUITypeMovie常数

通信部分请参阅 Game Kit 的 GKSession 类, GKVoiceChatService 类等

用Xcode的cocoa,实现起来很简单~~
--------------------编程问答-------------------- to cloudhsu  and ybh37:但是我怎么拿网络摄像头的数据呢?
补充:移动开发 ,  iPhone
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,