Changeset 214924 in webkit


Ignore:
Timestamp:
Apr 4, 2017 7:50:51 PM (7 years ago)
Author:
commit-queue@webkit.org
Message:

[Mac] Add back web audio support for getUserMedia MediaStreamTrack
https://bugs.webkit.org/show_bug.cgi?id=170482

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

Source/WebCore:

´Covered by reenabled test.

Exporting method and class used in WebKit2.

  • WebCore.xcodeproj/project.pbxproj:
  • platform/audio/mac/CAAudioStreamDescription.h:
  • platform/mediastream/mac/WebAudioSourceProviderAVFObjC.h:

Source/WebKit2:

  • WebProcess/cocoa/UserMediaCaptureManager.cpp:

(WebKit::UserMediaCaptureManager::Source::setStorage):

LayoutTests:

Location:
trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r214922 r214924  
     12017-04-04  Youenn Fablet  <youenn@apple.com>
     2
     3        [Mac] Add back web audio support for getUserMedia MediaStreamTrack
     4        https://bugs.webkit.org/show_bug.cgi?id=170482
     5
     6        Reviewed by Eric Carlson.
     7
     8        * TestExpectations:
     9
    1102017-04-04  Ryan Haddad  <ryanhaddad@apple.com>
    211
  • trunk/LayoutTests/TestExpectations

    r214890 r214924  
    718718webrtc/peer-connection-remote-audio-mute2.html [ Pass Failure ]
    719719webkit.org/b/170178 webrtc/video-replace-track-to-null.html [ Pass Failure ]
    720 fast/mediastream/getUserMedia-webaudio.html [ Skip ]
    721720fast/mediastream/RTCPeerConnection-closed-state.html [ Skip ]
    722721fast/mediastream/RTCPeerConnection-iceconnectionstatechange-event.html [ Skip ]
  • trunk/Source/WebCore/ChangeLog

    r214918 r214924  
     12017-04-04  Youenn Fablet  <youenn@apple.com>
     2
     3        [Mac] Add back web audio support for getUserMedia MediaStreamTrack
     4        https://bugs.webkit.org/show_bug.cgi?id=170482
     5
     6        Reviewed by Eric Carlson.
     7
     8        ´Covered by reenabled test.
     9
     10        Exporting method and class used in WebKit2.
     11
     12        * WebCore.xcodeproj/project.pbxproj:
     13        * platform/audio/mac/CAAudioStreamDescription.h:
     14        * platform/mediastream/mac/WebAudioSourceProviderAVFObjC.h:
     15
    1162017-04-04  Alexey Proskuryakov  <ap@apple.com>
    217
  • trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj

    r214865 r214924  
    283283                07C1C0E51BFB60ED00BD2256 /* RealtimeMediaSourceSupportedConstraints.h in Headers */ = {isa = PBXBuildFile; fileRef = 07C1C0E41BFB60ED00BD2256 /* RealtimeMediaSourceSupportedConstraints.h */; settings = {ATTRIBUTES = (Private, ); }; };
    284284                07CE77D516712A6A00C55A47 /* InbandTextTrackPrivateClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 07CE77D416712A6A00C55A47 /* InbandTextTrackPrivateClient.h */; settings = {ATTRIBUTES = (Private, ); }; };
    285                 07D637401BB0B11300256CE9 /* WebAudioSourceProviderAVFObjC.h in Headers */ = {isa = PBXBuildFile; fileRef = 07D6373E1BB0B11300256CE9 /* WebAudioSourceProviderAVFObjC.h */; };
     285                07D637401BB0B11300256CE9 /* WebAudioSourceProviderAVFObjC.h in Headers */ = {isa = PBXBuildFile; fileRef = 07D6373E1BB0B11300256CE9 /* WebAudioSourceProviderAVFObjC.h */; settings = {ATTRIBUTES = (Private, ); }; };
    286286                07D637411BB0B11300256CE9 /* WebAudioSourceProviderAVFObjC.mm in Sources */ = {isa = PBXBuildFile; fileRef = 07D6373F1BB0B11300256CE9 /* WebAudioSourceProviderAVFObjC.mm */; };
    287287                07D6A4EF1BECF2D200174146 /* MockRealtimeMediaSource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07D6A4ED1BECF2D200174146 /* MockRealtimeMediaSource.cpp */; };
  • trunk/Source/WebCore/platform/audio/mac/CAAudioStreamDescription.h

    r214027 r214924  
    4444    const PlatformDescription& platformDescription() const final;
    4545
    46     PCMFormat format() const final;
     46    WEBCORE_EXPORT PCMFormat format() const final;
    4747
    4848    double sampleRate() const final { return m_streamDescription.mSampleRate; }
  • trunk/Source/WebCore/platform/mediastream/mac/WebAudioSourceProviderAVFObjC.h

    r213080 r214924  
    4545class CAAudioStreamDescription;
    4646
    47 class WebAudioSourceProviderAVFObjC : public RefCounted<WebAudioSourceProviderAVFObjC>, public AudioSourceProvider, RealtimeMediaSource::Observer {
     47class WEBCORE_EXPORT WebAudioSourceProviderAVFObjC : public RefCounted<WebAudioSourceProviderAVFObjC>, public AudioSourceProvider, RealtimeMediaSource::Observer {
    4848public:
    4949    static Ref<WebAudioSourceProviderAVFObjC> create(RealtimeMediaSource&);
  • trunk/Source/WebKit2/ChangeLog

    r214893 r214924  
     12017-04-04  Youenn Fablet  <youenn@apple.com>
     2
     3        [Mac] Add back web audio support for getUserMedia MediaStreamTrack
     4        https://bugs.webkit.org/show_bug.cgi?id=170482
     5
     6        Reviewed by Eric Carlson.
     7
     8        * WebProcess/cocoa/UserMediaCaptureManager.cpp:
     9        (WebKit::UserMediaCaptureManager::Source::setStorage):
     10
    1112017-04-04  Tim Horton  <timothy_horton@apple.com>
    212
  • trunk/Source/WebKit2/WebProcess/cocoa/UserMediaCaptureManager.cpp

    r214027 r214924  
    3939#include <WebCore/RealtimeMediaSourceCenter.h>
    4040#include <WebCore/WebAudioBufferList.h>
     41#include <WebCore/WebAudioSourceProviderAVFObjC.h>
    4142
    4243using namespace WebCore;
     
    8081    {
    8182        m_description = description;
     83        if (m_audioSourceProvider)
     84            m_audioSourceProvider->prepare(&m_description.streamDescription());
     85
    8286        if (handle.isNull()) {
    8387            m_ringBuffer.deallocate();
     
    111115    void stopProducingData() final { m_manager.stopProducingData(m_id); }
    112116
    113     AudioSourceProvider* audioSourceProvider() final { return nullptr; }
     117    AudioSourceProvider* audioSourceProvider() final {
     118        if (!m_audioSourceProvider) {
     119            m_audioSourceProvider = WebAudioSourceProviderAVFObjC::create(*this);
     120            if (m_description.format() != AudioStreamDescription::None)
     121                m_audioSourceProvider->prepare(&m_description.streamDescription());
     122        }
     123        return m_audioSourceProvider.get();
     124    }
    114125
    115126private:
     
    124135    CAAudioStreamDescription m_description;
    125136    CARingBuffer m_ringBuffer;
     137    RefPtr<WebAudioSourceProviderAVFObjC> m_audioSourceProvider;
    126138};
    127139
Note: See TracChangeset for help on using the changeset viewer.