¡@

Home 

2014/10/15 ¤U¤È 10:07:00

iphone Programming Glossary: dispatch_queue_create

Objective-C, cancel a dispatch queue using UI event

http://stackoverflow.com/questions/10066897/objective-c-cancel-a-dispatch-queue-using-ui-event

_fixContacts YES __block BOOL cancelled NO dispatch_queue_t modifyingAddressBookQueue modifyingAddressBookQueue dispatch_queue_create sModifyingAddressBookQueueIdentifier NULL dispatch_async modifyingAddressBookQueue ^ for NSMutableDictionary contactDictionary..

UIStringDrawing methods don't seem to be thread safe in iOS 6

http://stackoverflow.com/questions/12744558/uistringdrawing-methods-dont-seem-to-be-thread-safe-in-ios-6

were thread safe from iOS 4.0. This code that does nothing of any use demonstrates the problem dispatch_queue_t queue dispatch_queue_create com.queue NULL for int i 0 i 10000 i dispatch_async queue ^ NSString string @ My string CGSize size string sizeWithFont.. self.serialDrawingQueue block dispatch_queue_t serialDrawingQueue if _serialDrawingQueue NULL _serialDrawingQueue dispatch_queue_create com.myApp.SerialDrawQueue NULL return _serialDrawingQueue ...and wrapping every draw call like this __block CGSize labelSize..

How to properly release an AVCaptureSession

http://stackoverflow.com/questions/3741121/how-to-properly-release-an-avcapturesession

output AVCaptureVideoDataOutput alloc init autorelease session addOutput output dispatch_queue_t queue dispatch_queue_create augm_reality NULL output setSampleBufferDelegate self queue queue dispatch_release queue previewLayer AVCaptureVideoPreviewLayer.. cast to original context instance ar release releases capture session if dealloc is called ... dispatch_queue_t queue dispatch_queue_create augm_reality NULL dispatch_set_context queue self dispatch_set_finalizer_f queue capture_cleanup output setSampleBufferDelegate..

iPhone SDK 4 AVFoundation - How to use captureStillImageAsynchronouslyFromConnection correctly?

http://stackoverflow.com/questions/3847140/iphone-sdk-4-avfoundation-how-to-use-capturestillimageasynchronouslyfromconnec

AVCaptureVideoDataOutput alloc init captureOutput.alwaysDiscardsLateVideoFrames YES dispatch_queue_t queue queue dispatch_queue_create cameraQueue NULL captureOutput setSampleBufferDelegate self queue queue dispatch_release queue NSString key NSString kCVPixelBufferPixelFormatTypeKey..

This code to write video+audio through AVAssetWriter and AVAssetWriterInputs is not working. Why?

http://stackoverflow.com/questions/4149963/this-code-to-write-videoaudio-through-avassetwriter-and-avassetwriterinputs-is

addOutput _audioOutput _capSession.sessionPreset AVCaptureSessionPresetLow Setup the queue dispatch_queue_t queue dispatch_queue_create MyQueue NULL _videoOutput setSampleBufferDelegate self queue queue _audioOutput setSampleBufferDelegate self queue queue..

Grand Central Dispatch (GCD) with CoreData

http://stackoverflow.com/questions/4264540/grand-central-dispatch-gcd-with-coredata

along with relevant question dispatch_queue_t main_queue dispatch_get_main_queue dispatch_queue_t request_queue dispatch_queue_create com.app.request NULL dispatch_async request_queue ^ MyNSManagedObject mObject self.fetchedResultsController objectAtIndexPath.. dispatch_sync on the main thread. dispatch_queue_t main_queue dispatch_get_main_queue dispatch_queue_t request_queue dispatch_queue_create com.app.request NULL __block __typeof__ self blockSelf self dispatch_async request_queue ^ MyNSManagedObject mObject blockSelf.fetchedResultsController..

Concurrency and serial queues in Grand Central Dispatch

http://stackoverflow.com/questions/5026043/concurrency-and-serial-queues-in-grand-central-dispatch

