I have been working on video chat application, We have developed same app for windows and android also, Now I am trying to do for IOS and communicate between those. For that I have captured raw video data through this delegate…
- (void)captureOutput:(AVCaptureOutput *)captureOutput
didOutputSampleBuffer:(CMSampleBufferRef)sampleBuffer
fromConnection:(AVCaptureConnection *)connection
now I want to use socket and transfer the raw data through network.
UIImage *temp_image = [self getUIImageFromBuffer:sampleBuffer];
NSData *data = UIImageJPEGRepresentation(temp_image, 1.0);
const void *bytes = [data bytes];
udp_obj->send_packet((char*)bytes, size, "30.0.0.104", 2030);
where udp_obj is a c++ udp class.
I have been using this bytes as raw data to transfer through UDP, Am I doing right here. Other end packets are receiving but each and every packets are looks same, I am not sure Am I going in right direction. Can anyone guide me…
thanks.
Above code worked fine. If anyone want to send raw data through UDP, you can follow this.