⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 259802 in webkit


Ignore:
Timestamp:
Apr 9, 2020, 8:24:53 AM (6 years ago)
Author:
youenn@apple.com
Message:

Source/WebKit:
[MacOS] REGRESSION (r253275): Stopping a cloned audio capture track should not stop the original audio track
https://bugs.webkit.org/show_bug.cgi?id=210259
<rdar://problem/61466486>

Reviewed by Eric Carlson.

We changed video track cloning so that each cloned track would get its own source.
The source is getting video sample from the real capture source.
The real capture source will get stopped if all its client sources are stopped.

For audio, we are still using the same audio source for each track.
We should thus not close the source until all its tracks are stopped.
To do so, we reuse RealtimeMediaSource::requestToEnd instead of directly sending
the order to stop observing the remote audio source.

Test: fast/mediastream/mediastreamtrack-audio-clone.html

  • WebProcess/cocoa/UserMediaCaptureManager.cpp:

(WebKit::UserMediaCaptureManager::Source::requestToEnd):
(WebKit::UserMediaCaptureManager::Source::stopBeingObserved): Deleted.

LayoutTests:
[MacOS] Stopping a cloned audio capture track should not stop the original audio track
https://bugs.webkit.org/show_bug.cgi?id=210259
<rdar://problem/61466486>

Reviewed by Eric Carlson.

  • fast/mediastream/mediastreamtrack-audio-clone-expected.txt: Added.
  • fast/mediastream/mediastreamtrack-audio-clone.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r259801 r259802  
     12020-04-09  Youenn Fablet  <youenn@apple.com>
     2
     3        [MacOS] Stopping a cloned audio capture track should not stop the original audio track
     4        https://bugs.webkit.org/show_bug.cgi?id=210259
     5        <rdar://problem/61466486>
     6
     7        Reviewed by Eric Carlson.
     8
     9        * fast/mediastream/mediastreamtrack-audio-clone-expected.txt: Added.
     10        * fast/mediastream/mediastreamtrack-audio-clone.html: Added.
     11
    1122020-04-09  Jason Lawrence  <lawrence.j@apple.com>
    213
  • trunk/Source/WebKit/ChangeLog

    r259799 r259802  
     12020-04-09  Youenn Fablet  <youenn@apple.com>
     2
     3        [MacOS] REGRESSION (r253275): Stopping a cloned audio capture track should not stop the original audio track
     4        https://bugs.webkit.org/show_bug.cgi?id=210259
     5        <rdar://problem/61466486>
     6
     7        Reviewed by Eric Carlson.
     8
     9        We changed video track cloning so that each cloned track would get its own source.
     10        The source is getting video sample from the real capture source.
     11        The real capture source will get stopped if all its client sources are stopped.
     12
     13        For audio, we are still using the same audio source for each track.
     14        We should thus not close the source until all its tracks are stopped.
     15        To do so, we reuse RealtimeMediaSource::requestToEnd instead of directly sending
     16        the order to stop observing the remote audio source.
     17
     18        Test: fast/mediastream/mediastreamtrack-audio-clone.html
     19
     20        * WebProcess/cocoa/UserMediaCaptureManager.cpp:
     21        (WebKit::UserMediaCaptureManager::Source::requestToEnd):
     22        (WebKit::UserMediaCaptureManager::Source::stopBeingObserved): Deleted.
     23
    1242020-04-09  Claudio Saavedra  <csaavedra@igalia.com>
    225
  • trunk/Source/WebKit/WebProcess/cocoa/UserMediaCaptureManager.cpp

    r259172 r259802  
    251251    void commitConfiguration() final { }
    252252    bool setShouldApplyRotation(bool /* shouldApplyRotation */) final;
    253 
    254 
    255253    void applyConstraints(const WebCore::MediaConstraints&, ApplyConstraintsHandler&&) final;
    256 
    257     void requestToEnd(RealtimeMediaSource::Observer&) { stopBeingObserved(); }
    258     void stopBeingObserved();
     254    void requestToEnd(Observer&) final;
     255    void stopBeingObserved() final;
    259256
    260257    RealtimeMediaSourceIdentifier m_id;
     
    505502}
    506503
     504void UserMediaCaptureManager::Source::requestToEnd(Observer& observer)
     505{
     506    switch (type()) {
     507    case Type::Audio:
     508        RealtimeMediaSource::requestToEnd(observer);
     509        break;
     510    case Type::Video:
     511        stopBeingObserved();
     512        break;
     513    case Type::None:
     514        ASSERT_NOT_REACHED();
     515    }
     516}
     517
    507518CaptureSourceOrError UserMediaCaptureManager::AudioFactory::createAudioCaptureSource(const CaptureDevice& device, String&& hashSalt, const MediaConstraints* constraints)
    508519{
Note: See TracChangeset for help on using the changeset viewer.