Skip to content

Commit

Permalink
[GStreamer] Initial import of the GstWebRTC backend
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=236540

Patch by Philippe Normand <pnormand@igalia.com> on 2022-03-18
Reviewed by Carlos Garcia Campos and Xabier Rodriguez-Calvar.

.:

Enable GstWebRTC by default if a recent-enough (>= 1.20) version is available.

* Source/cmake/FindGStreamer.cmake:
* Source/cmake/GStreamerChecks.cmake:
* Source/cmake/GStreamerDefinitions.cmake:
* Source/cmake/GStreamerDependencies.cmake:

Source/WebCore:

Initial GstWebRTC backend. A lot of features unimplemented still, but we will incrementally
improve the layout test coverage in follow-up patches. Most notable short-comings currently:

- DataChannel support is incomplete (bug 235879)
- Network traffic not routed through Network process yet
- Stats support incomplete
- DTMF support unimplemented
- ICE restarts not supported yet
- Re-negotiation unlikely to work
- Simulcast not handled yet
- Balanced bundle not supported
- RTX and FEC un-tested, but shouldn't be hard to fix

* Modules/mediastream/MediaDevices.cpp:
* Modules/mediastream/PeerConnectionBackend.cpp:
(WebCore::PeerConnectionBackend::generateCertificate):
* Modules/mediastream/RTCPeerConnection.cpp:
(WebCore::RTCPeerConnection::create):
* Modules/mediastream/gstreamer/GStreamerDataChannelHandler.cpp: Added.
(WebCore::GStreamerDataChannelHandler::fromRTCDataChannelInit):
(WebCore::GStreamerDataChannelHandler::channelEvent):
(WebCore::GStreamerDataChannelHandler::GStreamerDataChannelHandler):
(WebCore::GStreamerDataChannelHandler::~GStreamerDataChannelHandler):
(WebCore::GStreamerDataChannelHandler::setClient):
(WebCore::GStreamerDataChannelHandler::sendStringData):
(WebCore::GStreamerDataChannelHandler::sendRawData):
(WebCore::GStreamerDataChannelHandler::close):
(WebCore::GStreamerDataChannelHandler::checkState):
(WebCore::GStreamerDataChannelHandler::readyStateChanged):
(WebCore::GStreamerDataChannelHandler::onMessageData):
(WebCore::GStreamerDataChannelHandler::onMessageString):
(WebCore::GStreamerDataChannelHandler::onError):
(WebCore::GStreamerDataChannelHandler::onBufferedAmountLow):
(WebCore::GStreamerDataChannelHandler::postTask):
* Modules/mediastream/gstreamer/GStreamerDataChannelHandler.h: Added.
* Modules/mediastream/gstreamer/GStreamerDtlsTransportBackend.cpp: Added.
(WebCore::GStreamerDtlsTransportBackend::GStreamerDtlsTransportBackend):
(WebCore::GStreamerDtlsTransportBackend::~GStreamerDtlsTransportBackend):
(WebCore::GStreamerDtlsTransportBackend::iceTransportBackend):
(WebCore::GStreamerDtlsTransportBackend::registerClient):
(WebCore::GStreamerDtlsTransportBackend::unregisterClient):
(WebCore::GStreamerDtlsTransportBackend::stateChanged):
* Modules/mediastream/gstreamer/GStreamerDtlsTransportBackend.h: Added.
* Modules/mediastream/gstreamer/GStreamerIceTransportBackend.cpp: Added.
(WebCore::GStreamerIceTransportBackend::GStreamerIceTransportBackend):
(WebCore::GStreamerIceTransportBackend::~GStreamerIceTransportBackend):
(WebCore::GStreamerIceTransportBackend::iceTransportChanged):
(WebCore::GStreamerIceTransportBackend::registerClient):
(WebCore::GStreamerIceTransportBackend::unregisterClient):
(WebCore::GStreamerIceTransportBackend::stateChanged):
(WebCore::GStreamerIceTransportBackend::gatheringStateChanged):
* Modules/mediastream/gstreamer/GStreamerIceTransportBackend.h: Added.
* Modules/mediastream/gstreamer/GStreamerMediaEndpoint.cpp: Added.
(WebCore::GStreamerMediaEndpoint::GStreamerMediaEndpoint):
(WebCore::GStreamerMediaEndpoint::initializePipeline):
(WebCore::GStreamerMediaEndpoint::~GStreamerMediaEndpoint):
(WebCore::GStreamerMediaEndpoint::teardownPipeline):
(WebCore::GStreamerMediaEndpoint::handleMessage):
(WebCore::GStreamerMediaEndpoint::disposeElementChain):
(WebCore::GStreamerMediaEndpoint::setConfiguration):
(WebCore::GStreamerMediaEndpoint::restartIce):
(WebCore::fetchDescription):
(WebCore::fetchSignalingState):
(WebCore::descriptionsFromWebRTCBin):
(WebCore::GStreamerMediaEndpoint::doSetLocalDescription):
(WebCore::GStreamerMediaEndpoint::setRemoteDescriptionSucceeded):
(WebCore::GStreamerMediaEndpoint::doSetRemoteDescription):
(WebCore::SetDescriptionCallData::SetDescriptionCallData):
(WebCore::GStreamerMediaEndpoint::setDescription):
(WebCore::GStreamerMediaEndpoint::storeRemoteMLineInfo):
(WebCore::GStreamerMediaEndpoint::configureAndLinkSource):
(WebCore::GStreamerMediaEndpoint::requestPad):
(WebCore::GStreamerMediaEndpoint::addTrack):
(WebCore::GStreamerMediaEndpoint::removeTrack):
(WebCore::GStreamerMediaEndpoint::doCreateOffer):
(WebCore::GStreamerMediaEndpoint::doCreateAnswer):
(WebCore::GStreamerMediaEndpoint::initiate):
(WebCore::GStreamerMediaEndpoint::getStats):
(WebCore::GStreamerMediaEndpoint::mediaStreamFromRTCStream):
(WebCore::GStreamerMediaEndpoint::addRemoteStream):
(WebCore::GStreamerMediaEndpoint::removeRemoteStream):
(WebCore::GStreamerMediaEndpoint::createTransceiverBackends):
(WebCore::GStreamerMediaEndpoint::addTransceiver):
(WebCore::GStreamerMediaEndpoint::createSourceForTrack):
(WebCore::GStreamerMediaEndpoint::setSenderSourceFromTrack):
(WebCore::GStreamerMediaEndpoint::transceiverBackendFromSender):
(WebCore::GStreamerMediaEndpoint::addIceCandidate):
(WebCore::GStreamerMediaEndpoint::createDataChannel):
(WebCore::GStreamerMediaEndpoint::onDataChannel):
(WebCore::GStreamerMediaEndpoint::close):
(WebCore::GStreamerMediaEndpoint::stop):
(WebCore::GStreamerMediaEndpoint::suspend):
(WebCore::GStreamerMediaEndpoint::resume):
(WebCore::GStreamerMediaEndpoint::onNegotiationNeeded):
(WebCore::GStreamerMediaEndpoint::onIceConnectionChange):
(WebCore::GStreamerMediaEndpoint::onIceGatheringChange):
(WebCore::GStreamerMediaEndpoint::onIceCandidate):
(WebCore::GStreamerMediaEndpoint::createSessionDescriptionSucceeded):
(WebCore::GStreamerMediaEndpoint::createSessionDescriptionFailed):
(WebCore::GStreamerMediaEndpoint::collectTransceivers):
(WebCore::GStreamerMediaEndpoint::gatherStatsForLogging):
(WebCore::RTCStatsLogger::RTCStatsLogger):
(WebCore::RTCStatsLogger::toJSONString const):
(WebCore::GStreamerMediaEndpoint::processStats):
(WebCore::GStreamerMediaEndpoint::onStatsDelivered):
(WebCore::GStreamerMediaEndpoint::startLoggingStats):
(WebCore::GStreamerMediaEndpoint::stopLoggingStats):
(WebCore::GStreamerMediaEndpoint::logChannel const):
(WebCore::GStreamerMediaEndpoint::statsLogInterval const):
(WebCore::GStreamerMediaEndpoint::gatherDecoderImplementationName):
(WTF::LogArgument<WebCore::RTCStatsLogger>::toString):
* Modules/mediastream/gstreamer/GStreamerMediaEndpoint.h: Added.
(WebCore::GStreamerMediaEndpoint::create):
(WebCore::GStreamerMediaEndpoint::isStopped const):
(WebCore::GStreamerMediaEndpoint::isNegotiationNeeded const):
(WebCore::GStreamerMediaEndpoint::pipeline const):
* Modules/mediastream/gstreamer/GStreamerPeerConnectionBackend.cpp: Added.
(WebCore::createGStreamerPeerConnectionBackend):
(WebCore::PeerConnectionBackend::receiverCapabilities):
(WebCore::PeerConnectionBackend::senderCapabilities):
(WebCore::GStreamerPeerConnectionBackend::GStreamerPeerConnectionBackend):
(WebCore::GStreamerPeerConnectionBackend::suspend):
(WebCore::GStreamerPeerConnectionBackend::resume):
(WebCore::GStreamerPeerConnectionBackend::restartIce):
(WebCore::GStreamerPeerConnectionBackend::setConfiguration):
(WebCore::GStreamerPeerConnectionBackend::getStats):
(WebCore::backendFromRTPSender):
(WebCore::GStreamerPeerConnectionBackend::doSetLocalDescription):
(WebCore::GStreamerPeerConnectionBackend::doSetRemoteDescription):
(WebCore::GStreamerPeerConnectionBackend::doCreateOffer):
(WebCore::GStreamerPeerConnectionBackend::doCreateAnswer):
(WebCore::GStreamerPeerConnectionBackend::close):
(WebCore::GStreamerPeerConnectionBackend::doStop):
(WebCore::GStreamerPeerConnectionBackend::doAddIceCandidate):
(WebCore::GStreamerPeerConnectionBackend::createReceiver):
(WebCore::GStreamerPeerConnectionBackend::createDataChannelHandler):
(WebCore::findExistingSender):
(WebCore::GStreamerPeerConnectionBackend::addTrack):
(WebCore::GStreamerPeerConnectionBackend::addTransceiverFromTrackOrKind):
(WebCore::GStreamerPeerConnectionBackend::addTransceiver):
(WebCore::GStreamerPeerConnectionBackend::setSenderSourceFromTrack):
(WebCore::backendFromRTPTransceiver):
(WebCore::GStreamerPeerConnectionBackend::existingTransceiver):
(WebCore::GStreamerPeerConnectionBackend::newRemoteTransceiver):
(WebCore::GStreamerPeerConnectionBackend::collectTransceivers):
(WebCore::GStreamerPeerConnectionBackend::removeTrack):
(WebCore::GStreamerPeerConnectionBackend::applyRotationForOutgoingVideoSources):
(WebCore::GStreamerPeerConnectionBackend::gatherDecoderImplementationName):
(WebCore::GStreamerPeerConnectionBackend::isNegotiationNeeded const):
* Modules/mediastream/gstreamer/GStreamerPeerConnectionBackend.h: Added.
* Modules/mediastream/gstreamer/GStreamerRtpReceiverBackend.cpp: Added.
(WebCore::GStreamerRtpReceiverBackend::getParameters):
(WebCore::GStreamerRtpReceiverBackend::getContributingSources const):
(WebCore::GStreamerRtpReceiverBackend::getSynchronizationSources const):
(WebCore::GStreamerRtpReceiverBackend::createSource):
(WebCore::GStreamerRtpReceiverBackend::rtcRtpTransformBackend):
(WebCore::GStreamerRtpReceiverBackend::dtlsTransportBackend):
* Modules/mediastream/gstreamer/GStreamerRtpReceiverBackend.h: Added.
* Modules/mediastream/gstreamer/GStreamerRtpReceiverTransformBackend.cpp: Added.
(WebCore::mediaTypeFromReceiver):
(WebCore::GStreamerRtpReceiverTransformBackend::GStreamerRtpReceiverTransformBackend):
(WebCore::GStreamerRtpReceiverTransformBackend::~GStreamerRtpReceiverTransformBackend):
(WebCore::GStreamerRtpReceiverTransformBackend::setTransformableFrameCallback):
(WebCore::GStreamerRtpReceiverTransformBackend::requestKeyFrame):
* Modules/mediastream/gstreamer/GStreamerRtpReceiverTransformBackend.h: Added.
* Modules/mediastream/gstreamer/GStreamerRtpSenderBackend.cpp: Added.
(WebCore::updateTrackSource):
(WebCore::GStreamerRtpSenderBackend::startSource):
(WebCore::GStreamerRtpSenderBackend::stopSource):
(WebCore::GStreamerRtpSenderBackend::replaceTrack):
(WebCore::GStreamerRtpSenderBackend::getParameters const):
(WebCore::GStreamerRtpSenderBackend::setParameters):
(WebCore::GStreamerRtpSenderBackend::createDTMFBackend):
(WebCore::GStreamerRtpSenderBackend::rtcRtpTransformBackend):
(WebCore::GStreamerRtpSenderBackend::setMediaStreamIds):
(WebCore::GStreamerRtpSenderBackend::dtlsTransportBackend):
* Modules/mediastream/gstreamer/GStreamerRtpSenderBackend.h: Added.
* Modules/mediastream/gstreamer/GStreamerRtpSenderTransformBackend.cpp: Added.
(WebCore::mediaTypeFromSender):
(WebCore::GStreamerRtpSenderTransformBackend::GStreamerRtpSenderTransformBackend):
(WebCore::GStreamerRtpSenderTransformBackend::~GStreamerRtpSenderTransformBackend):
(WebCore::GStreamerRtpSenderTransformBackend::setTransformableFrameCallback):
(WebCore::GStreamerRtpSenderTransformBackend::requestKeyFrame):
* Modules/mediastream/gstreamer/GStreamerRtpSenderTransformBackend.h: Added.
* Modules/mediastream/gstreamer/GStreamerRtpTransceiverBackend.cpp: Added.
(WebCore::GStreamerRtpTransceiverBackend::GStreamerRtpTransceiverBackend):
(WebCore::GStreamerRtpTransceiverBackend::createReceiverBackend):
(WebCore::GStreamerRtpTransceiverBackend::createSenderBackend):
(WebCore::GStreamerRtpTransceiverBackend::direction const):
(WebCore::GStreamerRtpTransceiverBackend::currentDirection const):
(WebCore::GStreamerRtpTransceiverBackend::setDirection):
(WebCore::GStreamerRtpTransceiverBackend::mid):
(WebCore::GStreamerRtpTransceiverBackend::stop):
(WebCore::GStreamerRtpTransceiverBackend::stopped const):
(WebCore::GStreamerRtpTransceiverBackend::setCodecPreferences):
* Modules/mediastream/gstreamer/GStreamerRtpTransceiverBackend.h: Added.
* Modules/mediastream/gstreamer/GStreamerRtpTransformBackend.cpp: Added.
(WebCore::GStreamerRtpTransformBackend::setInputCallback):
(WebCore::GStreamerRtpTransformBackend::clearTransformableFrameCallback):
(WebCore::GStreamerRtpTransformBackend::processTransformedFrame):
* Modules/mediastream/gstreamer/GStreamerRtpTransformBackend.h: Added.
(WebCore::GStreamerRtpTransformBackend::GStreamerRtpTransformBackend):
* Modules/mediastream/gstreamer/GStreamerSctpTransportBackend.cpp: Added.
(WebCore::toRTCSctpTransportState):
(WebCore::GStreamerSctpTransportBackend::GStreamerSctpTransportBackend):
(WebCore::GStreamerSctpTransportBackend::~GStreamerSctpTransportBackend):
(WebCore::GStreamerSctpTransportBackend::dtlsTransportBackend):
(WebCore::GStreamerSctpTransportBackend::registerClient):
(WebCore::GStreamerSctpTransportBackend::unregisterClient):
(WebCore::GStreamerSctpTransportBackend::stateChanged):
* Modules/mediastream/gstreamer/GStreamerSctpTransportBackend.h: Added.
* Modules/mediastream/gstreamer/GStreamerStatsCollector.cpp: Added.
(WebCore::fillRTCStats):
(WebCore::fillRTCRTPStreamStats):
(WebCore::fillRTCCodecStats):
(WebCore::fillInboundRTPStreamStats):
(WebCore::fillOutboundRTPStreamStats):
(WebCore::fillRTCPeerConnectionStats):
(WebCore::fillRTCTransportStats):
(WebCore::fillReportCallback):
(WebCore::CallbackHolder::CallbackHolder):
(WebCore::GStreamerStatsCollector::getStats):
* Modules/mediastream/gstreamer/GStreamerStatsCollector.h: Added.
(WebCore::GStreamerStatsCollector::create):
(WebCore::GStreamerStatsCollector::setElement):
* Modules/mediastream/gstreamer/GStreamerWebRTCUtils.cpp: Added.
(WebCore::toRTCIceComponent):
(WebCore::toRTCIceProtocol):
(WebCore::toRTCIceTcpCandidateType):
(WebCore::toRTCIceCandidateType):
(WebCore::toRTCError):
(WebCore::toWebRTCBitRatePriority):
(WebCore::fromRTCEncodingParameters):
(WebCore::fromWebRTCBitRatePriority):
(WebCore::toRTCEncodingParameters):
(WebCore::toRTCRtpSendParameters):
(WebCore::ensureDebugCategoryInitialized):
(WebCore::parseIceCandidateSDP):
(WebCore::x509Serialize):
(WebCore::privateKeySerialize):
(WebCore::generateCertificate):
(WebCore::sdpMediaHasAttributeKey):
* Modules/mediastream/gstreamer/GStreamerWebRTCUtils.h: Added.
(WebCore::toRTCRtpTransceiverDirection):
(WebCore::fromRTCRtpTransceiverDirection):
(WebCore::toSessionDescriptionType):
(WebCore::fromSessionDescriptionType):
(WebCore::toSignalingState):
(WebCore::toRTCIceConnectionState):
(WebCore::toRTCDtlsTransportState):
(WebCore::toRTCIceTransportState):
(WebCore::toRTCIceGatheringState):
(WebCore::bundlePolicyFromConfiguration):
(WebCore::iceTransportPolicyFromConfiguration):
(WebCore::toRTCErrorDetailType):
* platform/GStreamer.cmake:
* platform/audio/gstreamer/AudioSourceProviderGStreamer.cpp:
(WebCore::AudioSourceProviderGStreamer::AudioSourceProviderGStreamer):
(WebCore::AudioSourceProviderGStreamer::~AudioSourceProviderGStreamer):
(WebCore::AudioSourceProviderGStreamer::handleNewDeinterleavePad):
* platform/audio/gstreamer/GStreamerAudioStreamDescription.h:
* platform/graphics/gstreamer/GRefPtrGStreamer.cpp:
(WTF::adoptGRef):
(WTF::refGPtr<GstWebRTCRTPReceiver>):
(WTF::derefGPtr<GstWebRTCRTPReceiver>):
(WTF::refGPtr<GstWebRTCRTPSender>):
(WTF::derefGPtr<GstWebRTCRTPSender>):
(WTF::refGPtr<GstWebRTCRTPTransceiver>):
(WTF::derefGPtr<GstWebRTCRTPTransceiver>):
(WTF::refGPtr<GstWebRTCDataChannel>):
(WTF::derefGPtr<GstWebRTCDataChannel>):
(WTF::refGPtr<GstWebRTCDTLSTransport>):
(WTF::derefGPtr<GstWebRTCDTLSTransport>):
(WTF::refGPtr<GstWebRTCICETransport>):
(WTF::derefGPtr<GstWebRTCICETransport>):
* platform/graphics/gstreamer/GRefPtrGStreamer.h:
* platform/graphics/gstreamer/GStreamerCommon.cpp:
(WebCore::capsMediaType):
* platform/graphics/gstreamer/GUniquePtrGStreamer.h:
* platform/mediastream/MediaStreamTrackPrivate.cpp:
(WebCore::MediaStreamTrackPrivate::createAudioSourceProvider):
* platform/mediastream/gstreamer/GStreamerAudioCapturer.cpp:
(WebCore::GStreamerAudioCapturer::GStreamerAudioCapturer):
(WebCore::GStreamerAudioCapturer::createConverter):
* platform/mediastream/gstreamer/GStreamerCapturer.cpp:
(WebCore::GStreamerCapturer::createSource):
* platform/mediastream/gstreamer/GStreamerDTMFSenderBackend.cpp: Added.
(WebCore::GStreamerDTMFSenderBackend::GStreamerDTMFSenderBackend):
(WebCore::GStreamerDTMFSenderBackend::~GStreamerDTMFSenderBackend):
(WebCore::GStreamerDTMFSenderBackend::canInsertDTMF):
(WebCore::GStreamerDTMFSenderBackend::playTone):
(WebCore::GStreamerDTMFSenderBackend::tones const):
(WebCore::GStreamerDTMFSenderBackend::duration const):
(WebCore::GStreamerDTMFSenderBackend::interToneGap const):
(WebCore::GStreamerDTMFSenderBackend::onTonePlayed):
* platform/mediastream/gstreamer/GStreamerDTMFSenderBackend.h: Added.
* platform/mediastream/gstreamer/GStreamerMediaStreamSource.cpp:
(webkitMediaStreamSrcAddTrack):
* platform/mediastream/gstreamer/GStreamerVideoEncoder.cpp:
(webkit_webrtc_video_encoder_class_init):
* platform/mediastream/gstreamer/RealtimeIncomingAudioSourceGStreamer.cpp: Added.
(WebCore::RealtimeIncomingAudioSourceGStreamer::RealtimeIncomingAudioSourceGStreamer):
(WebCore::RealtimeIncomingAudioSourceGStreamer::~RealtimeIncomingAudioSourceGStreamer):
(WebCore::RealtimeIncomingAudioSourceGStreamer::startProducingData):
(WebCore::RealtimeIncomingAudioSourceGStreamer::stopProducingData):
(WebCore::RealtimeIncomingAudioSourceGStreamer::capabilities):
(WebCore::RealtimeIncomingAudioSourceGStreamer::settings):
(WebCore::RealtimeIncomingAudioSourceGStreamer::dispatchSample):
* platform/mediastream/gstreamer/RealtimeIncomingAudioSourceGStreamer.h: Added.
(WebCore::RealtimeIncomingAudioSourceGStreamer::create):
(isType):
* platform/mediastream/gstreamer/RealtimeIncomingSourceGStreamer.cpp: Added.
(WebCore::RealtimeIncomingSourceGStreamer::RealtimeIncomingSourceGStreamer):
(WebCore::RealtimeIncomingSourceGStreamer::lockValve const):
(WebCore::RealtimeIncomingSourceGStreamer::releaseValve const):
(WebCore::RealtimeIncomingSourceGStreamer::registerClient):
* platform/mediastream/gstreamer/RealtimeIncomingSourceGStreamer.h: Added.
(WebCore::RealtimeIncomingSourceGStreamer::bin):
(WebCore::RealtimeIncomingSourceGStreamer::dispatchSample):
* platform/mediastream/gstreamer/RealtimeIncomingVideoSourceGStreamer.cpp: Added.
(WebCore::RealtimeIncomingVideoSourceGStreamer::RealtimeIncomingVideoSourceGStreamer):
(WebCore::RealtimeIncomingVideoSourceGStreamer::startProducingData):
(WebCore::RealtimeIncomingVideoSourceGStreamer::stopProducingData):
(WebCore::RealtimeIncomingVideoSourceGStreamer::capabilities):
(WebCore::RealtimeIncomingVideoSourceGStreamer::settings):
(WebCore::RealtimeIncomingVideoSourceGStreamer::settingsDidChange):
(WebCore::RealtimeIncomingVideoSourceGStreamer::dispatchSample):
* platform/mediastream/gstreamer/RealtimeIncomingVideoSourceGStreamer.h: Added.
(WebCore::RealtimeIncomingVideoSourceGStreamer::create):
(isType):
* platform/mediastream/gstreamer/RealtimeOutgoingAudioSourceGStreamer.cpp: Added.
(WebCore::RealtimeOutgoingAudioSourceGStreamer::RealtimeOutgoingAudioSourceGStreamer):
(WebCore::RealtimeOutgoingAudioSourceGStreamer::setPayloadType):
* platform/mediastream/gstreamer/RealtimeOutgoingAudioSourceGStreamer.h: Added.
* platform/mediastream/gstreamer/RealtimeOutgoingMediaSourceGStreamer.cpp: Added.
(WebCore::RealtimeOutgoingMediaSourceGStreamer::RealtimeOutgoingMediaSourceGStreamer):
(WebCore::RealtimeOutgoingMediaSourceGStreamer::~RealtimeOutgoingMediaSourceGStreamer):
(WebCore::RealtimeOutgoingMediaSourceGStreamer::setSource):
(WebCore::RealtimeOutgoingMediaSourceGStreamer::start):
(WebCore::RealtimeOutgoingMediaSourceGStreamer::stop):
(WebCore::RealtimeOutgoingMediaSourceGStreamer::sourceMutedChanged):
(WebCore::RealtimeOutgoingMediaSourceGStreamer::sourceEnabledChanged):
(WebCore::RealtimeOutgoingMediaSourceGStreamer::initializeFromTrack):
(WebCore::RealtimeOutgoingMediaSourceGStreamer::link):
(WebCore::RealtimeOutgoingMediaSourceGStreamer::setSinkPad):
* platform/mediastream/gstreamer/RealtimeOutgoingMediaSourceGStreamer.h: Added.
(WebCore::RealtimeOutgoingMediaSourceGStreamer::source const):
(WebCore::RealtimeOutgoingMediaSourceGStreamer::allowedCaps const):
(WebCore::RealtimeOutgoingMediaSourceGStreamer::pad const):
(WebCore::RealtimeOutgoingMediaSourceGStreamer::sender const):
(WebCore::RealtimeOutgoingMediaSourceGStreamer::bin const):
(WebCore::RealtimeOutgoingMediaSourceGStreamer::setPayloadType):
* platform/mediastream/gstreamer/RealtimeOutgoingVideoSourceGStreamer.cpp: Added.
(WebCore::RealtimeOutgoingVideoSourceGStreamer::RealtimeOutgoingVideoSourceGStreamer):
(WebCore::RealtimeOutgoingVideoSourceGStreamer::setPayloadType):
* platform/mediastream/gstreamer/RealtimeOutgoingVideoSourceGStreamer.h: Added.
* testing/Internals.cpp:
(WebCore::Internals::resetToConsistentState):
(WebCore::Internals::setWebRTCH265Support):
(WebCore::Internals::setWebRTCVP9Support):
(WebCore::Internals::setWebRTCVP9VTBSupport):
(WebCore::Internals::setEnableWebRTCEncryption):
(WebCore::Internals::setUseDTLS10):

