[MediaStream] A RealtimeMediaSource should begin producing data automatically
authoreric.carlson@apple.com <eric.carlson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 4 Nov 2015 18:55:07 +0000 (18:55 +0000)
committereric.carlson@apple.com <eric.carlson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 4 Nov 2015 18:55:07 +0000 (18:55 +0000)
commit7742d8c3b82728c6c78d7d51a96603840c2505a1
tree99ecaf2e08e71b3c5705920ebe59c99587fe38d2
parent8fa62ee0d7eef2d8e24a7a86711486cb2e31b59b
[MediaStream] A RealtimeMediaSource should begin producing data automatically
https://bugs.webkit.org/show_bug.cgi?id=150851
rdar://problem/23380636

A RealtimeMediaSource should be producing data unless it is muted, which is not under the
control of the application, so a local source should begin producing data as soon as it
is added to a stream. Remove "producing data" and "enabled" observer callbacks because
they don't provide anything that the "muted" callback already provides.

Reviewed by Jer Noble.

* Modules/mediastream/MediaStreamTrack.cpp:
(WebCore::MediaStreamTrack::trackProducingDataChanged): Deleted.
* Modules/mediastream/MediaStreamTrack.h:

* Modules/mediastream/UserMediaRequest.cpp:
(WebCore::UserMediaRequest::didCreateStream): Tell sources to begin producing data.

* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::load): Don't call stream->startProducingData,
  it isn't necessary.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::setReadyState): Call characteristicsChanged
  when the readyState changes.

* platform/mediastream/MediaStreamPrivate.cpp:
(WebCore::MediaStreamPrivate::trackProducingDataChanged): Deleted.
* platform/mediastream/MediaStreamPrivate.h:

* platform/mediastream/MediaStreamTrackPrivate.cpp:
(WebCore::MediaStreamTrackPrivate::sourceProducingDataChanged): Deleted.
(WebCore::MediaStreamTrackPrivate::sourceEnabledChanged): Deleted.
* platform/mediastream/MediaStreamTrackPrivate.h:

* platform/mediastream/RealtimeMediaSource.cpp:
(WebCore::RealtimeMediaSource::isProducingDataDidChange): Deleted.
(WebCore::RealtimeMediaSource::setEnabled): Deleted.
* platform/mediastream/RealtimeMediaSource.h:

* platform/mediastream/mac/AVAudioCaptureSource.mm:
(WebCore::AVAudioCaptureSource::captureOutputDidOutputSampleBufferFromConnection): !enabled() -> muted().

* platform/mediastream/mac/AVMediaCaptureSource.mm:
(WebCore::AVMediaCaptureSource::captureSessionIsRunningDidChange): Don't call isProducingDataDidChange..

* platform/mediastream/mac/AVVideoCaptureSource.mm:
(WebCore::AVVideoCaptureSource::processNewFrame): !enabled() -> muted().

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@192028 268f45cc-cd09-0410-ab3c-d52691b4dbfc
14 files changed:
Source/WebCore/ChangeLog
Source/WebCore/Modules/mediastream/MediaStreamTrack.cpp
Source/WebCore/Modules/mediastream/MediaStreamTrack.h
Source/WebCore/Modules/mediastream/UserMediaRequest.cpp
Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm
Source/WebCore/platform/mediastream/MediaStreamPrivate.cpp
Source/WebCore/platform/mediastream/MediaStreamPrivate.h
Source/WebCore/platform/mediastream/MediaStreamTrackPrivate.cpp
Source/WebCore/platform/mediastream/MediaStreamTrackPrivate.h
Source/WebCore/platform/mediastream/RealtimeMediaSource.cpp
Source/WebCore/platform/mediastream/RealtimeMediaSource.h
Source/WebCore/platform/mediastream/mac/AVAudioCaptureSource.mm
Source/WebCore/platform/mediastream/mac/AVMediaCaptureSource.mm
Source/WebCore/platform/mediastream/mac/AVVideoCaptureSource.mm