小编Dax*_*gar的帖子

将CUSTOM元数据保存在iOS中从AVFoundation拍摄的图像中

当我使用AVFoundation framework?获取图像时,如何在图像中保存自定义元数据?

我知道我可以访问属性天气我有我的图像UIImageCIImage但这些属性似乎彼此不同(即使它是相同的图像).

到目前为止,我访问这样的字典:(代码取自Caffeinated Cocoa博客)

NSLog(@"about to request a capture from: %@", [self stillImageOutput]);
    [[self stillImageOutput] captureStillImageAsynchronouslyFromConnection:videoConnection completionHandler:^(CMSampleBufferRef imageSampleBuffer, NSError *error) 
    {

NSData *jpeg = [AVCaptureStillImageOutput jpegStillImageNSDataRepresentation:imageSampleBuffer] ;

        CGImageSourceRef source = CGImageSourceCreateWithData((__bridge_retained  CFDataRef)jpeg, NULL);

        //get all the metadata in the image
        NSDictionary *metadata = (__bridge NSDictionary *) CGImageSourceCopyPropertiesAtIndex(source,0,NULL);

        //make the metadata dictionary mutable so we can add properties to it
        NSMutableDictionary *metadataAsMutable = [metadata mutableCopy];

        NSMutableDictionary *EXIFDictionary = [[metadataAsMutable objectForKey:(NSString *)kCGImagePropertyExifDictionary]mutableCopy];
        NSMutableDictionary *GPSDictionary = …
Run Code Online (Sandbox Code Playgroud)

iphone objective-c ios xcode4.2

8
推荐指数
1
解决办法
4814
查看次数

iOS屏幕共享(使用ReplayKit)在swift中使用WebRTC

我已经成功实现了ReplayKit。

SampleHandler.swift

class SampleHandler: RPBroadcastSampleHandler {

   override func broadcastStarted(withSetupInfo setupInfo: [String : NSObject]?) {

   }

  override func processSampleBuffer(_ sampleBuffer: CMSampleBuffer, with sampleBufferType:  RPSampleBufferType) {
        switch sampleBufferType {

        case RPSampleBufferType.video:
            break

        case RPSampleBufferType.audioApp:
            break

        case RPSampleBufferType.audioMic:
            break
        @unknown default:
            return
        }
    }
}
Run Code Online (Sandbox Code Playgroud)

问题 :

  1. 如何使用 WebRTC 接收器显示屏幕共享视频?
  2. 如果我想将屏幕共享视频保存在文档目录文件夹或图库中,我需要做什么?

我正在 swift 中使用适用于移动设备的 WebRTC SDK。我的 WebRTCClient 文件。

    final class WebRTCClient: NSObject {
    
    // The `RTCPeerConnectionFactory` is in charge of creating new RTCPeerConnection instances.
    // A new RTCPeerConnection should be created every new …
Run Code Online (Sandbox Code Playgroud)

video-streaming webrtc swift replaykit

4
推荐指数
1
解决办法
6266
查看次数

在模拟器中iOS6和iOS7的显示屏幕是不同的

在此输入图像描述

在此输入图像描述

我的应用程序我将给出部署目标6.1所以在7.0显示和6.1显示屏幕不同,所以如何调整6.1和7.0的大小

iphone xcode ios ios6.1 ios7

1
推荐指数
1
解决办法
1086
查看次数