Source/WTF:

* Scripts/Preferences/WebPreferences.yaml: Unconditionally enable WebRTC when GstWebRTC is
enabled. We don't have a runtime Provider yet.
* Scripts/Preferences/WebPreferencesExperimental.yaml: Disable encoded transforms unless libwebrtc is enabled.
* wtf/glib/GRefPtr.cpp: Add GArray handling.
(WTF::refGPtr):
(WTF::derefGPtr):
* wtf/glib/GRefPtr.h:

Tools:

* flatpak/flatpakutils.py:
(WebkitFlatpak.run_in_sandbox): Allow libnice debug log environment variable in runtime sandbox.

LayoutTests:

* platform/glib/TestExpectations: Flag most WebRTC as failing. During this first development
cycle I focused mostly on fixing crashes and only fixed a few failures. The remaining ones
will be adressed in follow-up patches.
* platform/glib/fast/mediastream/RTCPeerConnection-localDescription-expected.txt: Added.
* platform/glib/fast/mediastream/RTCPeerConnection-remoteDescription-expected.txt: Added.
* platform/glib/fast/mediastream/RTCPeerConnection-setRemoteDescription-offer-expected.txt: Added.
* platform/glib/fast/mediastream/RTCPeerConnection-stable-expected.txt: Added.


Canonical link: https://commits.webkit.org/248597@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@291483 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
philn authored and webkit-commit-queue committed Mar 18, 2022
1 parent c7a028f commit a530847
Show file tree
Hide file tree
Showing 82 changed files with 7,086 additions and 75 deletions.
14 changes: 14 additions & 0 deletions ChangeLog
@@ -1,3 +1,17 @@
2022-03-18 Philippe Normand <pnormand@igalia.com>

[GStreamer] Initial import of the GstWebRTC backend
https://bugs.webkit.org/show_bug.cgi?id=236540

Reviewed by Carlos Garcia Campos and Xabier Rodriguez-Calvar.

Enable GstWebRTC by default if a recent-enough (>= 1.20) version is available.

* Source/cmake/FindGStreamer.cmake:
* Source/cmake/GStreamerChecks.cmake:
* Source/cmake/GStreamerDefinitions.cmake:
* Source/cmake/GStreamerDependencies.cmake:

2022-03-18 Carlos Garcia Campos <cgarcia@igalia.com>

Add a public build option for PDF.js
Expand Down
15 changes: 15 additions & 0 deletions LayoutTests/ChangeLog
@@ -1,3 +1,18 @@
2022-03-18 Philippe Normand <pnormand@igalia.com>

[GStreamer] Initial import of the GstWebRTC backend
https://bugs.webkit.org/show_bug.cgi?id=236540

Reviewed by Carlos Garcia Campos and Xabier Rodriguez-Calvar.

* platform/glib/TestExpectations: Flag most WebRTC as failing. During this first development
cycle I focused mostly on fixing crashes and only fixed a few failures. The remaining ones
will be adressed in follow-up patches.
* platform/glib/fast/mediastream/RTCPeerConnection-localDescription-expected.txt: Added.
* platform/glib/fast/mediastream/RTCPeerConnection-remoteDescription-expected.txt: Added.
* platform/glib/fast/mediastream/RTCPeerConnection-setRemoteDescription-offer-expected.txt: Added.
* platform/glib/fast/mediastream/RTCPeerConnection-stable-expected.txt: Added.

