Post

Replies

Boosts

Views

Activity

Reply to Could I bind smartpointer to xpc connection?
Thanks, I posted the screenshot since it contains the error information which might help understanding the problem. BTW, that surfaceObj was from callback block of CGDisplayStreamCreateWithDispatchQueue, and its value is not null but not sure if it is valid. auto dspref = CGDisplayStreamCreateWithDispatchQueue( displayId, captureWidth, captureHeight, '420v', opts,            dispatch_queue_create("my_display_data", DISPATCH_QUEUE_SERIAL),           ^( CGDisplayStreamFrameStatus status,  uint64_t time,  IOSurfaceRef surfaceObj,   CGDisplayStreamUpdateRef ref )           { ' Do we have any API to check if it is valid to avoid crash? Do we need release this surfaceObj after sent out the XPC message? I suppose system do the maintenance job for the callback block. Again, ARC was disabled. -Steven
Nov ’21
Reply to Could I bind smartpointer to xpc connection?
Thanks, my project disabled the ARC (not under my control) and I have to release everything by myself except smart pointer, and it is mostly using C++ instead of Objective-C. If I send dictionary with content of xpc_dictionary_set_data, will retain keep the data memory from freeing immediately after releasing the dictionary, currently I'm sending data buffer to other side, I have to make a copy of the data in receiver side to avoid recv side data copying crash (does xpc recv use the data copy or share the data reference/pointer with sender?). BTW, could I send CMSampleBufferRef via xpc_dictionary? Steven
Oct ’21
Reply to Could I bind smartpointer to xpc connection?
Great, CFRetain fixed the occasional crash issue. Thanks to Quinn :)
Replies
Boosts
Views
Activity
Nov ’21
Reply to Could I bind smartpointer to xpc connection?
Thanks, I posted the screenshot since it contains the error information which might help understanding the problem. BTW, that surfaceObj was from callback block of CGDisplayStreamCreateWithDispatchQueue, and its value is not null but not sure if it is valid. auto dspref = CGDisplayStreamCreateWithDispatchQueue( displayId, captureWidth, captureHeight, '420v', opts,            dispatch_queue_create("my_display_data", DISPATCH_QUEUE_SERIAL),           ^( CGDisplayStreamFrameStatus status,  uint64_t time,  IOSurfaceRef surfaceObj,   CGDisplayStreamUpdateRef ref )           { ' Do we have any API to check if it is valid to avoid crash? Do we need release this surfaceObj after sent out the XPC message? I suppose system do the maintenance job for the callback block. Again, ARC was disabled. -Steven
Replies
Boosts
Views
Activity
Nov ’21
Reply to Could I bind smartpointer to xpc connection?
How do I avoid  IOSurfaceCreateXPCObject crash? right now it is my headache issue.
Replies
Boosts
Views
Activity
Nov ’21
Reply to Could I bind smartpointer to xpc connection?
Never mind, I'm sending surface instead and it is working
Replies
Boosts
Views
Activity
Nov ’21
Reply to iOS client access airplay device
figured out, the multi-cast UDP
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Oct ’21
Reply to Could I bind smartpointer to xpc connection?
Thanks, my project disabled the ARC (not under my control) and I have to release everything by myself except smart pointer, and it is mostly using C++ instead of Objective-C. If I send dictionary with content of xpc_dictionary_set_data, will retain keep the data memory from freeing immediately after releasing the dictionary, currently I'm sending data buffer to other side, I have to make a copy of the data in receiver side to avoid recv side data copying crash (does xpc recv use the data copy or share the data reference/pointer with sender?). BTW, could I send CMSampleBufferRef via xpc_dictionary? Steven
Replies
Boosts
Views
Activity
Oct ’21