Ale*_*one 5 serialization objective-c avfoundation core-video ios
I have a client-server application, where the client sends processed images to the server. I would like the client to send these as CVPixelBufferRef, so the server can combine images easier. The client sends data as NSDictionary.
How do I send a core foundation/core video object over network within a NSDictionary?
CVPixelBufferRef pxbuffer = NULL;
CVReturn status = CVPixelBufferCreate(kCFAllocatorDefault,
size.width,
size.height,
kCVPixelFormatType_32ARGB,
(__bridge CFDictionaryRef) options,
&pxbuffer);
//If I try this:
NSDictionary* dataToSend = @{@"data":pxbuffer};
//Get Compiler Error: Collection element of type 'CVPixelBufferRef' (aka '__CVBuffer *') is not an Objective-C object
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
377 次 |
| 最近记录: |