something I don't fully understand. Suppose I have created my own serial queue using dispatch_queue_t myQueue myQueue dispatch_queue_create myQueue NULL After that I do this dispatch_async myQueue ^ self doStuff1 and a few lines later... dispatch_sync myQueue..

AVAssetWritter does not work with audio

http://stackoverflow.com/questions/5200077/avassetwritter-does-not-work-with-audio

session addOutput output output.minFrameDuration CMTimeMake 1 30 dispatch_queue_t queue dispatch_queue_create MY QUEUE NULL output setSampleBufferDelegate self queue queue dispatch_release queue audio_output AVCaptureAudioDataOutput.. self queue queue dispatch_release queue audio_output AVCaptureAudioDataOutput alloc init retain queue dispatch_queue_create MY QUEUE NULL AudioOutputBufferDelegate special_delegate AudioOutputBufferDelegate alloc init autorelease special_delegate..

Make movie file with picture Array and song file, using AVAsset

http://stackoverflow.com/questions/6061092/make-movie-file-with-picture-array-and-song-file-using-avasset

I do this audioReader startReading videoWriter startSessionAtSourceTime kCMTimeZero dispatch_queue_t mediaInputQueue dispatch_queue_create mediaInputQueue NULL audioWriterInput requestMediaDataWhenReadyOnQueue mediaInputQueue usingBlock ^ NSLog @ Request NSLog..

GCD, Threads, Program Flow and UI Updating

http://stackoverflow.com/questions/7290931/gcd-threads-program-flow-and-ui-updating

withObject rootNode I've tried to use GCD but similar issue and can't get UI updated. dispatch_queue_t queue dispatch_queue_create com.gamesbychris.createTree 0 dispatch_sync queue ^ self createTreeFromNode rootNode Need to wait here until createTreeFromNode.. doWorkButton setEnabled NO async queue for bg work main queue for updating ui on main thread dispatch_queue_t queue dispatch_queue_create com.sample 0 dispatch_queue_t main dispatch_get_main_queue do the long running work in bg async queue within that call to..

Core Data and threads / Grand Central Dispatch

http://stackoverflow.com/questions/7540801/core-data-and-threads-grand-central-dispatch

mainThreadContextStoreCoordinator self.mainThreadContext persistentStoreCoordinator dispatch_queue_t request_queue dispatch_queue_create com.yourapp.DescriptionOfMethod NULL dispatch_async request_queue ^ Create a new managed object context Set its persistent..

Video Encoding using AVAssetWriter - CRASHES

http://stackoverflow.com/questions/8191840/video-encoding-using-avassetwriter-crashes

startWriting videoWriter startSessionAtSourceTime kCMTimeZero reader startReading dispatch_queue_t _processingQueue dispatch_queue_create assetAudioWriterQueue NULL videoWriterInput requestMediaDataWhenReadyOnQueue _processingQueue usingBlock ^ self retain while.. track audioReader startReading videoWriter startSessionAtSourceTime kCMTimeZero dispatch_queue_t mediaInputQueue dispatch_queue_create mediaInputQueue NULL audioWriterInput requestMediaDataWhenReadyOnQueue mediaInputQueue usingBlock ^ NSLog @ Request..

AVCaptureSession specify resolution and quality of captured images obj-c iphone app

http://stackoverflow.com/questions/9312832/avcapturesession-specify-resolution-and-quality-of-captured-images-obj-c-iphone

captureSession addOutput output NSLog @ connections @ output.connections Configure your output. dispatch_queue_t queue dispatch_queue_create myQueue NULL output setSampleBufferDelegate self queue queue dispatch_release queue Specify the pixel format output.videoSettings..

How can I mute the capture sound in AVFoundation?

http://stackoverflow.com/questions/9557081/how-can-i-mute-the-capture-sound-in-avfoundation

CMTimeMake 1 10 We create a serial queue to handle the processing of our frames dispatch_queue_t queue queue dispatch_queue_create cameraQueue NULL captureOutput setSampleBufferDelegate self queue queue dispatch_release queue Set the video output to store..