opengllayer has a nasty flickering problem
The patch I'm attaching actually fixes several problems with opengllayer + VLCKit:
for opengllayer:
- generalized buffer swapping a little bit. i was experimenting with triple buffering to see if that was the cause of the flickering, but it ended up not actually being the root cause. i left it because it made the swapping a little cleaner.
- removed the block on removeVoutLayer because it would occasionally deadlock for me
- rewrite the approach to Rendering to use asynchronous layer drawing, and clean up the locking/timing issues that were actually causing the flicker (you could end up with a blank buffer because of timing problems)
- remove the old DisplayVideo method because it's no longer needed with async drawing
for VLCKit:
- added --spdif to default to support digital audio out
- the drawable previously was not being set -- opengllayer expected the drawable to be named drawable-gl, but nothing was binding that before. i actually just saw a commit this morning that looked like it might have changed that, so this particular fix may not be necessary now