Advertisement
Guest User

Untitled

a guest
Apr 16th, 2014
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. NSMutableDictionary *clipDetails = [NSMutableDictionary dictionary];
  2. [clipDetails setObject:[NSNumber numberWithInteger:currentStream] forKey:@"stream"];
  3. [clipDetails setObject:startTime forKey:@"clipStart"];
  4. [clipDetails setObject:duration forKey:@"duration"];
  5.  
  6. CMTime startTime = (...);
  7. NSValue *startValue = [NSValue valueWithBytes:&startTime objCType:@encode(CMTime)];
  8. [clipDetails setObject:startValue forKey:@"startTime"];
  9.  
  10. CMTime startTime;
  11. NSValue *startValue = [clipDetails objectForKey:@"startTime"];
  12. [startValue getValue:&startTime];
  13.  
  14. clipDetails[@"startTime"] = ...;
  15.  
  16. NSValue *value = clipDetails[@"startTime"];
  17.  
  18. // Without ARC
  19. CFDictionaryRef timeAsDictionary = CMTimeCopyAsDictionary(startTime, kCFAllocatorDefault);
  20. [clipDetails setObject:(NSDictionary*)timeAsDictionary forKey:@"clipStart"];
  21. CFRelease(timeAsDictionary);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement