Changeset 269827 in webkit
- Timestamp:
- Nov 15, 2020, 7:38:57 AM (6 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 7 edited
- 2 moved
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/platform/gtk/TestExpectations (modified) (1 diff)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/Modules/webaudio/MediaStreamAudioSource.cpp (modified) (1 diff)
-
Source/WebCore/Modules/webaudio/MediaStreamAudioSource.h (modified) (1 diff)
-
Source/WebCore/Modules/webaudio/MediaStreamAudioSourceGStreamer.cpp (added)
-
Source/WebCore/platform/GStreamer.cmake (modified) (1 diff)
-
Source/WebCore/platform/audio/gstreamer/GStreamerAudioData.h (moved) (moved from trunk/Source/WebCore/platform/mediastream/gstreamer/GStreamerAudioData.h ) (4 diffs)
-
Source/WebCore/platform/audio/gstreamer/GStreamerAudioStreamDescription.h (moved) (moved from trunk/Source/WebCore/platform/mediastream/gstreamer/GStreamerAudioStreamDescription.h ) (4 diffs)
-
Source/WebCore/platform/mediastream/gstreamer/RealtimeOutgoingAudioSourceLibWebRTC.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r269820 r269827 1 2020-11-15 Philippe Normand <pnormand@igalia.com> 2 3 [GStreamer] WebAudio to MediaStream support 4 https://bugs.webkit.org/show_bug.cgi?id=218335 5 6 Reviewed by Xabier Rodriguez-Calvar. 7 8 * platform/gtk/TestExpectations: webrtc/peer-connection-createMediaStreamDestination.html is now passing. 9 1 10 2020-11-14 Rob Buis <rbuis@igalia.com> 2 11 -
trunk/LayoutTests/platform/gtk/TestExpectations
r269819 r269827 721 721 webkit.org/b/177533 webrtc/video-interruption.html 722 722 723 webkit.org/b/186933 webrtc/peer-connection-createMediaStreamDestination.html724 725 723 imported/w3c/web-platform-tests/webrtc/ [ Skip ] 726 724 http/tests/webrtc [ Skip ] -
trunk/Source/WebCore/ChangeLog
r269826 r269827 1 2020-11-15 Philippe Normand <pnormand@igalia.com> 2 3 [GStreamer] WebAudio to MediaStream support 4 https://bugs.webkit.org/show_bug.cgi?id=218335 5 6 Reviewed by Xabier Rodriguez-Calvar. 7 8 Provide audio samples coming from the WebAudio bus to the MediaStreamAudioSource node, using 9 GStreamer. This patch also moves a couple files from platform/mediastream to platform/audio, 10 because this is where the virtual parent classes are defined. 11 12 * Modules/webaudio/MediaStreamAudioSource.cpp: 13 * Modules/webaudio/MediaStreamAudioSource.h: 14 * Modules/webaudio/MediaStreamAudioSourceGStreamer.cpp: Added. 15 (WebCore::copyBusData): 16 (WebCore::MediaStreamAudioSource::consumeAudio): 17 * platform/GStreamer.cmake: 18 * platform/audio/gstreamer/GStreamerAudioData.h: Renamed from Source/WebCore/platform/mediastream/gstreamer/GStreamerAudioData.h. 19 (isType): 20 * platform/audio/gstreamer/GStreamerAudioStreamDescription.h: Renamed from Source/WebCore/platform/mediastream/gstreamer/GStreamerAudioStreamDescription.h. 21 * platform/mediastream/gstreamer/RealtimeOutgoingAudioSourceLibWebRTC.cpp: 22 (WebCore::RealtimeOutgoingAudioSourceLibWebRTC::audioSamplesAvailable): 23 (WebCore::RealtimeOutgoingAudioSourceLibWebRTC::pullAudioData): 24 1 25 2020-11-15 Zalan Bujtas <zalan@apple.com> 2 26 -
trunk/Source/WebCore/Modules/webaudio/MediaStreamAudioSource.cpp
r261626 r269827 58 58 } 59 59 60 #if !PLATFORM(COCOA) 60 #if !PLATFORM(COCOA) && !USE(GSTREAMER) 61 61 void MediaStreamAudioSource::consumeAudio(AudioBus&, size_t) 62 62 { -
trunk/Source/WebCore/Modules/webaudio/MediaStreamAudioSource.h
r261626 r269827 61 61 RealtimeMediaSourceSettings m_currentSettings; 62 62 std::unique_ptr<PlatformAudioData> m_audioBuffer; 63 #if USE(AVFOUNDATION) 63 #if USE(AVFOUNDATION) || USE(GSTREAMER) 64 64 size_t m_numberOfFrames { 0 }; 65 65 #endif -
trunk/Source/WebCore/platform/GStreamer.cmake
r267787 r269827 7 7 8 8 list(APPEND WebCore_SOURCES 9 Modules/webaudio/MediaStreamAudioSourceGStreamer.cpp 9 10 platform/graphics/gstreamer/AudioTrackPrivateGStreamer.cpp 10 11 platform/graphics/gstreamer/GLVideoSinkGStreamer.cpp -
trunk/Source/WebCore/platform/audio/gstreamer/GStreamerAudioData.h
r269826 r269827 22 22 #pragma once 23 23 24 #if ENABLE(MEDIA_STREAM) &&USE(GSTREAMER)24 #if USE(GSTREAMER) 25 25 26 26 #include "GRefPtrGStreamer.h" … … 30 30 31 31 namespace WebCore { 32 32 33 class GStreamerAudioData final : public PlatformAudioData { 33 34 public: … … 44 45 } 45 46 47 void setSample(GRefPtr<GstSample>&& sample) { m_sample = WTFMove(sample); } 46 48 GstSample* getSample() { return m_sample.get(); } 47 GstAudioInfo getAudioInfo() {return m_audioInfo; } 49 GstAudioInfo getAudioInfo() { return m_audioInfo; } 50 uint32_t channelCount() const { return GST_AUDIO_INFO_CHANNELS(&m_audioInfo); } 48 51 49 52 private: 50 53 Kind kind() const { return Kind::GStreamerAudioData; } 51 54 GRefPtr<GstSample> m_sample; 52 GRefPtr<GstCaps> m_caps;53 54 55 GstAudioInfo m_audioInfo; 55 56 }; … … 57 58 } // namespace WebCore 58 59 59 #endif // ENABLE(MEDIA_STREAM) && USE(GSTREAMER) 60 SPECIALIZE_TYPE_TRAITS_BEGIN(WebCore::GStreamerAudioData) 61 static bool isType(const WebCore::PlatformAudioData& data) { return data.kind() == WebCore::PlatformAudioData::Kind::GStreamerAudioData; } 62 SPECIALIZE_TYPE_TRAITS_END() 63 64 #endif // USE(GSTREAMER) -
trunk/Source/WebCore/platform/audio/gstreamer/GStreamerAudioStreamDescription.h
r269826 r269827 21 21 #pragma once 22 22 23 #if ENABLE(MEDIA_STREAM) &&USE(GSTREAMER)23 #if USE(GSTREAMER) 24 24 25 25 #include "AudioStreamDescription.h" … … 48 48 } 49 49 50 WEBCORE_EXPORT ~GStreamerAudioStreamDescription() { };50 ~GStreamerAudioStreamDescription() = default; 51 51 52 52 const PlatformDescription& platformDescription() const … … 57 57 } 58 58 59 WEBCORE_EXPORT PCMFormat format() const final { 59 PCMFormat format() const final 60 { 60 61 switch (GST_AUDIO_INFO_FORMAT(&m_info)) { 61 62 case GST_AUDIO_FORMAT_S16LE: … … 104 105 } // WebCore 105 106 106 #endif // ENABLE(MEDIA_STREAM) &&USE(GSTREAMER)107 #endif // USE(GSTREAMER) -
trunk/Source/WebCore/platform/mediastream/gstreamer/RealtimeOutgoingAudioSourceLibWebRTC.cpp
r264762 r269827 85 85 } 86 86 87 LockHolder locker(m_adapterMutex); 88 auto buffer = gst_sample_get_buffer(data.getSample()); 89 gst_adapter_push(m_adapter.get(), gst_buffer_ref(buffer)); 87 { 88 LockHolder locker(m_adapterMutex); 89 auto* buffer = gst_sample_get_buffer(data.getSample()); 90 gst_adapter_push(m_adapter.get(), gst_buffer_ref(buffer)); 91 } 90 92 LibWebRTCProvider::callOnWebRTCSignalingThread([protectedThis = makeRef(*this)] { 91 93 protectedThis->pullAudioData();
Note:
See TracChangeset
for help on using the changeset viewer.