2022-03-18 Kimmo Kinnunen <kkinnunen@apple.com>

Recycling a webgl context when it has been lost and restored causes a crash
Expand Down
114 changes: 91 additions & 23 deletions LayoutTests/platform/glib/TestExpectations
Expand Up @@ -864,7 +864,6 @@ webkit.org/b/229973 media/track/in-band/track-in-band-srt-mkv-cues-added-once.ht

webkit.org/b/230028 media/media-source/media-source-seek-twice.html [ Pass Timeout ]

webkit.org/b/231811 fast/mediastream/MediaStream-video-element-enter-background.html [ Failure ]
webkit.org/b/231811 media/audio-background-playback-playlist.html [ Failure ]
webkit.org/b/231811 media/media-session/actionHandlerInternalMappings.html [ Failure ]
webkit.org/b/231811 media/media-session/default-actionHandlers.html [ Failure ]
Expand All @@ -873,7 +872,6 @@ webkit.org/b/231811 media/video-concurrent-playback.html [ Failure ]
webkit.org/b/231811 media/video-interruption-with-resume-not-allowing-play.html [ Failure ]
webkit.org/b/231811 media/video-multiple-concurrent-playback.html [ Failure ]
webkit.org/b/231811 media/webaudio-background-playback.html [ Failure ]
webkit.org/b/231811 webrtc/concurrentVideoPlayback2.html [ Failure ]
webkit.org/b/231811 media/media-session/callActionHandler.html [ Timeout ]
webkit.org/b/231811 media/media-session/play-after-seek.html [ Timeout ]
webkit.org/b/231811 media/remote-control-command-is-user-gesture.html [ Timeout ]
Expand All @@ -886,10 +884,10 @@ webkit.org/b/231811 media/video-system-sleep.html [ Timeout ]
webkit.org/b/231811 webaudio/audiocontext-state-interrupted.html [ Timeout ]
webkit.org/b/231811 webaudio/suspend-context-while-interrupted.html [ Timeout ]

