AVFoundation and the main thread
AVFoundation and the main thread
- Subject: AVFoundation and the main thread
- From: Andreas Falkenhahn <email@hidden>
- Date: Tue, 20 Dec 2016 15:59:25 +0100
So everybody knows that all things relating to UIKit have to be done
on the main thread.
But what about AVFoundation functions which bear some resemblance to
UIKit APIs? Do these have to be called on the main thread too or can
they also be called from a worker thread?
For example, when adding an AVPlayerLayer to a view using addSubview()
I have to do this on the main thread of course.
But what about changing the frame size of an AVPlayerLayer using
setFrame()? AVPlayerLayer inherits from CALayer which is part of the
QuartzCore framework, not UIKit. But of course CALayer methods like
setFrame() bear a strong resemblance to their UIKit counterparts so
I'm wondering whether it is really allowed to call setFrame() from
a worker thread?
Also, what about AVPlayerLayer methods like removeFromSuperlayer()?
Is this main thread only as well?
--
Best regards,
Andreas Falkenhahn mailto:email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden