Commit Graph

2 Commits

Author SHA1 Message Date
Timur Pocheptsov
f97e1988a6 AVFMediaAssetWriter - fix potential race condition(s)
1. m_writerQueue is now shared by recorder control and asset writer
   to ensure it lives long enough.

2. m_delegate->method() calls from async block can be dangerous, since by the time
   this block is actually executed, delegate can be deleted already. This fix uses
   Q_INVOKABLE and invokeMethod with QueuedConnection instead.

3. -finishWritingWithCompletionHandler: is async and when the block finally gets
   executed, lock and 'if aborted' test are still needed.

4. Simplify the logic and reduce locking.

Change-Id: If23daf2fe22043244033427a7f6517a0fe3f23d1
Reviewed-by: Yoann Lopes <yoann.lopes@qt.io>
2016-04-21 11:32:41 +00:00
Timur Pocheptsov
1508f775ac Video asset writer for iOS
AVFoundation on iOS lacks the ability to use AVCaptureVideoDataOutput and
AVCaptureMovieFileOutput simultaneously. Right now viewfinder stops working
as soon as we add movie file output. The only workaround
we have now is to write video/audio 'maually' - creating asset writer
and feeding it with audio/video samples.

Change-Id: I33a63546783279c545f0433b5051287269825d3f
Task-number: QTBUG-37655
Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
2015-05-29 16:29:39 +00:00