# rvfc related failures
imported/w3c/web-platform-tests/video-rvfc [ Pass ]
fast/mediastream/getUserMedia-rvfc.html [ Pass Failure ]
webrtc/peerConnection-rvfc.html [ Failure ]
webrtc/canvas-to-peer-connection.html [ Failure ]
imported/w3c/web-platform-tests/video-rvfc/request-video-frame-callback-webrtc.https.html [ Skip ]
imported/w3c/web-platform-tests/video-rvfc/request-video-frame-callback-before-xr-session.https.html [ Skip ]
imported/w3c/web-platform-tests/video-rvfc/request-video-frame-callback-during-xr-session.https.html [ Skip ]
Expand All @@ -907,10 +905,89 @@ webkit.org/b/234084 media/track/audio-track-configuration.html [ Failure ]
# bitrate estimation.
webkit.org/b/234084 media/track/video-track-configuration.html [ Failure ]

webkit.org/b/237872 webrtc/vp8-then-h264.html [ Crash ]

webkit.org/b/237901 media/media-source/media-source-interruption-with-resume-allowing-play.html [ Slow ]

# DataChannel GstWebRTC implementation incomplete
webkit.org/b/235885 webrtc/datachannel [ Skip ]
webkit.org/b/235885 http/wpt/webrtc/transfer-datachannel-service-worker.https.html [ Skip ]
webkit.org/b/235885 fast/mediastream/RTCPeerConnection-statsSelector.html [ Skip ]
webkit.org/b/235885 fast/mediastream/RTCPeerConnection-datachannel.html [ Skip ]

