Pass MediaTransportFactory to PeerConnectionFactory.

And use RTCConfiguration to enable/disable it on a per connection basis.

With the advent of MediaTransportInterface, we need to be able to enable
it on the per PeerConnection basis.

At this point PeerConnection will not take any action when the
MediaTransportInterface is set; this code will land a bit later, and
will be accompanied by the tests that verify correct setup (hence no tests right now).

At this point this is just a method stub to enable further development.

Bug: webrtc:9719
Change-Id: I1f77d650cb03bf1191aa0b35669cd32f1b68446f
Reviewed-on: https://webrtc-review.googlesource.com/c/103860
Reviewed-by: Bjorn Mellem <mellem@webrtc.org>
Reviewed-by: Anton Sukhanov <sukhanov@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25053}
This commit is contained in:
Piotr (Peter) Slatala
2018-10-08 09:43:21 -07:00
committed by Peter Slatala
parent 1e05486914
commit e0c2e97474
16 changed files with 177 additions and 30 deletions

View File

@ -22,6 +22,7 @@ extern "C" {
#include "api/audio_codecs/builtin_audio_decoder_factory.h"
#include "api/audio_codecs/builtin_audio_encoder_factory.h"
#include "api/media_transport_interface.h"
#include "api/video_codecs/video_decoder_factory.h"
#include "api/video_codecs/video_encoder_factory.h"
#include "modules/audio_device/include/audio_device.h"
@ -49,7 +50,8 @@ extern "C" {
nativeVideoEncoderFactory:nullptr
nativeVideoDecoderFactory:nullptr
audioDeviceModule:nullptr
audioProcessingModule:nullptr]);
audioProcessingModule:nullptr
mediaTransportFactory:nullptr]);
#endif
RTCPeerConnectionFactoryBuilder* builder = [[RTCPeerConnectionFactoryBuilder alloc] init];
RTCPeerConnectionFactory* peerConnectionFactory = [builder createPeerConnectionFactory];
@ -69,7 +71,8 @@ extern "C" {
nativeVideoEncoderFactory:nullptr
nativeVideoDecoderFactory:nullptr
audioDeviceModule:nullptr
audioProcessingModule:nullptr]);
audioProcessingModule:nullptr
mediaTransportFactory:nullptr]);
#endif
RTCPeerConnectionFactoryBuilder* builder = [RTCPeerConnectionFactoryBuilder defaultBuilder];
RTCPeerConnectionFactory* peerConnectionFactory = [builder createPeerConnectionFactory];