Hi,
We have an iOS application used to control an underwater drone. The video feed from the drone is h264 transmitted over the RTSP protocol.
We have had the app in production for a long time, with no issues on iPhone and iPad. The app also launches and runs fine on M1 Macs. However, the video is rendered with a strange blue tint (no color, except black, white, and blue).
This happens when running our app installed from the App Store on an M1 mac, or when building on an M1 app running it directly.
I can't find any relevant warnings or errors in the app output neither.
This is the code rendering a frame:
I was not able to attach a screenshot or even link to it.
We have an iOS application used to control an underwater drone. The video feed from the drone is h264 transmitted over the RTSP protocol.
We have had the app in production for a long time, with no issues on iPhone and iPad. The app also launches and runs fine on M1 Macs. However, the video is rendered with a strange blue tint (no color, except black, white, and blue).
This happens when running our app installed from the App Store on an M1 mac, or when building on an M1 app running it directly.
I can't find any relevant warnings or errors in the app output neither.
This is the code rendering a frame:
Code Block - (void)renderFrame:(CVImageBufferRef)imageBuffer withPresentationTime:(CMTime)presentationTime { CVPixelBufferLockBaseAddress(imageBuffer, 0); size_t width = CVPixelBufferGetWidth(imageBuffer); size_t height = CVPixelBufferGetHeight(imageBuffer); size_t bytesPerRow = CVPixelBufferGetBytesPerRow(imageBuffer); void *lumaBuffer = CVPixelBufferGetBaseAddress(imageBuffer); CVPixelBufferUnlockBaseAddress(imageBuffer, 0); CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB(); size_t bitsPerComponent = 8; CGContextRef context = CGBitmapContextCreate(lumaBuffer, width, height, bitsPerComponent, bytesPerRow, colorSpace, kCGBitmapByteOrder32Little | kCGImageAlphaPremultipliedFirst ); CGImageRef image = CGBitmapContextCreateImage(context); [self.delegate decoderFrameAvailable:image withTimeStamp:presentationTime.value]; [self.diagnostics trackNewFrameDimensionsWithWidth:width andHeight:height]; CGImageRelease(image); CGContextRelease(context); CGColorSpaceRelease(colorSpace); }
I was not able to attach a screenshot or even link to it.