# The GstWebRTC backend doesn't support transforms yet.
webkit.org/b/235885 http/wpt/webrtc/audiovideo-script-transform.html [ Skip ]
webkit.org/b/235885 http/wpt/webrtc/video-script-transform-keyframe-only.html [ Skip ]
webkit.org/b/235885 http/wpt/webrtc/video-script-transform.html [ Skip ]
webkit.org/b/235885 imported/w3c/web-platform-tests/webrtc-encoded-transform/script-audio-transform.https.html [ Skip ]
webkit.org/b/235885 imported/w3c/web-platform-tests/webrtc-encoded-transform/script-change-transform.https.html [ Skip ]
webkit.org/b/235885 imported/w3c/web-platform-tests/webrtc-encoded-transform/script-metadata-transform.https.html [ Skip ]
webkit.org/b/235885 imported/w3c/web-platform-tests/webrtc-encoded-transform/script-transform.https.html [ Skip ]
webkit.org/b/235885 imported/w3c/web-platform-tests/webrtc-encoded-transform/script-write-twice-transform.https.html [ Skip ]

# The generated SDP offer currently does not reflect the codec-preferences set
# on transceivers. Instead the negotiated outgoing media source caps are used
# and our current implementation of outgoing source doesn't support multiple
# payload types.
webkit.org/b/235885 webrtc/audio-peer-connection-g722.html [ Failure ]

webkit.org/b/235885 fast/mediastream/RTCPeerConnection-addIceCandidate.html [ Failure ]
webkit.org/b/235885 fast/mediastream/RTCPeerConnection-addTrack-reuse-sender.html [ Failure ]
webkit.org/b/235885 fast/mediastream/RTCPeerConnection-have-local-offer.html [ Crash ]
webkit.org/b/235885 fast/mediastream/RTCPeerConnection-have-local-pranswer.html [ Crash ]
webkit.org/b/235885 fast/mediastream/RTCPeerConnection-have-remote-offer.html [ Failure ]
webkit.org/b/235885 fast/mediastream/RTCPeerConnection-have-remote-pranswer.html [ Crash ]
webkit.org/b/235885 fast/mediastream/RTCPeerConnection-icecandidate-event.html [ Failure ]
webkit.org/b/235885 fast/mediastream/RTCPeerConnection-inspect-answer.html [ Failure ]
webkit.org/b/235885 fast/mediastream/RTCPeerConnection-inspect-offer.html [ Failure ]
webkit.org/b/235885 fast/mediastream/RTCPeerConnection-media-setup-callbacks-single-dialog.html [ Failure ]
webkit.org/b/235885 fast/mediastream/RTCPeerConnection-media-setup-two-dialogs.html [ Crash ]
webkit.org/b/235885 fast/mediastream/RTCPeerConnection-onnegotiationneeded.html [ Pass Timeout ]
webkit.org/b/235885 fast/mediastream/RTCPeerConnection-page-cache.html [ Crash ]
webkit.org/b/235885 fast/mediastream/RTCPeerConnection-remotely-assigned-transceiver-mid.html [ Pass Failure Timeout ]
webkit.org/b/235885 fast/mediastream/RTCPeerConnection-setLocalDescription-offer.html [ Failure ]
webkit.org/b/235885 fast/mediastream/RTCPeerConnection-setRemoteDescription-offer.html [ Crash ]
webkit.org/b/235885 http/wpt/webrtc/third-party-frame-ice-candidate-filtering.html [ Failure ]
webkit.org/b/235885 imported/w3c/web-platform-tests/webrtc-extensions/RTCRtpParameters-maxFramerate.html [ Failure ]
webkit.org/b/235885 imported/w3c/web-platform-tests/webrtc-extensions/RTCRtpSynchronizationSource-captureTimestamp.html [ Failure ]
webkit.org/b/235885 imported/w3c/web-platform-tests/webrtc-priority/RTCRtpParameters-encodings.html [ Failure ]
webkit.org/b/235885 inspector/page/overrideSetting-ICECandidateFilteringEnabled.html [ Timeout ]
webkit.org/b/235885 imported/w3c/web-platform-tests/media-capabilities/decodingInfo.webrtc.html [ Failure ]
webkit.org/b/235885 imported/w3c/web-platform-tests/media-capabilities/encodingInfo.webrtc.html [ Failure ]
webkit.org/b/235885 webrtc/addTransceiver-then-addTrack.html [ Failure ]
webkit.org/b/235885 webrtc/audio-video-element-playing.html [ Timeout ]
webkit.org/b/235885 webrtc/candidate-stats.html [ Failure ]
webkit.org/b/235885 webrtc/canvas-to-peer-connection.html [ Failure ]
webkit.org/b/235885 webrtc/captureCanvas-webrtc.html [ Timeout ]
webkit.org/b/235885 webrtc/closing-peerconnection.html [ Timeout ]
webkit.org/b/235885 webrtc/direction-change.html [ Failure ]
webkit.org/b/235885 webrtc/disable-encryption.html [ Failure ]
webkit.org/b/235885 webrtc/ephemeral-certificates-and-cnames.html [ Failure ]
webkit.org/b/235885 webrtc/filtering-ice-candidate-after-reload.html [ Timeout ]
webkit.org/b/235885 webrtc/h264-packetization-mode.html [ Timeout Failure ]
webkit.org/b/235885 webrtc/libwebrtc/setLocalDescriptionCrash.html [ Failure ]
webkit.org/b/235885 webrtc/no-port-zero-in-upd-candidates.html [ Failure ]
webkit.org/b/235885 webrtc/peer-connection-remote-audio-mute.html [ Timeout ]
webkit.org/b/235885 webrtc/peer-connection-remote-audio-mute2.html [ Timeout ]
webkit.org/b/235885 webrtc/peer-connection-track-end.html [ Timeout ]
webkit.org/b/235885 webrtc/peerconnection-page-cache-long.html [ Timeout ]
webkit.org/b/235885 webrtc/peerconnection-page-cache.html [ Timeout ]
webkit.org/b/235885 webrtc/receiver-track-should-stay-live-even-if-receiver-is-inactive.html [ Failure ]
webkit.org/b/235885 webrtc/remove-track.html [ Failure ]
webkit.org/b/235885 webrtc/utf8-sdp.html [ Failure ]
webkit.org/b/235885 webrtc/video-addTransceiver.html [ Failure ]
webkit.org/b/235885 webrtc/video-getParameters.html [ Failure ]
webkit.org/b/235885 webrtc/video-mediastreamtrack-stats.html [ Failure ]
webkit.org/b/235885 webrtc/video-mute-vp8.html [ Timeout ]
webkit.org/b/235885 webrtc/video-mute.html [ Timeout ]
webkit.org/b/235885 webrtc/video-replace-track-to-null.html [ Failure ]
webkit.org/b/235885 webrtc/video-replace-track.html [ Failure ]
webkit.org/b/235885 webrtc/video-stats.html [ Failure ]
webkit.org/b/235885 webrtc/video-unmute.html [ Crash ]
webkit.org/b/235885 webrtc/video-vp8-videorange.html [ Timeout ]
webkit.org/b/235885 webrtc/video.html [ Failure ]
webkit.org/b/235885 webrtc/vp8-then-h264.html [ Failure ]
webkit.org/b/235885 webrtc/vp9-svc.html [ Failure ]
webkit.org/b/235885 webrtc/vp9.html [ Failure ]

#////////////////////////////////////////////////////////////////////////////////////////
# End of GStreamer-related bugs
#////////////////////////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -1431,16 +1508,14 @@ webkit.org/b/79203 webkit.org/b/186678 fast/mediastream/MediaStream-video-elemen

fast/mediastream/MediaDevices-addEventListener.html [ DumpJSConsoleLogInStdErr ]

webkit.org/b/191006 webrtc/simulcast-h264.html [ Failure ]
webkit.org/b/191006 webkit.org/b/235885 webrtc/simulcast-h264.html [ Failure Timeout ]

webkit.org/b/193641 webrtc/video-setDirection.html [ Failure Pass ]
webkit.org/b/193641 webkit.org/b/235885 webrtc/video-setDirection.html [ Failure Pass Timeout ]

webkit.org/b/194611 http/wpt/webrtc/getUserMedia-processSwapping.html [ Failure ]

webkit.org/b/201267 [ Release ] webrtc/video-h264.html [ Timeout Failure ]
webkit.org/b/222585 [ Debug ] webrtc/video-h264.html [ Crash ]

webkit.org/b/210272 webrtc/datachannel/multiple-connections.html [ Timeout Pass ]
webkit.org/b/222585 webkit.org/b/235885 [ Debug ] webrtc/video-h264.html [ Crash Failure ]

webkit.org/b/215005 webkit.org/b/218787 webrtc/h264-baseline.html [ Crash Timeout ]
# h264-high.html is marked as slow in the root expectation
Expand All @@ -1449,7 +1524,7 @@ webkit.org/b/215007 [ Debug ] webrtc/h264-high.html [ Slow Failure ]

webkit.org/b/216538 webrtc/captureCanvas-webrtc-software-h264-baseline.html [ Slow Failure ]

webkit.org/b/216763 webrtc/captureCanvas-webrtc-software-h264-high.html [ Crash Failure ]
webkit.org/b/216763 webkit.org/b/235885 webrtc/captureCanvas-webrtc-software-h264-high.html [ Crash Failure Timeout ]

webkit.org/b/218221 webrtc/vp9-profile2.html [ Timeout Failure ]

Expand Down Expand Up @@ -2241,13 +2316,12 @@ webkit.org/b/186100 css3/color-filters/color-filter-color-property-list-item.htm
webkit.org/b/186100 fast/hidpi/filters-turbulence.html [ ImageOnlyFailure ]
webkit.org/b/187044 webanimations/opacity-animation-yields-compositing-span.html [ Failure ]

webkit.org/b/187064 webrtc/datachannel/mdns-ice-candidates.html [ Timeout ]
webkit.org/b/187064 webrtc/video-addTrack.html [ Failure ]
webkit.org/b/187064 webrtc/video-disabled-black.html [ Crash ]
webkit.org/b/187064 webrtc/video-remote-mute.html [ Crash ]
webkit.org/b/187064 webrtc/video-replace-muted-track.html [ Timeout ]
webkit.org/b/187064 webkit.org/b/235885 webrtc/video-replace-muted-track.html [ Timeout Failure ]
webkit.org/b/187064 webkit.org/b/235885 webrtc/video-disabled-black.html [ Crash Timeout ]
webkit.org/b/187064 webkit.org/b/235885 webrtc/video-remote-mute.html [ Crash Failure ]
webkit.org/b/187064 webrtc/video-rotation.html [ Failure ]
webkit.org/b/187064 webrtc/video-rotation-no-cvo.html [ Failure ]
webkit.org/b/187064 webkit.org/b/235885 webrtc/video-rotation-no-cvo.html [ Failure Crash ]
webkit.org/b/187064 webrtc/video-with-data-channel.html [ Failure ]
webkit.org/b/187064 imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-getStats.https.html [ Failure Pass ]

