How to receive bytes when video is recording

房东的猫 提交于 2019-12-20 05:57:33

问题


i am developing iphone video app,in that i want to get bytes occupied in disk when user is recording the video itself .

- (void)imagePickerController:(UIImagePickerController *)picker 
didFinishPickingMediaWithInfo:(NSDictionary *)info;

this method is called after user is finished picking.is there any method


回答1:


UIImage *img = [UIImage imageNamed:@"sample.png"];
 NSData *imgData = UIImageJPEGRepresentation(img, 0); 
 NSLog(@"Size of Image(bytes):%d",[imgData length]);



回答2:


NSData *data = [info objectForKey: UIImagePickerControllerMediaMetadata];


来源:https://stackoverflow.com/questions/22127288/how-to-receive-bytes-when-video-is-recording

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!