WebRTC: [GTK] Add MediaEndpointOwr - an OpenWebRTC WebRTC backend
authoradam.bergkvist@ericsson.com <adam.bergkvist@ericsson.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 21 Oct 2016 10:20:23 +0000 (10:20 +0000)
committeradam.bergkvist@ericsson.com <adam.bergkvist@ericsson.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 21 Oct 2016 10:20:23 +0000 (10:20 +0000)
commite24390755961b6199c867c3196fdb4a7f79dedb0
tree87d8511bae250581e94ebb4bc34f87c785cef726
parent06b9f1c50face98f3813045e9736fc7faba8784a
WebRTC: [GTK] Add MediaEndpointOwr - an OpenWebRTC WebRTC backend
https://bugs.webkit.org/show_bug.cgi?id=163327

Reviewed by Philippe Normand.

.:

Add manual WebRTC test. Test features:
- Two RTCPeerConnection instances communicate in a single browser tab.
- Supports setting up bidirectional media with a single SDP dialog, as
  well as one direction at a time.
- Strips vendor prefixes (runs in Chrome and Firefox as well)
- Supports modern as well as legacy APIs (mainly to make the test run
  in Chrome)

* ManualTests/webrtc-one-tab-p2p.html: Added.

Source/WebCore:

Add MediaEndpointOwr which is a MediaEndpoint implementation (WebRTC backend) based on
OpenWebRTC [1]. The WebRTC backend can be tested with a manual test. Automatic testing
is still done with MockMediaEndpoint.

[1] http://www.openwebrtc.org/

Testing: Added manual test (webrtc-one-tab-p2p.html)

* CMakeLists.txt:
* platform/GStreamer.cmake:
* platform/mediastream/openwebrtc/MediaEndpointOwr.cpp: Added.
(WebCore::createMediaEndpointOwr):
(WebCore::MediaEndpointOwr::MediaEndpointOwr):
(WebCore::MediaEndpointOwr::~MediaEndpointOwr):
(WebCore::MediaEndpointOwr::setConfiguration):
(WebCore::cryptoDataCallback):
(WebCore::MediaEndpointOwr::generateDtlsInfo):
(WebCore::MediaEndpointOwr::getDefaultAudioPayloads):
(WebCore::MediaEndpointOwr::getDefaultVideoPayloads):
(WebCore::payloadsContainType):
(WebCore::MediaEndpointOwr::filterPayloads):
(WebCore::MediaEndpointOwr::updateReceiveConfiguration):
(WebCore::findRtxPayload):
(WebCore::MediaEndpointOwr::updateSendConfiguration):
(WebCore::MediaEndpointOwr::addRemoteCandidate):
(WebCore::MediaEndpointOwr::replaceMutedRemoteSourceMid):
(WebCore::MediaEndpointOwr::createMutedRemoteSource):
(WebCore::MediaEndpointOwr::replaceSendSource):
(WebCore::MediaEndpointOwr::stop):
(WebCore::MediaEndpointOwr::transceiverIndexForSession):
(WebCore::MediaEndpointOwr::sessionMid):
(WebCore::MediaEndpointOwr::matchTransceiverByMid):
(WebCore::MediaEndpointOwr::dispatchNewIceCandidate):
(WebCore::MediaEndpointOwr::dispatchGatheringDone):
(WebCore::MediaEndpointOwr::processIceTransportStateChange):
(WebCore::MediaEndpointOwr::dispatchDtlsFingerprint):
(WebCore::MediaEndpointOwr::unmuteRemoteSource):
(WebCore::MediaEndpointOwr::prepareSession):
(WebCore::MediaEndpointOwr::prepareMediaSession):
(WebCore::parseHelperServerUrl):
(WebCore::MediaEndpointOwr::ensureTransportAgentAndTransceivers):
(WebCore::MediaEndpointOwr::internalAddRemoteCandidate):
(WebCore::gotCandidate):
(WebCore::candidateGatheringDone):
(WebCore::iceConnectionStateChange):
(WebCore::gotIncomingSource):
* platform/mediastream/openwebrtc/MediaEndpointOwr.h: Added.
(WebCore::OwrTransceiver::create):
(WebCore::OwrTransceiver::~OwrTransceiver):
(WebCore::OwrTransceiver::mid):
(WebCore::OwrTransceiver::session):
(WebCore::OwrTransceiver::owrIceState):
(WebCore::OwrTransceiver::setOwrIceState):
(WebCore::OwrTransceiver::gotEndOfRemoteCandidates):
(WebCore::OwrTransceiver::markGotEndOfRemoteCandidates):
(WebCore::OwrTransceiver::OwrTransceiver):
* platform/mediastream/openwebrtc/RealtimeMediaSourceOwr.h:
(WebCore::RealtimeMediaSourceOwr::RealtimeMediaSourceOwr):
(WebCore::RealtimeMediaSourceOwr::swapOutShallowSource):
Add support for an initially muted source. This is used for early
creation of remote sources.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@207665 268f45cc-cd09-0410-ab3c-d52691b4dbfc
ChangeLog
ManualTests/webrtc-one-tab-p2p.html [new file with mode: 0644]
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/platform/GStreamer.cmake
Source/WebCore/platform/mediastream/openwebrtc/MediaEndpointOwr.cpp [new file with mode: 0644]
Source/WebCore/platform/mediastream/openwebrtc/MediaEndpointOwr.h [new file with mode: 0644]
Source/WebCore/platform/mediastream/openwebrtc/RealtimeMediaSourceOwr.h