Expand Down Expand Up @@ -2454,9 +2528,6 @@ webkit.org/b/174242 media/media-fullscreen-pause-inline.html [ Skip ]
webkit.org/b/182108 http/tests/media/hls/hls-webvtt-tracks.html [ Timeout ]
webkit.org/b/137311 media/video-fullscreen-only-playback.html [ Timeout Crash ]

webkit.org/b/198113 [ Release ] fast/mediastream/media-stream-page-muted.html [ Pass ]
webkit.org/b/198113 [ Debug ] fast/mediastream/media-stream-page-muted.html [ Timeout ]

webkit.org/b/194044 imported/w3c/web-platform-tests/media-source/mediasource-addsourcebuffer.html [ Failure ]

# Removed from general TestExpectations in r276393, but console error message still happening in GLib.
Expand Down Expand Up @@ -2541,10 +2612,7 @@ media/video-remote-control-playpause.html [ Skip ]

webkit.org/b/207062 imported/w3c/web-platform-tests/media-source/mediasource-replay.html [ Failure Pass ]

webkit.org/b/229346 webrtc/multi-audio.html [ Timeout Pass ]

webkit.org/b/229715 [ Debug ] fast/mediastream/getDisplayMedia-max-constraints3.html [ Timeout ]
webkit.org/b/229715 [ Debug ] fast/mediastream/screencapture-user-gesture.html [ Timeout ]
webkit.org/b/229346 webkit.org/b/235885 webrtc/multi-audio.html [ Timeout Pass Failure ]

webkit.org/b/229738 fast/text/whitespace/tab-character-basics.html [ Failure ]
webkit.org/b/229738 fast/text/word-break.html [ Failure ]
Expand Down
@@ -0,0 +1,19 @@
Tests RTCPeerConnection localDescription.

On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".


PASS pc.setLocalDescription(sessionDescription).then(requestSucceeded1, requestFailed1); did not throw exception.
PASS requestSucceeded was called.
PASS pc.setLocalDescription(sessionDescription).then(requestSucceeded2, requestFailed2); did not throw exception.
PASS requestFailed was called.
PASS pc.localDescription.type is "offer"
FAIL pc.localDescription.sdp should be local. Was t=0 0
.
PASS pc.localDescription.type is "offer"
FAIL pc.localDescription.sdp should be local. Was t=0 0
.
PASS successfullyParsed is true

TEST COMPLETE

@@ -0,0 +1,61 @@
Test setting up media between two RTCPeerConnection instances with one single SDP dialog.

On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".


Create RTCPeerConnection A
PASS pcA.signalingState is 'stable'
PASS pcA.pendingLocalDescription is null
PASS pcA.currentLocalDescription is null
PASS pcA.pendingRemoteDescription is null
PASS pcA.currentRemoteDescription is null

Create RTCPeerConnection B
PASS pcB.signalingState is 'stable'
PASS pcB.pendingLocalDescription is null
PASS pcB.currentLocalDescription is null
PASS pcB.pendingRemoteDescription is null
PASS pcB.currentRemoteDescription is null

A: add media
A: create offer
A: got offer, set it as local description
A: local offer set
PASS pcA.signalingState is 'have-local-offer'
PASS pcA.pendingLocalDescription is an instance of RTCSessionDescription
PASS pcA.currentLocalDescription is null

A: send offer to B
A --- offer --> B
B: got offer from A, set it as remote description
B: remote offer set
PASS pcB.signalingState is 'have-remote-offer'
PASS pcB.pendingRemoteDescription is an instance of RTCSessionDescription
PASS pcB.currentRemoteDescription is null

B: add media (to include in answer)
B: create answer
B: got answer, set it as local description
B: local answer set
PASS pcB.signalingState is 'stable'
PASS pcB.pendingLocalDescription is null
PASS pcB.currentLocalDescription is an instance of RTCSessionDescription
PASS pcB.pendingRemoteDescription is null
FAIL pcB.currentRemoetDescription is not an instance of RTCSessionDescription

B: send answer to A
A <-- answer -- B
A: got answer from B, set it as remote description
A: remote answer set
PASS pcA.signalingState is 'stable'
PASS pcA.pendingLocalDescription is null
PASS pcA.currentLocalDescription is an instance of RTCSessionDescription
PASS pcA.pendingRemoteDescription is null
FAIL pcA.currentRemoetDescription is not an instance of RTCSessionDescription

PASS Offer/answer dialog completed

PASS successfullyParsed is true

TEST COMPLETE

@@ -0,0 +1,19 @@
Tests RTCPeerConnection remoteDescription.

On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".


PASS pc.setRemoteDescription(sessionDescription).then(requestSucceeded1, requestFailed1); did not throw exception.
PASS requestSucceeded was called.
PASS pc.setRemoteDescription(sessionDescription).then(requestSucceeded2, requestFailed2); did not throw exception.
PASS requestFailed was called.
PASS pc.remoteDescription.type is "offer"
FAIL pc.remoteDescription.sdp should be remote. Was t=0 0
.
PASS pc.remoteDescription.type is "offer"
FAIL pc.remoteDescription.sdp should be remote. Was t=0 0
.
PASS successfullyParsed is true

TEST COMPLETE

@@ -0,0 +1,26 @@
Test the case where an RTCRtpTransceiver gets a remotely assigned mid and also unmute the associated source

On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".


pcA.addTrack(stream.getAudioTracks()[0], stream)
A's transceiver is not yet associated with a media description and should have a null mid
PASS pcA.getTransceivers()[0].mid is null
A: local offer set (mid gets defined)
midAssignedByA = pcA.getTransceivers()[0].mid
FAIL midAssignedByA !== null should be true. Was false.
pcB.addTrack(stream.getAudioTracks()[0], stream)
B's transceiver is not yet associated with a media description and should have a null mid
PASS pcB.getTransceivers()[0].mid is null
B: remote offer set (mid gets defined)
B's transceiver should get its mid from the remote side (A)
PASS pcB.getTransceivers()[0].mid is midAssignedByA
PASS Offer/answer dialog completed
PASS B: got remote track event
PASS event.track is an instance of MediaStreamTrack
PASS A: got remote track event
PASS B: remote track unmute event
PASS successfullyParsed is true

TEST COMPLETE

0 comments on commit a530847

Please sign in to comment.