Skip to content

Commit ce592e4

Browse files
committed
[WPE] Errors building with libwebrtc enabled
https://bugs.webkit.org/show_bug.cgi?id=294668 Reviewed by Michael Catanzaro. * Source/WebCore/platform/mediastream/libwebrtc/gstreamer/RealtimeOutgoingAudioSourceLibWebRTC.cpp: (WebCore::RealtimeOutgoingAudioSourceLibWebRTC::pullAudioData): Fix build after 296071@main. * Source/WebKit/WebProcess/Network/webrtc/LibWebRTCNetworkManager.h: Fix unused-private-field warning. * Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCProvider.cpp: (WebCore::LibWebRTCProvider::videoEncodingCapabilitiesOverride): Fix uninitialized field error. Canonical link: https://commits.webkit.org/296383@main
1 parent 23f6eb8 commit ce592e4

3 files changed

Lines changed: 5 additions & 2 deletions

File tree

Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCProvider.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -556,6 +556,7 @@ std::optional<MediaCapabilitiesEncodingInfo> LibWebRTCProvider::videoEncodingCap
556556
info.powerEfficient = info.smooth = false;
557557

558558
info.supported = true;
559+
info.configuration.type = MediaEncodingType::WebRTC;
559560
return { info };
560561
}
561562

Source/WebCore/platform/mediastream/libwebrtc/gstreamer/RealtimeOutgoingAudioSourceLibWebRTC.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,12 +112,12 @@ void RealtimeOutgoingAudioSourceLibWebRTC::pullAudioData()
112112
auto inBuffer = adoptGRef(gst_adapter_take_buffer(m_adapter.get(), inBufferSize));
113113
m_audioBuffer.grow(outBufferSize);
114114
if (isSilenced())
115-
webkitGstAudioFormatFillSilence(m_outputStreamDescription.finfo, m_audioBuffer.data(), outBufferSize);
115+
webkitGstAudioFormatFillSilence(m_outputStreamDescription.finfo, m_audioBuffer.mutableSpan().data(), outBufferSize);
116116
else {
117117
GstMappedBuffer inMap(inBuffer.get(), GST_MAP_READ);
118118

119119
gpointer in[1] = { inMap.data() };
120-
gpointer out[1] = { m_audioBuffer.data() };
120+
gpointer out[1] = { m_audioBuffer.mutableSpan().data() };
121121
if (!gst_audio_converter_samples(m_sampleConverter.get(), static_cast<GstAudioConverterFlags>(0), in, inChunkSampleCount, out, outChunkSampleCount)) {
122122
GST_ERROR("Could not convert samples.");
123123

Source/WebKit/WebProcess/Network/webrtc/LibWebRTCNetworkManager.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,9 @@ class LibWebRTCNetworkManager final : public WebCore::RTCNetworkManager, public
8585
#endif
8686
bool m_enableEnumeratingAllNetworkInterfaces { false };
8787
bool m_enableEnumeratingVisibleNetworkInterfaces { false };
88+
#if PLATFORM(COCOA)
8889
bool m_hasQueriedInterface { false };
90+
#endif
8991
HashSet<String> m_allowedInterfaces;
9092
};
9193

0 commit comments

Comments
 (0)