![]() ![]() OSStatus decodeStatus = VTDecompressionSessionDecodeFrame ( decodeSession, sampleBuffer, flags, &outputPixelBuffer, &flagOut ) ĭBG ( "decode failed status=" + String ( decodeStatus) ) Call didDecompress and call back after returning. VTDecodeFrameFlags flags = 0 VTDecodeInfoFlags flagOut = 0 ![]() If (status = kCMBlockBufferNoErr & sampleBuffer) Status = CMSampleBufferCreateReady(kCFAllocatorDefault,blockBuffer,formatDescription,1, 0, NULL, 1, sampleSizeArray,&sampleBuffer) *outputPixelBuffer = CVPixelBufferRetain(pixelBuffer) Ĭonst uint8_t* parameterSetPointers = The "guts" of the decoding part looks like this (modified from a demo on GitHub) void didDecompress(void *decompressionOutputRefCon, void *sourceFrameRefCon, OSStatus status, VTDecodeInfoFlags infoFlags, CVImageBufferRef pixelBuffer, CMTime presentationTimeStamp, CMTime presentationDuration )ĬVPixelBufferRef *outputPixelBuffer = (CVPixelBufferRef *)sourceFrameRefCon One thing that I did notice is that the decode call returns with no error code but a NULL pixel buffer about 70% of the time. VIDEO TOOLKIT PROI suspect that this has something to do with temporal processing, but really don't understand H264 well enough to work it out. Create Pro Level Videos In 3 Easy Steps with Ultimate Video Toolkit: Step 1 Choose Template: You get professionally made templates for all kinds of topics. I have a similar problem when receiving from an OpenH264 encoder on a slower Windows machine. Doing the same on the Macbook (same image of test program) give 3/4 green again. VIDEO TOOLKIT SOFTWAREIf I capture the frames on the MacBook and then run exactly the same decoding software in a test program on the iMac then it decodes fine. ![]() If I scale the image down to about 1/8 of original before encoding then it works fine. On the receiver the decoded image is about 3/4 green. When the source uses video Toolbox on a 2011 iMac running MacOS High Sierra and the receiver is a MacBook pro running Big Sur. There is one use-case that doesn't work and I can't find any solution. I am trying to get an H264 streaming app working on various platforms using a combination of Apple Video Toolbox and OpenH264. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |