Don't call -[AVCapture startRunning] when interruption ends
<rdar://problem/61090625>
Created attachment 395288 [details] Patch
Comment on attachment 395288 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=395288&action=review > Source/WebCore/platform/mediastream/mac/AVVideoCaptureSource.mm:623 > m_interruption = InterruptionReason::None; Maybe we could switch m_interruption to "boolean m_interrupted"? > Source/WebCore/platform/mediastream/mac/AVVideoCaptureSource.mm:698 > + if (!willChange && m_callback->loggerPtr() && m_callback->logger().willLog(m_callback->logChannel(), WTFLogLevel::Always)) { Why !willChange? I would think could write it as if (willChange) or maybe if(isChanging). Should we return early if wilChange is true?
Created attachment 395305 [details] Patch for landing
Comment on attachment 395288 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=395288&action=review >> Source/WebCore/platform/mediastream/mac/AVVideoCaptureSource.mm:623 >> m_interruption = InterruptionReason::None; > > Maybe we could switch m_interruption to "boolean m_interrupted"? Good idea, fixed. >> Source/WebCore/platform/mediastream/mac/AVVideoCaptureSource.mm:698 >> + if (!willChange && m_callback->loggerPtr() && m_callback->logger().willLog(m_callback->logChannel(), WTFLogLevel::Always)) { > > Why !willChange? > I would think could write it as if (willChange) or maybe if(isChanging). > > Should we return early if wilChange is true? Also a good idea, also fixed.
Committed r259430: <https://trac.webkit.org/changeset/259430> All reviewed patches have been landed. Closing bug and clearing flags on attachment 395305 [details].