我有以下 AVAssetWriterInputPixelBufferAdaptor:
\n\nNSMutableDictionary *attributes = [[NSMutableDictionary alloc] init];\n[attributes setObject:[NSNumber numberWithUnsignedInt:kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange] forKey:(NSString*)kCVPixelBufferPixelFormatTypeKey];\n[attributes setObject:[NSNumber numberWithUnsignedInt:frameSize.width] forKey:(NSString*)kCVPixelBufferWidthKey];\n[attributes setObject:[NSNumber numberWithUnsignedInt:frameSize.height] forKey:(NSString*)kCVPixelBufferHeightKey];\n\nadaptor = [AVAssetWriterInputPixelBufferAdaptor assetWriterInputPixelBufferAdaptorWithAssetWriterInput:writerInput sourcePixelBufferAttributes:attributes];\nRun Code Online (Sandbox Code Playgroud)\n\n我尝试使用以下命令附加从 2 个平面创建的像素缓冲区(视频格式类型 kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange):
\n\n//Pixel buffer\nCVPixelBufferRef buffer = NULL;\n\n/*Pixel options*/\nNSDictionary *options = [NSDictionary dictionaryWithObjectsAndKeys:\n [NSNumber numberWithBool:YES], kCVPixelBufferCGImageCompatibilityKey,\n [NSNumber numberWithBool:YES], kCVPixelBufferCGBitmapContextCompatibilityKey,\n nil]\n\nvoid* planesAdress[2] = { (void*)firstFrameGray, (void*)firstFrameUV};\nsize_t planesWitdh[2] = {640, 320};\nsize_t planesHeight[2] = { 480, 240};\nsize_t planesBytesPerRow[2] = { 640, 640};\n\n\nCVReturn retw = CVPixelBufferCreateWithPlanarBytes(kCFAllocatorDefault, 640, 480, kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange, nil, nil, 2,planesAdress, planesWitdh, planesHeight, planesBytesPerRow, NULL, NULL, NULL, &buffer);\n …Run Code Online (Sandbox Code Playgroud) objective-c video-processing avfoundation ios avcapturesession
我一直在尝试子类化UINavigationController类来修改背景图像,导航栏大小,后退按钮,tittle字体等内容.经过几个小时和大量的阅读后,我明白我不应该继承UINavigationController类...
我想具体设计并将该设计转移到使用我的自定义NavigationController的所有屏幕......
到目前为止,我没有为此提供任何优雅的解决方案,大多数解决方案都基于配置仅在下一个屏幕中显示的内容(下一个视图).
我怎样才能做到这一点?也许使用类别?提前致谢.
iphone objective-c uinavigationbar uinavigationcontroller ios