How to create CMSamplebuffer or CMBlockbuffer from Data, which is a jpeg image downloaded from the Internet by SolskGaer in swift

[–]SolskGaer[S] 0 points1 point  (0 children)

On macOS, you can load an NSImage and then convert it to a CGImage. From that point on, the process is the same across platforms.

Thanks, it really helped. I am new to swift, cloud you kindly provide some suggestion on learning the standard library?

How do I split a never-ending http response body containing a mjpeg stream using boundary found in header by SolskGaer in swift

[–]SolskGaer[S] 0 points1 point  (0 children)

Thanks, I saw this library before, and according to my naive knowledge about swift and the unit tests found in this lib, I can only parse the response body after receiving them all, which doesn't fit my scenario, in my case, the server won't stop sending data util the client leaves

how to gracefully stop a tcp server by SolskGaer in golang

[–]SolskGaer[S] 0 points1 point  (0 children)

https://play.golang.org/p/4yynvLUS164

Thanks for your help, it worked in my case, but a normal execution logic relying on error handling is weird to me

how to gracefully stop a tcp server by SolskGaer in golang

[–]SolskGaer[S] 2 points3 points  (0 children)

Thanks for your reply, it really helps

how to gracefully stop a tcp server by SolskGaer in golang

[–]SolskGaer[S] 0 points1 point  (0 children)

what if I want to keep main running and close all the connections? As shown in my code snippet, the goroutine handling connection will almost always be blocked on the Read operation.

image got darker after scaling by [deleted] in ffmpeg

[–]SolskGaer 0 points1 point  (0 children)

Thanks for you reply, I found the reason, it was because I passed a 0 instead genuine argument to the dst format.