PeerConnection should respect tracks that are muted at the time they are added
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 31 May 2017 20:51:12 +0000 (20:51 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 31 May 2017 20:51:12 +0000 (20:51 +0000)
commitf9650c6c5635e936fbb73135d51436651c185b52
tree2f961e89fab47405fbc99e98cc227944c0233acd
parent56c1beb3b8bc91fb2137f7a805fdbeea3ada19a9
PeerConnection should respect tracks that are muted at the time they are added
https://bugs.webkit.org/show_bug.cgi?id=172771

Patch by Youenn Fablet <youenn@apple.com> on 2017-05-31
Reviewed by Eric Carlson.

Source/WebCore:

Tests: webrtc/peer-connection-audio-unmute.html
       webrtc/video-unmute.html

Making sure that muted/enabled state of sources are correctly handled at creation time of the outgoing webrtc sources.
This should trigger silent audio and black frames.

* platform/mediastream/mac/RealtimeOutgoingAudioSource.cpp:
(WebCore::RealtimeOutgoingAudioSource::RealtimeOutgoingAudioSource):
(WebCore::RealtimeOutgoingAudioSource::setSource):
(WebCore::RealtimeOutgoingAudioSource::initializeConverter):
* platform/mediastream/mac/RealtimeOutgoingAudioSource.h:
* platform/mediastream/mac/RealtimeOutgoingVideoSource.cpp:
(WebCore::RealtimeOutgoingVideoSource::RealtimeOutgoingVideoSource):
(WebCore::RealtimeOutgoingVideoSource::setSource):
(WebCore::RealtimeOutgoingVideoSource::sourceMutedChanged):
(WebCore::RealtimeOutgoingVideoSource::sourceEnabledChanged):
(WebCore::RealtimeOutgoingVideoSource::initializeFromSource):
(WebCore::RealtimeOutgoingVideoSource::AddOrUpdateSink):
(WebCore::RealtimeOutgoingVideoSource::RemoveSink):
(WebCore::RealtimeOutgoingVideoSource::sendBlackFramesIfNeeded):
(WebCore::RealtimeOutgoingVideoSource::setSizeFromSource): Deleted.
(WebCore::RealtimeOutgoingVideoSource::sendBlackFrames): Deleted.
* platform/mediastream/mac/RealtimeOutgoingVideoSource.h:

LayoutTests:

* webrtc/audio-replace-track.html:
* webrtc/peer-connection-audio-unmute-expected.txt: Added.
* webrtc/peer-connection-audio-unmute.html: Added.
* webrtc/routines.js:
* webrtc/video-unmute-expected.txt: Added.
* webrtc/video-unmute.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@217624 268f45cc-cd09-0410-ab3c-d52691b4dbfc
12 files changed:
LayoutTests/ChangeLog
LayoutTests/webrtc/audio-replace-track.html
LayoutTests/webrtc/peer-connection-audio-unmute-expected.txt [new file with mode: 0644]
LayoutTests/webrtc/peer-connection-audio-unmute.html [new file with mode: 0644]
LayoutTests/webrtc/routines.js
LayoutTests/webrtc/video-unmute-expected.txt [new file with mode: 0644]
LayoutTests/webrtc/video-unmute.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/platform/mediastream/mac/RealtimeOutgoingAudioSource.cpp
Source/WebCore/platform/mediastream/mac/RealtimeOutgoingAudioSource.h
Source/WebCore/platform/mediastream/mac/RealtimeOutgoingVideoSource.cpp
Source/WebCore/platform/mediastream/mac/RealtimeOutgoingVideoSource.h