Title: [271749] trunk/Source/WebCore
- Revision
- 271749
- Author
- [email protected]
- Date
- 2021-01-22 10:11:02 -0800 (Fri, 22 Jan 2021)
Log Message
Disable verification timer in case of capture suspension
https://bugs.webkit.org/show_bug.cgi?id=220859
Reviewed by Eric Carlson.
In case of suspension/unsuspension, make it as if the capture was interrupted.
Update updateVerifyCapturingTimer to stop timer it capture is interrupted.
Remove RealtimeMediaSource::m_interrupted which is unused and potentially confusing.
Manually tested.
* platform/mediastream/RealtimeMediaSource.h:
* platform/mediastream/mac/AVVideoCaptureSource.mm:
(WebCore::AVVideoCaptureSource::updateVerifyCapturingTimer):
(WebCore::AVVideoCaptureSource::captureDeviceSuspendedDidChange):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (271748 => 271749)
--- trunk/Source/WebCore/ChangeLog 2021-01-22 17:53:23 UTC (rev 271748)
+++ trunk/Source/WebCore/ChangeLog 2021-01-22 18:11:02 UTC (rev 271749)
@@ -1,3 +1,21 @@
+2021-01-22 Youenn Fablet <[email protected]>
+
+ Disable verification timer in case of capture suspension
+ https://bugs.webkit.org/show_bug.cgi?id=220859
+
+ Reviewed by Eric Carlson.
+
+ In case of suspension/unsuspension, make it as if the capture was interrupted.
+ Update updateVerifyCapturingTimer to stop timer it capture is interrupted.
+
+ Remove RealtimeMediaSource::m_interrupted which is unused and potentially confusing.
+ Manually tested.
+
+ * platform/mediastream/RealtimeMediaSource.h:
+ * platform/mediastream/mac/AVVideoCaptureSource.mm:
+ (WebCore::AVVideoCaptureSource::updateVerifyCapturingTimer):
+ (WebCore::AVVideoCaptureSource::captureDeviceSuspendedDidChange):
+
2021-01-22 Ziran Sun <[email protected]>
[css-grid] Relayout grid items when definiteness changes.
Modified: trunk/Source/WebCore/platform/mediastream/RealtimeMediaSource.h (271748 => 271749)
--- trunk/Source/WebCore/platform/mediastream/RealtimeMediaSource.h 2021-01-22 17:53:23 UTC (rev 271748)
+++ trunk/Source/WebCore/platform/mediastream/RealtimeMediaSource.h 2021-01-22 18:11:02 UTC (rev 271749)
@@ -131,7 +131,7 @@
bool captureDidFail() const { return m_captureDidFailed; }
- virtual bool interrupted() const { return m_interrupted; }
+ virtual bool interrupted() const { return false; }
const String& name() const { return m_name; }
void setName(String&& name) { m_name = WTFMove(name); }
@@ -298,7 +298,6 @@
bool m_pendingSettingsDidChangeNotification { false };
bool m_echoCancellation { false };
bool m_isProducingData { false };
- bool m_interrupted { false };
bool m_captureDidFailed { false };
bool m_isEnded { false };
bool m_hasStartedProducingData { false };
Modified: trunk/Source/WebCore/platform/mediastream/mac/AVVideoCaptureSource.mm (271748 => 271749)
--- trunk/Source/WebCore/platform/mediastream/mac/AVVideoCaptureSource.mm 2021-01-22 17:53:23 UTC (rev 271748)
+++ trunk/Source/WebCore/platform/mediastream/mac/AVVideoCaptureSource.mm 2021-01-22 18:11:02 UTC (rev 271749)
@@ -164,7 +164,7 @@
void AVVideoCaptureSource::updateVerifyCapturingTimer()
{
- if (!m_isRunning) {
+ if (!m_isRunning || m_interrupted) {
m_verifyCapturingTimer.stop();
return;
}
@@ -570,13 +570,14 @@
void AVVideoCaptureSource::captureDeviceSuspendedDidChange()
{
#if !PLATFORM(IOS_FAMILY)
- scheduleDeferredTask([this] {
- auto isSuspended = [m_device isSuspended];
- ALWAYS_LOG_IF(loggerPtr(), LOGIDENTIFIER, !!isSuspended);
- if (isSuspended == muted())
- return;
+ scheduleDeferredTask([this, logIdentifier = LOGIDENTIFIER] {
+ m_interrupted = [m_device isSuspended];
+ ALWAYS_LOG_IF(loggerPtr(), logIdentifier, !!m_interrupted);
- notifyMutedChange(isSuspended);
+ updateVerifyCapturingTimer();
+
+ if (m_interrupted != muted())
+ notifyMutedChange(m_interrupted);
});
#endif
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes